]> git.ipfire.org Git - thirdparty/systemd.git/commit
tests: make inverted tests actually count
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 7 Apr 2021 21:24:25 +0000 (23:24 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Apr 2021 09:45:59 +0000 (11:45 +0200)
commitffa328f060f437f3e1f0f0cb13513ee3dd9c3da5
treef5de9f56fa6c5347315619ee24fb64bd76ea3af7
parent65d09d575cf74c34098ff4f3ab53fc7587805811
tests: make inverted tests actually count

"! test ..." does not cause the script to fail, even with set -e.
IIUC, bash treats this command as part of an expression line, as it
would if 'test ... && ...' was used. Failing expression lines do not
terminate the script.

This fixes the obvious cases by changing '! test' → 'test !'.
Then the inversion happens internally in test and bash will propagate
the failure.
test/units/testsuite-22.01.sh
test/units/testsuite-22.02.sh
test/units/testsuite-22.03.sh
test/units/testsuite-22.06.sh
test/units/testsuite-22.07.sh
test/units/testsuite-22.08.sh
test/units/testsuite-25.sh
test/units/testsuite-30.sh
test/units/testsuite-33.sh
test/units/testsuite-34.sh
test/units/testsuite-37.sh