diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-06-04 22:13:58 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-06-05 16:50:13 +0200 |
commit | e6faf0ee22cb7a449f1462f5a032110b46be31d5 (patch) | |
tree | 3042450ef70f76bfd6000afd696d4a06ddbb41d0 /test/TEST-24-CRYPTSETUP/test.sh | |
parent | cryptsetup: avoid calling strv_find() on a NULL pointer (diff) | |
download | systemd-e6faf0ee22cb7a449f1462f5a032110b46be31d5.tar.xz systemd-e6faf0ee22cb7a449f1462f5a032110b46be31d5.zip |
test: use check_result_common()
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.
Diffstat (limited to 'test/TEST-24-CRYPTSETUP/test.sh')
-rwxr-xr-x | test/TEST-24-CRYPTSETUP/test.sh | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/TEST-24-CRYPTSETUP/test.sh b/test/TEST-24-CRYPTSETUP/test.sh index 9bfbeac80c..8ed5cf0e1b 100755 --- a/test/TEST-24-CRYPTSETUP/test.sh +++ b/test/TEST-24-CRYPTSETUP/test.sh @@ -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 } |