Skip to content

Commit d0a5dd3

Browse files
committed
Close & unlick SharedMemory object in tests
Not doing so outputs a warning about leaking SharedMemory, which fails the test
1 parent 35943c0 commit d0a5dd3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_nsjail.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ def test_multiprocessing_shared_memory(self):
458458
459459
shm = SharedMemory(create=True, size={shm_size})
460460
shm.buf[:{buffer_size}] = bytearray([1] * {buffer_size})
461+
shm.close()
462+
shm.unlink()
461463
"""
462464
).strip()
463465

0 commit comments

Comments
 (0)