netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 1/1] tests/shell: fix mount command in "test-wrapper.sh"
@ 2023-11-02  8:15 Thomas Haller
  2023-11-02  8:38 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Haller @ 2023-11-02  8:15 UTC (permalink / raw)
  To: NetFilter; +Cc: Thomas Haller

With Fedora 39 (util-linux-core-2.39.2-1.fc39), the mount command starts
to fail. It was still working with Fedora 38 (util-linux-core-2.38.1-4.fc38).

  $ unshare -f -p -m --mount-proc -U --map-root-user -n bash -c 'mount -t tmpfs --make-private /var/run && mount'
  mount: /run: mount failed: Invalid argument.

Not sure why this starts to fail. But arguably the command line
arguments were wrong. Fix it, we need a pseudo name for the device.

Fixes: df6f1a3e0803 ("tests/shell: bind mount private /var/run/netns in test container")
Signed-off-by: Thomas Haller <thaller@redhat.com>
---
 tests/shell/helpers/test-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shell/helpers/test-wrapper.sh b/tests/shell/helpers/test-wrapper.sh
index 872a0c56ed54..b74c56168768 100755
--- a/tests/shell/helpers/test-wrapper.sh
+++ b/tests/shell/helpers/test-wrapper.sh
@@ -48,7 +48,7 @@ if [ "$NFT_TEST_HAS_UNSHARED_MOUNT" = y ] ; then
 	# Note that this also hides everything that might reside in /var/run.
 	# That is desirable, as tests should not depend on content there (or if
 	# they do, we need to explicitly handle it as appropriate).
-	if mount -t tmpfs --make-private "/var/run" ; then
+	if mount -t tmpfs --make-private tmpfs "/var/run" ; then
 		CLEANUP_UMOUNT_VAR_RUN=y
 	fi
 	mkdir -p /var/run/netns
-- 
2.41.0


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

* Re: [PATCH nft 1/1] tests/shell: fix mount command in "test-wrapper.sh"
  2023-11-02  8:15 [PATCH nft 1/1] tests/shell: fix mount command in "test-wrapper.sh" Thomas Haller
@ 2023-11-02  8:38 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2023-11-02  8:38 UTC (permalink / raw)
  To: Thomas Haller; +Cc: NetFilter

Thomas Haller <thaller@redhat.com> wrote:
> With Fedora 39 (util-linux-core-2.39.2-1.fc39), the mount command starts
> to fail. It was still working with Fedora 38 (util-linux-core-2.38.1-4.fc38).
> 
>   $ unshare -f -p -m --mount-proc -U --map-root-user -n bash -c 'mount -t tmpfs --make-private /var/run && mount'
>   mount: /run: mount failed: Invalid argument.
> 
> Not sure why this starts to fail. But arguably the command line
> arguments were wrong. Fix it, we need a pseudo name for the device.

Applied, thanks.

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

end of thread, other threads:[~2023-11-02  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02  8:15 [PATCH nft 1/1] tests/shell: fix mount command in "test-wrapper.sh" Thomas Haller
2023-11-02  8:38 ` Florian Westphal

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