Skip to contentSkip to conversation

grub-shell: Correct Test Failures

PATCH In review Andrew Hamilton 2 participants 4 messages Jun 21, 2025 – Jun 23, 2025

lore
Share & tools
lore
#0 lore raw

cover grub-shell: Correct Test Failures

It was observed that netboot_test and file_filter_test are failing currently when running 'make check'. This is being caused by the tmp folder cleanup failing at the end of these tests, from grub-shell.

The following error is seen in these test logs:
"rmdir: failed to remove '/tmp/grub-shell.2VvsV9ZkH6':
Directory not empty"

This was traced back to the creation of a subfolder in these two tests for netboot. Update grub-shell.in to remove this subfolder when netboot option is used.

Andrew Hamilton (1):
tests: Correct netboot and file_filter test failure

 tests/util/grub-shell.in | 3 +++
 1 file changed, 3 insertions(+)
Signature · 7 lines
2.39.5


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH 1/1 tests: Correct netboot and file_filter test failure

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")

---
 tests/util/grub-shell.in | 3 +++
 1 file changed, 3 insertions(+)
tests/util/grub-shell.in +3 -0
index 8baa3667a..2a874a85d 100644
@@ -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}"
Signature · 7 lines
2.39.5


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Tested-by Leo Sandoval on v1 1/1
#2 lore raw

Re: [PATCH 1/1] tests: Correct netboot and file_filter test failure

Quoted 11 lines · Andrew Hamilton

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")

---

Quoted 21 lines
 tests/util/grub-shell.in | 3 +++
 1 file changed, 3 insertions(+)
tests/util/grub-shell.in +3 -1
index 8baa3667a..2a874a85d 100644
@@ -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}"
--

2.39.5

Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reviewed-by Daniel Kiper on v1 1/1
#3 lore raw

Re: [PATCH 1/1] tests: Correct netboot and file_filter test failure

In reply to Andrew Hamilton
Quoted 10 lines · Andrew Hamilton

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")

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel