systemd/0250-test-pass-the-initdir-to-check_result_-qemu-nspawn-h.patch
Jan Macku 0daf48d9aa systemd-250-8
Resolves: #2047682,#2068043,#2068131,#2073003,#2073994,#2082131,#2083493,#2087652,#2100340
2022-07-20 08:37:23 +02:00

46 lines
1.5 KiB
Diff

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
}