]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-17-UDEV: check the exit code at last 37997/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 28 Jun 2025 01:39:32 +0000 (10:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 29 Jun 2025 20:35:13 +0000 (05:35 +0900)
Otherwise, it is hard to debug when the test failed.

test/units/TEST-17-UDEV.verify.sh

index f9ec6612b44a8ccc73279ce6930ced5d6cfff591..243fc00f55039941f487da9ef78eb4f28c682ecc 100755 (executable)
@@ -76,7 +76,6 @@ assert_1_impl() {
     udevadm verify "$@" >"${out}" 2>"${err}"
     rc=$?
     set -e
-    assert_eq "$rc" 1
 
     if [ -f "${exp}" ]; then
         diff -u "${exp}" "${err}"
@@ -87,6 +86,7 @@ assert_1_impl() {
     elif [ -f "${rules}" ]; then
         diff -u "${workdir}/default_output_1_fail" "${out}"
     fi
+    assert_eq "$rc" 1
 }
 
 assert_1() {