public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: "Dwayne B. Bent" <dbb@dbb.dev>
To: passt-dev@passt.top
Cc: "Dwayne B. Bent" <dbb@dbb.dev>
Subject: [PATCH 1/2] pasta: Regression test for bug 216
Date: Tue, 21 Jul 2026 11:37:26 -0400	[thread overview]
Message-ID: <20260721153727.2173831-2-dbb@dbb.dev> (raw)
In-Reply-To: <20260721153727.2173831-1-dbb@dbb.dev>

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.

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Dwayne B. Bent <dbb@dbb.dev>
---
 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


  reply	other threads:[~2026-07-21 15:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 15:37 [PATCH 0/2] pasta: Do not configure ID mappings when invoked with --netns-only Dwayne B. Bent
2026-07-21 15:37 ` Dwayne B. Bent [this message]
2026-07-21 15:37 ` [PATCH 2/2] " Dwayne B. Bent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260721153727.2173831-2-dbb@dbb.dev \
    --to=dbb@dbb.dev \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).