dcavalca / rpms / systemd

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