From e6faf0ee22cb7a449f1462f5a032110b46be31d5 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Sun, 4 Jun 2023 22:13:58 +0200 Subject: 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. --- test/TEST-24-CRYPTSETUP/test.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'test/TEST-24-CRYPTSETUP/test.sh') 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 } -- cgit v1.2.3