From 823b6754d68b01a6d30431411506cc9084560e68 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 28 Jun 2025 09:11:42 +0200 Subject: change/improve populate_dev API populate_dev may be used before unsharing a pid namespace with the intention of unsharing it. Then, /dev/pts should not be mounted and instead that mount needs to happen inside the newly created pid namespace. To allow for this usage, rename the pidns argument to pts and turn it into a literal. It may also be desired to have a /dev without pts, so add that option as well. It's a breaking change, but it does add clarity. --- tests/test_simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_simple.py') diff --git a/tests/test_simple.py b/tests/test_simple.py index 38a253d..114b922 100644 --- a/tests/test_simple.py +++ b/tests/test_simple.py @@ -239,7 +239,7 @@ class UnshareTest(unittest.TestCase): ) linuxnamespaces.mount("tmpfs", "/mnt", "tmpfs", data="mode=0755") os.mkdir("/mnt/dev") - linuxnamespaces.populate_dev("/", "/mnt", pidns=False) + linuxnamespaces.populate_dev("/", "/mnt", pts="host") self.assertTrue(os.access("/mnt/dev/null", os.W_OK)) pathlib.Path("/mnt/dev/null").write_text("") -- cgit v1.2.3