You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 lines
1.5 KiB

From e235b10483fb5b33f20ff0611ac5ed707d35d850 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Fri, 18 Feb 2022 14:10:15 +0100
Subject: [PATCH] test: pass the initdir to check_result_{qemu,nspawn} hooks
(cherry picked from commit 4b9a0c3aebdcf000f8d7ee569cb8a1806d07c397)
Related: #2087652
---
test/test-functions | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/test-functions b/test/test-functions
index b5fcf07818..93ab32b68d 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -1438,7 +1438,7 @@ check_result_nspawn() {
# Run additional test-specific checks if defined by check_result_nspawn_hook()
if declare -F check_result_nspawn_hook >/dev/null; then
- if ! check_result_nspawn_hook; then
+ if ! check_result_nspawn_hook "${workspace}"; then
derror "check_result_nspawn_hook() returned with EC > 0"
ret=4
fi
@@ -1457,16 +1457,16 @@ check_result_qemu() {
check_result_common "${initdir:?}"
ret=$?
- _umount_dir "${initdir:?}"
-
# Run additional test-specific checks if defined by check_result_qemu_hook()
if declare -F check_result_qemu_hook >/dev/null; then
- if ! check_result_qemu_hook; then
+ if ! check_result_qemu_hook "${initdir:?}"; then
derror "check_result_qemu_hook() returned with EC > 0"
ret=4
fi
fi
+ _umount_dir "${initdir:?}"
+
return $ret
}