From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id F3BF85A026D for ; Thu, 6 Apr 2023 05:28:23 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PsRm55WGcz4xDr; Thu, 6 Apr 2023 13:28:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1680751701; bh=OecN5EMUB8drnASFCa7A6gZAW0yVqkWT4umHcq/Toec=; h=From:To:Cc:Subject:Date:From; b=iZ2iUtiJUvFMMdJCuU8RjE6HQfq1ht48W/IivdbOAZir5/3DICj9tvG1ab5lfhs8B /AJ1BdNSxigzShhHuMxX+Y4jCX3Kod7ufyZNKt87O5IPXpaH3V9Mw6UVEGrjEzFE9V e/2f/0dIv1nQcz/ZMMg0VAX1YgKGHqjIGc4Cq6XE= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 00/14] Improved tool for testing across multiple namespaces Date: Thu, 6 Apr 2023 13:28:05 +1000 Message-Id: <20230406032819.707441-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.39.2 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: HM5WZICP2S525ZAC7KONQJYWAQN4VRFZ X-Message-ID-Hash: HM5WZICP2S525ZAC7KONQJYWAQN4VRFZ X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This series extends the "nsholder" tool we use in the tests to "nstool" with some more features. In particular it allows entering an established namespace with capabilities intact, and it allows entering them with less verbose options than nsenter. For now this only gives a modest simplification of the tests, but it should enable more in future. I haven't managed to get all the way through the testsuite with this: it's wedging in the IPv4 UDP throughput tests, but that's happening for me with the main branch too. I'll debug that, but I don't want to delay this series on that for now. Changes since v1: * Fixed a bunch of bad indentation from a bad copy/paste * Assorted minor cleanups based on review from Stefano David Gibson (14): nstool: Rename nsholder to nstool nstool: Reverse parameters to nstool nstool: Move description of its operation modes from comment to usage nstool: Split some command line parsing and socket setup to subcommands nstool: Replace "pid" subcommand with "info" subcommand nstool: Detect what namespaces target is in nstool: Add magic number to advertized information nstool: Helpers to iterate through namespace types nstool: Add nstool exec command to execute commands in an nstool namespace nstool: Add --keep-caps option to nstool exec test: Initialise ${TRACE} properly test: Use "nstool exec" to slightly simplify tests nstool: Advertise the holder's cwd (in its mountns) across the socket nstool: Enter holder's cwd when changing mount ns with nstool exec test/.gitignore | 2 +- test/Makefile | 4 +- test/lib/context | 14 +- test/lib/setup | 49 ++-- test/nsholder.c | 139 ------------ test/nstool.c | 565 +++++++++++++++++++++++++++++++++++++++++++++++ test/run | 5 +- 7 files changed, 602 insertions(+), 176 deletions(-) delete mode 100644 test/nsholder.c create mode 100644 test/nstool.c -- 2.39.2