mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
test(handoff): held-exit tests require the program's own exit status
This commit is contained in:
1 parent
6d0442ef4c
commit
cdbed1bcb8
1 file changed
+2
-2
@@ -2062,7 +2062,7 @@ class NativeHookHandoffTest(unittest.TestCase):
|
||||
self.addCleanup(forker.wait) # a zombie once it exits: kill() alone would call it alive
|
||||
start = time.monotonic()
|
||||
run, table = self.start_worker_exit("takenpidfd", forker.pid, 4, nofds=True)
|
||||
run.wait(timeout=60)
|
||||
self.assertEqual(9, run.wait(timeout=60)) # its own exit, not a signal
|
||||
took = time.monotonic() - start
|
||||
result = self.printed(run)
|
||||
self.assertEqual("1", result.get("pidfd"), result)
|
||||
@@ -2120,7 +2120,7 @@ class NativeHookHandoffTest(unittest.TestCase):
|
||||
forker = subprocess.Popen(["sleep", "1"])
|
||||
self.addCleanup(forker.wait) # not reaped until the end: a zombie meanwhile
|
||||
run, table = self.start_worker_exit("takengone", forker.pid, 4) # TAKEN
|
||||
run.wait(timeout=30)
|
||||
self.assertEqual(9, run.wait(timeout=30)) # its own exit, not a signal
|
||||
stat = Path("/proc/%d/stat" % forker.pid).read_text().rsplit(")", 1)[1].split()[0]
|
||||
self.assertEqual("Z", stat)
|
||||
# nothing written into an entry another process holds, and no wait past the parent's exit
|
||||
|
||||
Reference in new issue
Block a user