From de6b129187ea1655b550ed274bd06dd7dc72d43a Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 16 Mar 2024 20:07:56 +0100 Subject: slightly simplify tests --- tests/test_simple.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_simple.py b/tests/test_simple.py index e3d0fd9..8d87dae 100644 --- a/tests/test_simple.py +++ b/tests/test_simple.py @@ -152,8 +152,7 @@ class UnshareIdmapTest(unittest.TestCase): pid = os.getpid() @linuxnamespaces.run_in_fork def setup() -> None: - linuxnamespaces.newgidmap(pid, [gidmap]) - linuxnamespaces.newuidmap(pid, [uidmap]) + linuxnamespaces.newidmaps(pid, [uidmap], [gidmap]) linuxnamespaces.unshare(linuxnamespaces.CloneFlags.NEWUSER) setup() self.assertEqual(os.getuid(), overflowuid) @@ -174,8 +173,7 @@ class UnshareIdmapTest(unittest.TestCase): pid = os.getpid() @linuxnamespaces.run_in_fork def setup() -> None: - linuxnamespaces.newgidmap(pid, [gidmap]) - linuxnamespaces.newuidmap(pid, [uidmap]) + linuxnamespaces.newidmaps(pid, [uidmap], [gidmap]) linuxnamespaces.unshare( linuxnamespaces.CloneFlags.NEWUSER | linuxnamespaces.CloneFlags.NEWNS -- cgit v1.2.3