diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-05-28 07:05:15 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-28 10:38:53 +0200 |
commit | 36c5035f2a7d7db932879fa615eec1ea960ea55a (patch) | |
tree | bd17e3ea6b774b3bcaf2696efd2993bf6eb8acf4 /test | |
parent | test: wait for the kernel finishes to attach backing file to loop device (diff) | |
download | systemd-36c5035f2a7d7db932879fa615eec1ea960ea55a.tar.xz systemd-36c5035f2a7d7db932879fa615eec1ea960ea55a.zip |
test: suppress logs generated by journal tests
Note, journal_file_dump() is only used by tests.
Closes #33035.
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/TEST-02-UNITTESTS.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/units/TEST-02-UNITTESTS.sh b/test/units/TEST-02-UNITTESTS.sh index 7d44f974af..0c8de536ef 100755 --- a/test/units/TEST-02-UNITTESTS.sh +++ b/test/units/TEST-02-UNITTESTS.sh @@ -42,10 +42,20 @@ run_test() { local test="$1" local name="${test##*/}" + local environment= echo "Executing test $name as unit $name.service" - systemd-run --quiet --property Delegate=1 --unit="$name" --wait "$test" && ret=0 || ret=$? + case "$name" in + test-journal-flush) + environment="SYSTEMD_LOG_LEVEL=info" + ;; + test-journal-verify) + environment="SYSTEMD_LOG_LEVEL=crit" + ;; + esac + + systemd-run --quiet --property Delegate=1 --property "Environment=$environment" --unit="$name" --wait "$test" && ret=0 || ret=$? exec {LOCK_FD}> /lock flock --exclusive ${LOCK_FD} |