Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
charmoniumQ committed Feb 14, 2024
1 parent fa5cd58 commit 16033e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions benchexec/containerexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,16 @@ def __init__(
self._uid = (
uid
if uid is not None
else container.CONTAINER_UID if container_system_config else os.getuid()
else container.CONTAINER_UID
if container_system_config
else os.getuid()
)
self._gid = (
gid
if gid is not None
else container.CONTAINER_GID if container_system_config else os.getgid()
else container.CONTAINER_GID
if container_system_config
else os.getgid()
)
self._allow_network = network_access
self._env_override = {}
Expand Down
2 changes: 2 additions & 0 deletions benchexec/test_runexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ def test_parent_fns(self):
self.skipTest("missing /bin/sh")
parent_setup_ran = False
parent_cleanup_ran = False

def parent_setup_fn(*, grandchild_pid, child_pid, **kwargs):
# I don't want to require psutil just for this
# I'll just read the procfs
Expand All @@ -1112,6 +1113,7 @@ def parent_cleanup_fn(parent_setup, exit_code, path):
assert parent_setup == 12345
nonlocal parent_cleanup_ran
parent_cleanup_ran = True

self.execute_run(
"/bin/sh",
"-c",
Expand Down

0 comments on commit 16033e5

Please sign in to comment.