]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use check_result_common()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 4 Jun 2023 20:13:58 +0000 (22:13 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 5 Jun 2023 14:50:13 +0000 (16:50 +0200)
The TEST-24 has been silently timing out for quite a while in the C8S
job, as the check_result_qemu() override lacked some error checks,
whoopsie.

test/TEST-24-CRYPTSETUP/test.sh

index 9bfbeac80c23620f264ca764e9d7ebc9190e587d..8ed5cf0e1ba5d964f5e14fcebe27a3405ba91806 100755 (executable)
@@ -17,24 +17,19 @@ KERNEL_APPEND+=" rd.luks=1 luks.name=$PART_UUID=$DM_NAME luks.key=$PART_UUID=/ke
 QEMU_OPTIONS+=" -drive format=raw,cache=unsafe,file=${STATEDIR:?}/keydev.img"
 
 check_result_qemu() {
-    local ret=1
+    local ret
 
     mount_initdir
-    [[ -e "${initdir:?}/testok" ]] && ret=0
-    [[ -f "$initdir/failed" ]] && cp -a "$initdir/failed" "${TESTDIR:?}"
 
     cryptsetup luksOpen "${LOOPDEV:?}p2" "${DM_NAME:?}" <"$TESTDIR/keyfile"
     mount "/dev/mapper/$DM_NAME" "$initdir/var"
-    save_journal "$initdir/var/log/journal"
-    check_coverage_reports "${initdir:?}" || ret=5
+
+    check_result_common "${initdir:?}" && ret=0 || ret=$?
+
     _umount_dir "$initdir/var"
     _umount_dir "$initdir"
     cryptsetup luksClose "/dev/mapper/$DM_NAME"
 
-    [[ -f "$TESTDIR/failed" ]] && cat "$TESTDIR/failed"
-    echo "${JOURNAL_LIST:-No journals were saved}"
-
-    test -s "$TESTDIR/failed" && ret=1
     return $ret
 }