]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/TEST-24-UNIT-TESTS/test.sh
test: rework how images are created
[thirdparty/systemd.git] / test / TEST-24-UNIT-TESTS / test.sh
index 06b6cebf4fd6b0f7ffea90befa85dfdb1a5b6192..0475621623b25e8462c7be5fd1844ce0655ef1d0 100755 (executable)
@@ -24,13 +24,13 @@ check_result_nspawn() {
     fi
     cp -a $TESTDIR/$1/var/log/journal $TESTDIR
     [[ -n "$TIMED_OUT" ]] && _ret=$(($_ret+1))
+    umount_initdir
     return $_ret
 }
 
 check_result_qemu() {
     local _ret=1
-    mkdir -p $initdir
-    mount ${LOOPDEV}p1 $initdir
+    mount_initdir
     [[ -e $initdir/testok ]] && _ret=0
     if [[ -s $initdir/failed ]]; then
         _ret=$(($_ret+1))
@@ -47,7 +47,7 @@ check_result_qemu() {
         fi
     fi
     cp -a $initdir/var/log/journal $TESTDIR
-    umount $initdir
+    umount_initdir
     [[ -n "$TIMED_OUT" ]] && _ret=$(($_ret+1))
     return $_ret
 }