]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tests/util/grub-shell: Correct netboot and file_filter test failure
authorAndrew Hamilton <adhamilt@gmail.com>
Sat, 21 Jun 2025 15:50:38 +0000 (10:50 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 26 Jun 2025 15:24:39 +0000 (17:24 +0200)
Correct a test failure in netboot_test and file_filter_test caused by an
issue cleaning up the tmp directory created for netboot. Netboot creates
a subdirectory in the tmp folder that causes the rmdir to fail - so
cleanup the subdirectory first.

Fixes: 1d59f39b5f1b (tests/util/grub-shell: Remove the work directory on successful run and debug is not on)
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Tested-by: Leo Sandoval <lsandova@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/util/grub-shell.in

index 8baa3667ae2b0c8591e95ac54043d86ac1926b5f..2a874a85d4a093d4a36cf71f1b030afdd5e2e1ff 100644 (file)
@@ -711,6 +711,9 @@ elif [ x$boot = xemu ]; then
     test -n "$debug" || rm -rf "$rootdir"
     test -n "$debug" || rm -f "$roottar"
 fi
+if [ x$boot = xnet ]; then
+    test -n "$debug" || rm -rf "$work_directory/netdir"
+fi
 test -n "$debug" || rm -f "${isofile}"
 test -n "$debug" || rm -rf "${rom_directory}"
 test -n "$debug" || rm -f "${tmpfile}" "${cfgfile}" "${goutfile}"