On Wed, Jul 22, 2026 at 11:32:42AM -0400, Dwayne B. Bent wrote:
Adds a test that asserts that when pasta is invoked via `unshare -r` in standalone mode with `--netns-only` it does not print any warnings, and the command executes successfully.
Link: https://bugs.passt.top/show_bug.cgi?id=216
Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Dwayne B. Bent
Reviewed-by: David Gibson
--- test/pasta_options/netns_only | 19 +++++++++++++++++++ test/run | 1 + 2 files changed, 20 insertions(+) create mode 100644 test/pasta_options/netns_only
diff --git a/test/pasta_options/netns_only b/test/pasta_options/netns_only new file mode 100644 index 0000000..197ed44 --- /dev/null +++ b/test/pasta_options/netns_only @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# PASST - Plug A Simple Socket Transport +# for qemu/UNIX domain socket mode +# +# PASTA - Pack A Subtle Tap Abstraction +# for network namespace/tap device mode +# +# test/pasta_options/netns_only - Check --netns-only handling + +htools unshare grep + +test --netns-only skips id mapping configuration +set OUT __STATEDIR__/netns-only.out +set ERR __STATEDIR__/netns-only.err + +passt unshare -r -- ./pasta -q --netns-only -- echo TEST > __OUT__ 2> __ERR__ +check grep -qx TEST __OUT__ +check [ ! -s __ERR__ ] diff --git a/test/run b/test/run index f858e55..c4073cc 100755 --- a/test/run +++ b/test/run @@ -85,6 +85,7 @@ run() {
setup pasta_options test pasta_options/log_to_file + test pasta_options/netns_only teardown pasta_options
setup build -- 2.55.0
-- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson