Lazy unmount the test dirs

Sometimes something outside our control hangs onto the mounts.

Related: rhbz#1975844
This commit is contained in:
Brian C. Lane 2021-07-15 15:24:41 -07:00
parent 277fc0d92d
commit b09e0f64e6

View File

@ -30,6 +30,12 @@ function running {
echo -e "\n\n#### RUN: $1\n"
}
# unmount the dirs lazily because sometimes some outside thing is still touching them
function umount_dirs {
umount --lazy "$IMGDIR"
umount --lazy "$ISODIR"
}
[ -e "$ISODIR" ] || mkdir "$ISODIR"
[ -e "$IMGDIR" ] || mkdir "$IMGDIR"
@ -43,8 +49,7 @@ function ks_only {
test_ks
status "Add kickstart"
umount "$IMGDIR"
umount "$ISODIR"
umount_dirs
}
function test_ks {
@ -71,8 +76,7 @@ function ks_serial {
test_ks_serial
status "Add kickstart and serial cmdline"
umount "$IMGDIR"
umount "$ISODIR"
umount_dirs
}
function test_ks_serial {
@ -95,8 +99,7 @@ function new_volid {
test_volid
status "Use a new VOLID"
umount "$IMGDIR"
umount "$ISODIR"
umount_dirs
}
function test_volid {
@ -118,8 +121,7 @@ function add_files {
test_files
status "Add files"
umount "$IMGDIR"
umount "$ISODIR"
umount_dirs
}
function test_files {
@ -139,8 +141,7 @@ function run_all {
test_files
status "Use all the options"
umount "$IMGDIR"
umount "$ISODIR"
umount_dirs
}