← Về thư mục
tests/test_compute_trust_boundary.py
- mgr · function · L34-L46 — def mgr(tmp_path)
- _ssh_job · function · L49-L60 — def _ssh_job(mgr, job_id="job-abc")
- _Proc · class · L63-L84 — class _Proc
- init · method · L74-L78 — def init(self, returncode=0, stdout=b"", stderr=b"")
- wait · method · L80-L81 — def wait(self, timeout=None)
- kill · method · L83-L84 — def kill(self)
- _ssh_replies · function · L92-L121 — def _ssh_replies( probe: bytes, *, harvest: bytes = b"OPENAI4S_HARVEST empty\n", scp=0, transfer=None, )
- fake_popen · function · L112-L119 — def fake_popen(argv, **kw)
- _FakeCatProc · class · L124-L136 — class _FakeCatProc
- init · method · L127-L130 — def init(self, returncode: int, stdout: bytes = b"", stderr: bytes = b"")
- wait · method · L132-L133 — def wait(self, timeout=None)
- kill · method · L135-L136 — def kill(self)
- _fake_transfer · function · L139-L145 — def _fake_transfer(returncode: int, stdout: bytes = b"", stderr: bytes = b"")
- popen · function · L142-L143 — def popen(argv, **kw)
- _PrefixedStream · class · L148-L159 — class _PrefixedStream
- init · method · L151-L153 — def init(self, prefix: bytes, stream)
- read · method · L155-L159 — def read(self, size=-1)
- _BannerProc · class · L162-L179 — class _BannerProc
- init · method · L165-L169 — def init(self, proc, banner: bytes)
- returncode · method · L172-L173 — def returncode(self)
- wait · method · L175-L176 — def wait(self, timeout=None)
- kill · method · L178-L179 — def kill(self)
- test_ssh_missing_rc_is_unknown_not_done · function · L182-L192 — def test_ssh_missing_rc_is_unknown_not_done(mgr, monkeypatch)
- test_ssh_nonzero_rc_is_failed · function · L195-L199 — def test_ssh_nonzero_rc_is_failed(mgr, monkeypatch)
- test_ssh_zero_rc_succeeds · function · L202-L206 — def test_ssh_zero_rc_succeeds(mgr, monkeypatch)
- test_ssh_running_pid_reports_running · function · L209-L213 — def test_ssh_running_pid_reports_running(mgr, monkeypatch)
- test_ssh_probe_transport_failure_is_unknown · function · L216-L227 — def test_ssh_probe_transport_failure_is_unknown(mgr, monkeypatch)
- test_ssh_probe_timeout_is_unknown · function · L230-L235 — def test_ssh_probe_timeout_is_unknown(mgr, monkeypatch)
- boom · function · L231-L232 — def boom(a, *k)
- test_ssh_unparseable_rc_is_unknown · function · L238-L244 — def test_ssh_unparseable_rc_is_unknown(mgr, monkeypatch)
- test_ssh_log_harvest_failure_does_not_claim_clean_success · function · L247-L283 — def test_ssh_log_harvest_failure_does_not_claim_clean_success(mgr, monkeypatch)
- test_ssh_a_recovered_network_still_harvests_the_outputs · function · L286-L333 — def test_ssh_a_recovered_network_still_harvests_the_outputs(mgr, monkeypatch, tmp_path)
- test_ssh_failed_job_with_bad_harvest_stays_failed · function · L336-L351 — def test_ssh_failed_job_with_bad_harvest_stays_failed(mgr, monkeypatch)
- test_ssh_a_vanished_workdir_is_a_harvest_failure · function · L354-L367 — def test_ssh_a_vanished_workdir_is_a_harvest_failure(mgr, monkeypatch)
- fake_run · function · L359-L362 — def fake_run(argv, **kw)
- test_ssh_unknown_is_not_cached_onto_the_job · function · L370-L379 — def test_ssh_unknown_is_not_cached_onto_the_job(mgr, monkeypatch)
- test_ssh_submit_records_exit_code_atomically · function · L387-L404 — def test_ssh_submit_records_exit_code_atomically(mgr, monkeypatch)
- fake_run · function · L390-L392 — def fake_run(argv, **kw)
- _alive · function · L407-L414 — def _alive(pid: int) -> bool
- TestAgainstRealBash · class · L417-L894 — class TestAgainstRealBash
- local_ssh · method · L447-L485 — def local_ssh(self, mgr, monkeypatch, tmp_path)
- fake_popen · function · L459-L481 — def fake_popen(argv, **kw)
- _run_to_completion · method · L487-L495 — def _run_to_completion(self, mgr, command)
- test_the_job_script_actually_reaches_the_remote · method · L497-L505 — def test_the_job_script_actually_reaches_the_remote(self, local_ssh, tmp_path)
- test_command_not_found_is_failed_not_done · method · L507-L511 — def test_command_not_found_is_failed_not_done(self, local_ssh)
- test_the_recorded_pgid_is_the_job_s_real_process_group · method · L513-L546 — def test_the_recorded_pgid_is_the_job_s_real_process_group( self, local_ssh, tmp_path )
- test_the_recorded_pgid_is_not_the_test_runner_s · method · L548-L558 — def test_the_recorded_pgid_is_not_the_test_runner_s(self, local_ssh)
- test_cancel_kills_the_whole_remote_tree · method · L560-L581 — def test_cancel_kills_the_whole_remote_tree(self, local_ssh, tmp_path)
- test_a_deadline_is_actually_applied · method · L587-L602 — def test_a_deadline_is_actually_applied(self, local_ssh)
- test_a_host_without_timeout_refuses_the_submit · method · L608-L615 — def test_a_host_without_timeout_refuses_the_submit(self, local_ssh)
- test_no_deadline_leaves_the_job_unwrapped · method · L617-L624 — def test_no_deadline_leaves_the_job_unwrapped(self, local_ssh, tmp_path)
- test_explicit_nonzero_exit_is_preserved · method · L626-L629 — def test_explicit_nonzero_exit_is_preserved(self, local_ssh)
- test_killed_job_reports_unknown_not_success · method · L631-L645 — def test_killed_job_reports_unknown_not_success(self, local_ssh, tmp_path)
- test_declared_outputs_are_actually_harvested · method · L647-L676 — def test_declared_outputs_are_actually_harvested(self, local_ssh, tmp_path)
- test_a_declared_output_the_job_never_wrote_is_still_missing · method · L678-L697 — def test_a_declared_output_the_job_never_wrote_is_still_missing(self, local_ssh)
- test_an_output_declared_remote_is_not_owed · method · L699-L715 — def test_an_output_declared_remote_is_not_owed(self, local_ssh)
- test_an_output_declared_remote_is_never_moved · method · L717-L762 — def test_an_output_declared_remote_is_never_moved(self, local_ssh)
- test_an_oversized_output_stays_on_the_host_and_says_so · method · L764-L793 — def test_an_oversized_output_stays_on_the_host_and_says_so( self, local_ssh, monkeypatch )
- test_the_harvest_lands_where_save_artifact_will_accept_it · method · L795-L831 — def test_the_harvest_lands_where_save_artifact_will_accept_it( self, local_ssh, tmp_path )
- test_an_ordinary_exit_124_is_not_a_deadline · method · L833-L846 — def test_an_ordinary_exit_124_is_not_a_deadline(self, local_ssh)
- test_a_fired_deadline_leaves_its_own_marker · method · L852-L865 — def test_a_fired_deadline_leaves_its_own_marker(self, local_ssh, tmp_path)
- test_a_chatty_login_shell_cannot_impersonate_the_job · method · L867-L894 — def test_a_chatty_login_shell_cannot_impersonate_the_job( self, local_ssh, monkeypatch )
- noisy · function · L879-L887 — def noisy(argv, **kw)
- TestAgainstRealPosixSh · class · L897-L912 — class TestAgainstRealPosixSh(TestAgainstRealBash)
- TestAgainstRealDash · class · L915-L918 — class TestAgainstRealDash(TestAgainstRealBash)
- test_ssh_submit_propagates_failure · function · L921-L930 — def test_ssh_submit_propagates_failure(mgr, monkeypatch)
- test_scp_download_failure_raises_instead_of_claiming_a_file · function · L938-L947 — def test_scp_download_failure_raises_instead_of_claiming_a_file(mgr, monkeypatch)
- test_scp_upload_failure_raises · function · L950-L967 — def test_scp_upload_failure_raises(mgr, monkeypatch, tmp_path)
- test_scp_success_returns_path · function · L970-L975 — def test_scp_success_returns_path(mgr, monkeypatch, tmp_path)
- test_a_download_cannot_escape_the_workspace · function · L983-L997 — def test_a_download_cannot_escape_the_workspace(mgr, monkeypatch)
- test_a_symlink_cannot_redirect_the_write · function · L1000-L1015 — def test_a_symlink_cannot_redirect_the_write(mgr, monkeypatch, tmp_path)
- test_a_hostile_remote_path_is_rejected · function · L1019-L1024 — def test_a_hostile_remote_path_is_rejected(mgr, monkeypatch, bad)
- test_an_oversized_upload_is_refused · function · L1027-L1044 — def test_an_oversized_upload_is_refused(mgr, monkeypatch, tmp_path)
- test_an_upload_of_a_missing_file_is_refused · function · L1047-L1057 — def test_an_upload_of_a_missing_file_is_refused(mgr, monkeypatch)
- test_direct_surface_calls_are_audited · function · L1060-L1073 — def test_direct_surface_calls_are_audited(mgr, monkeypatch)
- test_cancel_that_never_landed_is_not_a_cancellation · function · L1076-L1089 — def test_cancel_that_never_landed_is_not_a_cancellation(mgr, monkeypatch)
- _byoc_mgr · function · L1097-L1113 — def _byoc_mgr(mgr, reply)
- test_byoc_missing_exit_code_is_unknown_not_done · function · L1116-L1123 — def test_byoc_missing_exit_code_is_unknown_not_done(mgr)
- test_byoc_unknown_keeps_the_job_in_the_live_count · function · L1126-L1135 — def test_byoc_unknown_keeps_the_job_in_the_live_count(mgr)
- test_byoc_unparseable_phase_surfaces_helper_diagnostic · function · L1138-L1149 — def test_byoc_unparseable_phase_surfaces_helper_diagnostic(mgr)
- test_byoc_zero_exit_succeeds · function · L1152-L1154 — def test_byoc_zero_exit_succeeds(mgr)
- test_byoc_nonzero_exit_is_failed · function · L1157-L1163 — def test_byoc_nonzero_exit_is_failed(mgr)
- test_byoc_deadline_sentinel_is_timed_out · function · L1166-L1170 — def test_byoc_deadline_sentinel_is_timed_out(mgr)
- test_byoc_job_timeout_sentinel_is_timed_out · function · L1173-L1177 — def test_byoc_job_timeout_sentinel_is_timed_out(mgr)
- test_byoc_harvest_failed_phase_is_not_a_clean_success · function · L1180-L1196 — def test_byoc_harvest_failed_phase_is_not_a_clean_success(mgr)
- test_byoc_not_ready_is_running · function · L1199-L1201 — def test_byoc_not_ready_is_running(mgr)
- test_helper_wedge_is_killed_and_reported_unknown · function · L1209-L1231 — def test_helper_wedge_is_killed_and_reported_unknown(mgr, monkeypatch, tmp_path)
- _Wedged · class · L1213-L1223 — class _Wedged
- init · method · L1216-L1217 — def init(self, a, *k)
- wait · method · L1219-L1220 — def wait(self, timeout=None)
- kill · method · L1222-L1223 — def kill(self)
- test_confinement_enforce_fails_closed_where_no_boundary_exists · function · L1234-L1252 — def test_confinement_enforce_fails_closed_where_no_boundary_exists(mgr, monkeypatch)
- test_confinement_status_matches_what_can_actually_be_applied · function · L1255-L1271 — def test_confinement_status_matches_what_can_actually_be_applied(mgr, monkeypatch)
- test_confinement_mode_rejects_garbage · function · L1274-L1279 — def test_confinement_mode_rejects_garbage(mgr, monkeypatch)
- _tar_with · function · L1287-L1291 — def _tar_with(tmp_path, build)
- _add_bytes · function · L1294-L1297 — def _add_bytes(tf, name, data=b"x")
- test_archive_traversal_is_rejected · function · L1300-L1304 — def test_archive_traversal_is_rejected(tmp_path)
- test_archive_absolute_path_is_rejected · function · L1307-L1310 — def test_archive_absolute_path_is_rejected(tmp_path)
- test_archive_symlink_is_rejected · function · L1313-L1322 — def test_archive_symlink_is_rejected(tmp_path)
- build · function · L1314-L1318 — def build(tf)
- test_archive_hardlink_is_rejected · function · L1325-L1335 — def test_archive_hardlink_is_rejected(tmp_path)
- build · function · L1326-L1331 — def build(tf)
- test_archive_device_node_is_rejected · function · L1338-L1346 — def test_archive_device_node_is_rejected(tmp_path)
- build · function · L1339-L1342 — def build(tf)
- test_archive_fifo_is_rejected · function · L1349-L1357 — def test_archive_fifo_is_rejected(tmp_path)
- build · function · L1350-L1353 — def build(tf)
- test_archive_nul_name_guard · function · L1360-L1373 — def test_archive_nul_name_guard(tmp_path)
- test_archive_member_count_cap · function · L1376-L1383 — def test_archive_member_count_cap(tmp_path)
- build · function · L1377-L1379 — def build(tf)
- test_archive_decompression_bomb_is_rejected · function · L1386-L1390 — def test_archive_decompression_bomb_is_rejected(tmp_path)
- test_archive_lying_header_is_caught_during_streaming · function · L1393-L1403 — def test_archive_lying_header_is_caught_during_streaming(tmp_path)
- test_archive_rejection_leaves_destination_untouched · function · L1406-L1416 — def test_archive_rejection_leaves_destination_untouched(tmp_path)
- build · function · L1407-L1409 — def build(tf)
- test_archive_happy_path_extracts · function · L1419-L1430 — def test_archive_happy_path_extracts(tmp_path)
- build · function · L1420-L1422 — def build(tf)
- test_harvest_of_hostile_archive_is_not_a_success · function · L1433-L1452 — def test_harvest_of_hostile_archive_is_not_a_success(mgr, tmp_path)
- test_an_ssh_alias_cannot_be_read_as_an_option · function · L1455-L1479 — def test_an_ssh_alias_cannot_be_read_as_an_option(mgr)
- test_job_history_answers_only_about_this_session_s_jobs · function · L1482-L1510 — def test_job_history_answers_only_about_this_session_s_jobs(mgr)