]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: run test-journal-append binary with info level logging
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 31 Jul 2025 15:30:09 +0000 (16:30 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 31 Jul 2025 20:42:51 +0000 (05:42 +0900)
It is ran thousands of times so the logs are overwhelming otherwise

test/units/TEST-04-JOURNAL.journal-append.sh

index 35f9433b8356b21ad9cf534b3ac1e745a0d6acea..b22a306849a78f87ee898100386242c28381a3a6 100755 (executable)
@@ -12,35 +12,35 @@ TEST_JOURNAL_APPEND=/usr/lib/systemd/tests/unit-tests/manual/test-journal-append
 [[ -x "$TEST_JOURNAL_APPEND" ]]
 
 # Corrupt the first ~1024 bytes, this should be pretty quick
-"$TEST_JOURNAL_APPEND" --sequential --start-offset=0 --iterations=350 --iteration-step=3
+SYSTEMD_LOG_LEVEL=info "$TEST_JOURNAL_APPEND" --sequential --start-offset=0 --iterations=350 --iteration-step=3
 
 # Skip most of the test when running without acceleration, as it's excruciatingly slow
 # (this shouldn't be an issue, as it should run in nspawn as well)
 if ! [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
     # Corrupt the beginning of every 1K block between 1K - 32K
     for ((i = 1024; i <= (32 * 1024); i += 1024)); do
-        "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
+        SYSTEMD_LOG_LEVEL=info "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
     done
 
     # Corrupt the beginning of every 16K block between 32K - 128K
     for ((i = (32 * 1024); i <= (256 * 1024); i += (16 * 1024))); do
-        "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
+        SYSTEMD_LOG_LEVEL=info "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
     done
 
     # Corrupt the beginning of every 128K block between 128K - 1M
     for ((i = (128 * 1024); i <= (1 * 1024 * 1024); i += (128 * 1024))); do
-        "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
+        SYSTEMD_LOG_LEVEL=info "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
     done
 
     # And finally the beginning of every 1M block between 1M and 8M
     for ((i = (1 * 1024 * 1024); i < (8 * 1024 * 1024); i += (1 * 1024 * 1024))); do
-        "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
+        SYSTEMD_LOG_LEVEL=info "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
     done
 
     if [[ "$(nproc)" -ge 2 ]]; then
         # Try to corrupt random bytes throughout the journal
-        "$TEST_JOURNAL_APPEND" --iterations=25
+        SYSTEMD_LOG_LEVEL=info "$TEST_JOURNAL_APPEND" --iterations=25
     fi
 else
-    "$TEST_JOURNAL_APPEND" --iterations=10
+    SYSTEMD_LOG_LEVEL=info "$TEST_JOURNAL_APPEND" --iterations=10
 fi