]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: helpers: suppress mount error messages
authorFlorian Westphal <fw@strlen.de>
Fri, 6 Jun 2025 12:26:14 +0000 (14:26 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 6 Jun 2025 12:27:54 +0000 (14:27 +0200)
Prevent repeated error messages from spamming the console.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/helpers/test-wrapper.sh

index c016e0ce1d390e400b7470340323416a048b2c1c..4a7e8b7b9e7d73a1c64369fb0235861e4fbb7d9d 100755 (executable)
@@ -62,7 +62,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 tmpfs "/var/run" ; then
+       if mount -t tmpfs --make-private tmpfs "/var/run" 2>/dev/null ; then
                CLEANUP_UMOUNT_VAR_RUN=y
        fi
        mkdir -p /var/run/netns