summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2025-06-12 10:58:24 +0200
committerHelmut Grohne <helmut@subdivi.de>2025-06-12 10:58:24 +0200
commit76375ef872b23c7b0307eab2780ca0d30bf78d27 (patch)
tree2bbb49f6cd8fa1896a28c501b9409b7866d47d7e /tests
parentb12d8dcd56e546e87b23e7481deef90bbdb0df03 (diff)
downloadpython-linuxnamespaces-76375ef872b23c7b0307eab2780ca0d30bf78d27.tar.gz
run_in_fork: allow starting the function immediately
Doing so skips creating the EventFD.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_simple.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_simple.py b/tests/test_simple.py
index 2b5252f..38a253d 100644
--- a/tests/test_simple.py
+++ b/tests/test_simple.py
@@ -214,7 +214,7 @@ class UnshareTest(unittest.TestCase):
| linuxnamespaces.CloneFlags.NEWPID
)
linuxnamespaces.newuidmap(-1, [idmap], False)
- @linuxnamespaces.run_in_fork
+ @linuxnamespaces.run_in_fork.now
def setup() -> None:
self.assertEqual(os.getpid(), 1)
linuxnamespaces.mount("proc", "/proc", "proc")
@@ -307,7 +307,7 @@ class UnshareIdmapTest(unittest.TestCase):
os.setregid(0, 0)
linuxnamespaces.mount("tmpfs", "/mnt", "tmpfs")
os.mkdir("/mnt/dev")
- @linuxnamespaces.run_in_fork
+ @linuxnamespaces.run_in_fork.now
def test() -> None:
linuxnamespaces.populate_dev("/", "/mnt")
test()