|
|
594167 |
From 895cc5ef78f91ed542d8be6a057033b7992ad91e Mon Sep 17 00:00:00 2001
|
|
|
594167 |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
594167 |
Date: Fri, 17 Jun 2022 17:28:13 +0200
|
|
|
594167 |
Subject: [PATCH] test: run the custom check hooks before common checks
|
|
|
594167 |
|
|
|
594167 |
since we delete the guest journals as part of the save_journal() step in
|
|
|
594167 |
check_result_common(), making journal inaccessible from the custom check
|
|
|
594167 |
hooks.
|
|
|
594167 |
|
|
|
594167 |
(cherry picked from commit 35d2d2e61c7695b87a4ee3dc54d065f4de95f260)
|
|
|
594167 |
|
|
|
594167 |
Related: #2087652
|
|
|
594167 |
---
|
|
|
594167 |
test/test-functions | 16 ++++++++--------
|
|
|
594167 |
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/test-functions b/test/test-functions
|
|
|
594167 |
index 93ab32b68d..1306dcf260 100644
|
|
|
594167 |
--- a/test/test-functions
|
|
|
594167 |
+++ b/test/test-functions
|
|
|
594167 |
@@ -1433,10 +1433,7 @@ check_result_nspawn() {
|
|
|
594167 |
local workspace="${1:?}"
|
|
|
594167 |
local ret
|
|
|
594167 |
|
|
|
594167 |
- check_result_common "${workspace}"
|
|
|
594167 |
- ret=$?
|
|
|
594167 |
-
|
|
|
594167 |
- # Run additional test-specific checks if defined by check_result_nspawn_hook()
|
|
|
594167 |
+ # Run a test-specific checks if defined by check_result_nspawn_hook()
|
|
|
594167 |
if declare -F check_result_nspawn_hook >/dev/null; then
|
|
|
594167 |
if ! check_result_nspawn_hook "${workspace}"; then
|
|
|
594167 |
derror "check_result_nspawn_hook() returned with EC > 0"
|
|
|
594167 |
@@ -1444,6 +1441,9 @@ check_result_nspawn() {
|
|
|
594167 |
fi
|
|
|
594167 |
fi
|
|
|
594167 |
|
|
|
594167 |
+ check_result_common "${workspace}"
|
|
|
594167 |
+ ret=$?
|
|
|
594167 |
+
|
|
|
594167 |
_umount_dir "${initdir:?}"
|
|
|
594167 |
|
|
|
594167 |
return $ret
|
|
|
594167 |
@@ -1454,10 +1454,7 @@ check_result_qemu() {
|
|
|
594167 |
local ret
|
|
|
594167 |
mount_initdir
|
|
|
594167 |
|
|
|
594167 |
- check_result_common "${initdir:?}"
|
|
|
594167 |
- ret=$?
|
|
|
594167 |
-
|
|
|
594167 |
- # Run additional test-specific checks if defined by check_result_qemu_hook()
|
|
|
594167 |
+ # Run a test-specific checks if defined by check_result_qemu_hook()
|
|
|
594167 |
if declare -F check_result_qemu_hook >/dev/null; then
|
|
|
594167 |
if ! check_result_qemu_hook "${initdir:?}"; then
|
|
|
594167 |
derror "check_result_qemu_hook() returned with EC > 0"
|
|
|
594167 |
@@ -1465,6 +1462,9 @@ check_result_qemu() {
|
|
|
594167 |
fi
|
|
|
594167 |
fi
|
|
|
594167 |
|
|
|
594167 |
+ check_result_common "${initdir:?}"
|
|
|
594167 |
+ ret=$?
|
|
|
594167 |
+
|
|
|
594167 |
_umount_dir "${initdir:?}"
|
|
|
594167 |
|
|
|
594167 |
return $ret
|