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. 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 | 562 +++++++++++++++++++++++++++++++++++++++++++++++ test/run | 5 +- 7 files changed, 599 insertions(+), 176 deletions(-) delete mode 100644 test/nsholder.c create mode 100644 test/nstool.c -- 2.39.2