test: pass the initdir to check_result_{qemu,nspawn} hooks
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 18 Feb 2022 13:10:15 +0000 (14:10 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 17 Jun 2022 15:14:45 +0000 (17:14 +0200)
test/test-functions

index 9d369685d9c0bcdc1bcd1c8cdd48e6abdf496217..d26225913c175eb751aa7f86489cf59c0e8daae7 100644 (file)
@@ -1507,7 +1507,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
@@ -1526,16 +1526,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
 }