grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] grub-shell: Correct Test Failures
@ 2025-06-21 15:50 Andrew Hamilton
  2025-06-21 15:50 ` [PATCH 1/1] tests: Correct netboot and file_filter test failure Andrew Hamilton
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Hamilton @ 2025-06-21 15:50 UTC (permalink / raw)
  To: grub-devel; +Cc: daniel.kiper, Andrew Hamilton

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(+)

-- 
2.39.5


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] tests: Correct netboot and file_filter test failure
  2025-06-21 15:50 [PATCH 0/1] grub-shell: Correct Test Failures Andrew Hamilton
@ 2025-06-21 15:50 ` Andrew Hamilton
  2025-06-23 17:38   ` Leo Sandoval via Grub-devel
  2025-06-23 17:40   ` Daniel Kiper via Grub-devel
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Hamilton @ 2025-06-21 15:50 UTC (permalink / raw)
  To: grub-devel; +Cc: daniel.kiper, 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")

Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
---
 tests/util/grub-shell.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index 8baa3667a..2a874a85d 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -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


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] tests: Correct netboot and file_filter test failure
  2025-06-21 15:50 ` [PATCH 1/1] tests: Correct netboot and file_filter test failure Andrew Hamilton
@ 2025-06-23 17:38   ` Leo Sandoval via Grub-devel
  2025-06-23 17:40   ` Daniel Kiper via Grub-devel
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Sandoval via Grub-devel @ 2025-06-23 17:38 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Leo Sandoval, daniel.kiper, Andrew Hamilton


[-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --]

On Sat, Jun 21, 2025 at 9:52 AM Andrew Hamilton <adhamilt@gmail.com> wrote:

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

---
>  tests/util/grub-shell.in | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
> index 8baa3667a..2a874a85d 100644
> --- a/tests/util/grub-shell.in
> +++ b/tests/util/grub-shell.in
> @@ -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
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #1.2: Type: text/html, Size: 2751 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] tests: Correct netboot and file_filter test failure
  2025-06-21 15:50 ` [PATCH 1/1] tests: Correct netboot and file_filter test failure Andrew Hamilton
  2025-06-23 17:38   ` Leo Sandoval via Grub-devel
@ 2025-06-23 17:40   ` Daniel Kiper via Grub-devel
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Kiper via Grub-devel @ 2025-06-23 17:40 UTC (permalink / raw)
  To: Andrew Hamilton; +Cc: Daniel Kiper, grub-devel

On Sat, Jun 21, 2025 at 10:50:38AM -0500, Andrew Hamilton wrote:
> 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>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-23 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-21 15:50 [PATCH 0/1] grub-shell: Correct Test Failures Andrew Hamilton
2025-06-21 15:50 ` [PATCH 1/1] tests: Correct netboot and file_filter test failure Andrew Hamilton
2025-06-23 17:38   ` Leo Sandoval via Grub-devel
2025-06-23 17:40   ` Daniel Kiper via Grub-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).