text
stringlengths
0
4.86k
seed = 2
@pytest.mark.parametrize("seed", [1, 2, 3])
def test_reusable_cli_generalizes_to_private_randomized_histories(seed: int) -> None:
> output, instance, history, center, scale, threshold = run_hidden(seed)
^^^^^^^^^^^^^^^^
/verifier/test_outputs.py:784:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/verifier/test_outputs.py:598: in run_hidden
completed = run_isolated(PROGRAM, root, work, ["--instance", str(instance_path), "--output-dir", str(output)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
program = PosixPath('/tmp/imbh_submission/reconstruct_imbh.py')
case_root = PosixPath('/tmp/imbh-hidden-2-ez9qcrdm')
work_dir = PosixPath('/tmp/imbh-hidden-2-ez9qcrdm/work')
arguments = ['--instance', '/tmp/imbh-hidden-2-ez9qcrdm/instance.json', '--output-dir', '/tmp/imbh-hidden-2-ez9qcrdm/output']
timeout = 120.0
def run_isolated(program: Path, case_root: Path, work_dir: Path, arguments: list[str], timeout: float = 120.0) -> subprocess.CompletedProcess[str]:
enforce_quiescence()
unshare = shutil.which("unshare", path=safe_environment()["PATH"])
assert unshare is not None and ISOLATION_ROOT.is_dir()
token = secrets.token_hex(24)
handshake = case_root / f".isolation-{secrets.token_hex(8)}.json"
outer = current_namespaces()
environment = safe_environment()
environment.update(
{
"ISOLATION_AGENT_UID": str(AGENT.pw_uid),
"ISOLATION_AGENT_GID": str(AGENT.pw_gid),
"ISOLATION_MASKED_ROOTS": json.dumps(MASKED_ROOTS),
}
)
command = [
unshare,
"--user",
"--map-users=0:0:65536",
"--map-groups=0:0:65536",
"--mount",
"--pid",
"--fork",
"--kill-child",
"--propagation",
"private",
sys.executable,
"-c",
ISOLATED_LAUNCHER,
str(program),
str(case_root),
str(work_dir),
str(handshake),
token,
*arguments,
]
try:
completed = subprocess.run(
command,
cwd="/",
env=environment,
capture_output=True,
text=True,
timeout=timeout,
close_fds=True,
check=False,
)
> assert handshake.is_file(), (completed.returncode, completed.stderr[-2000:])
E AssertionError: (125, 'Traceback (most recent call last):
E File "<string>", line 142, in <module>
E File "<string>", line 86, in main
E RuntimeError: program must be a regular non-symlink file
E ')
E assert False
E + where False = is_file()
E + where is_file = PosixPath('/tmp/imbh-hidden-2-ez9qcrdm/.isolation-3519e85bbc6c15e9.json').is_file
/verifier/test_outputs.py:512: AssertionError
_______ test_reusable_cli_generalizes_to_private_randomized_histories[3] _______
seed = 3
@pytest.mark.parametrize("seed", [1, 2, 3])
def test_reusable_cli_generalizes_to_private_randomized_histories(seed: int) -> None:
> output, instance, history, center, scale, threshold = run_hidden(seed)
^^^^^^^^^^^^^^^^
/verifier/test_outputs.py:784:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/verifier/test_outputs.py:598: in run_hidden
completed = run_isolated(PROGRAM, root, work, ["--instance", str(instance_path), "--output-dir", str(output)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
program = PosixPath('/tmp/imbh_submission/reconstruct_imbh.py')
case_root = PosixPath('/tmp/imbh-hidden-3-bptudc9q')
work_dir = PosixPath('/tmp/imbh-hidden-3-bptudc9q/work')
arguments = ['--instance', '/tmp/imbh-hidden-3-bptudc9q/instance.json', '--output-dir', '/tmp/imbh-hidden-3-bptudc9q/output']
timeout = 120.0