ci: the host oracle judges every host path by one rule, red only if in all measured launches of one engine and in none of the other, and lists the rest

This commit is contained in:
feder-cr committed 2026-11-23 06:23:07 +01:00
1 parent 583516ca34
commit 3c09b863bf
4 files changed
+152 -345

No files matched your search

+3 -3
View File
@@ -14,8 +14,8 @@
{"id": "wrapper.e2e.fakeweb", "giro": "G2", "os": ["linux", "windows"], "min_tests": 4, "exact": true, "tests": ["tests/test_fakeweb_p2_e2e.py", "tests/test_fakeweb_p4_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The fake web, offline: our browser on the hard pages (profile P2: a reused routed page reaches networkidle every time, also under a load of three other browsers; the other site is another process) and on the 17-step journey of a person (profile P4), each judged against what stock Firefox does, as tests/fakeweb/pages.json declares it. 4 = 3 + 1. Stock itself is held to that declaration, and compared with ours step by step, by scripts/run_fakeweb.py in .github/workflows/fakeweb.yml. Needs the candidate binary (STEALTHFOX_E2E_BINARY)."},
{"id": "wrapper.e2e.fontconfig", "giro": "G2", "os": ["linux"], "min_tests": 2, "exact": true, "tests": ["tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py"], "marker": "e2e", "needs_root": false, "linux_only": "Fontconfig exists only on Linux: the parent of the engine shows <GRE>/fonts to it (FcConfigAppFontAddDir) to rebuild a font from a path and a face index. On Windows DirectWrite opens the file from its path, with no folder to scan and no cache to read, so this test has no Windows counterpart.", "note": "2 = (1) the stand-in that runs the engine under strace stays in the engine's place, as the core launches it (the leader of a process group of its own): a fake engine with a child, no browser; the process the launcher holds lives as long as the fake engine, and the group killed holds strace and the child (the stand-in that exec'd setsid forked and exited 0 at once: candidate 44161687675); (2) the warm launch of the parent reads the bundle from fontconfig's cache and does not scan it again (from firefox-66, engine_at_least). Two launches under strace with the same XDG_CACHE_HOME of the test, the first cold and the second warm: the cold parent opens every font file of <GRE>/fonts (the folder as the disk lists it) before any page and fontconfig writes its cache; the warm parent does not open every one of them, and it opens a *.cache-* file of fontconfig (a few files are opened to be used, so the verdict asks about the whole folder, as a scan does). Scan and drawing are told apart by position: only what the parent opens before the first page counts (the opens that draw are written as after_startup). Evidence in RUNNER_TEMP/invpw-evidence/fontconfig-cache: the interval and the number of opens of the bundle, the names of the files of the bundle each launch opened before the first page, the size of the cache file, the VmRSS of the parent after about:blank and after a page with every family, and a third launch with gfx.bundled-fonts.activate=0 (the behaviour before), which is evidence only. Needs strace on the runner: without it both are red, not skipped. No threshold."},
{"id": "wrapper.unit.compositing", "giro": "G1", "os": ["linux", "windows"], "min_tests": 30, "exact": true, "tests": ["tests/test_the_page_bytes_reference_compares_decoded_pixels.py"], "marker": "unit", "needs_root": false, "note": "The helpers of wrapper.e2e.compositing on known inputs, no browser: the PNG compared on decoded pixels (another deBG chunk and compression are the same, one pixel is not, every scanline filter), the comparison with a reference (changed, missing and extra keys named, the entry to record), the type of an engine process, an engine process known by its executable and not by the name it gives itself (Linux), and the CPU of a window, and the shape of the committed Windows reference, and the box cut out of a screenshot (its pixels, a box outside the picture refused, written as a PNG and read back, two boxes told apart by a pixel that is named, the pixels that are not grey)."},
{"id": "wrapper.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 3353, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_file_chooser_is_never_dropped_in_silence.py", "tests/test_a_frame_tap_needs_a_context_with_touch.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_screenshot_sends_its_scale_to_the_engine.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_streamed_upload_is_staged_in_the_session.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_ab_host.py", "tests/test_ab_network.py", "tests/test_ab_oracle.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_host_gate_ab.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_poison_host.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reacLine truncated
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 3354, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_file_chooser_is_never_dropped_in_silence.py", "tests/test_a_frame_tap_needs_a_context_with_touch.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_screenshot_sends_its_scale_to_the_engine.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_streamed_upload_is_staged_in_the_session.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_ab_host.py", "tests/test_ab_network.py", "tests/test_ab_oracle.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_host_gate_ab.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_poison_host.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/tesLine truncated
{"id": "wrapper.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 3370, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_file_chooser_is_never_dropped_in_silence.py", "tests/test_a_frame_tap_needs_a_context_with_touch.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_screenshot_sends_its_scale_to_the_engine.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_streamed_upload_is_staged_in_the_session.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_ab_host.py", "tests/test_ab_host_aa_stable.py", "tests/test_ab_network.py", "tests/test_ab_oracle.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_host_gate_ab.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_poison_host.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transpLine truncated
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 3371, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_file_chooser_is_never_dropped_in_silence.py", "tests/test_a_frame_tap_needs_a_context_with_touch.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_screenshot_sends_its_scale_to_the_engine.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_streamed_upload_is_staged_in_the_session.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_ab_host.py", "tests/test_ab_host_aa_stable.py", "tests/test_ab_network.py", "tests/test_ab_oracle.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_host_gate_ab.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_poison_host.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_transport.py", "tests/test_key_delay_rLine truncated
{"id": "wrapper.e2e.securitystate", "giro": "G2", "os": ["linux", "windows"], "min_tests": 4, "exact": true, "tests": ["tests/test_security_state_engine_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The security state the core declares, against the engine: the engine launched directly in its generate mode makes what it is given (the contract's result, security_state/ with the bytes of the full filter and of the delta, the core's own validation of it); a normal launch declares no pref of the mode and re-imports nothing; a certificate that Mozilla's CRLite test data say is revoked in a delta is refused at the first navigation (SEC_ERROR_REVOKED_CERTIFICATE) while a valid one loads, and the revoked one loads when the ready directory has no data; a ready directory with no or an empty security_state/ starts. Certificates made on the run (a fresh root trusted in cert9.db by the engine's own xpcshell, Mozilla's default test key as the key of CN=int), servers on loopback, no network. Red on firefox-67 (no generate mode)."},
{"id": "wrapper.e2e.suite.linux.1", "giro": "G2", "os": ["linux"], "min_tests": 415, "exact": true, "tests": ["tests/test_a_closed_browser_leaves_the_others_alone_e2e.py", "tests/test_a_context_that_ends_leaves_no_process_e2e.py", "tests/test_a_cors_preflight_is_not_a_request_of_the_page_e2e.py", "tests/test_a_declared_webgl_extension_survives_its_use_e2e.py", "tests/test_a_granted_permission_is_the_one_the_page_asks_for_e2e.py", "tests/test_a_held_ice_port_blinds_the_loopback_checks_e2e.py", "tests/test_a_launch_without_a_session_gets_one_e2e.py", "tests/test_a_left_documents_body_is_evicted_e2e.py", "tests/test_a_mouse_click_makes_one_mousemove_on_its_point_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py", "tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py", "tests/test_a_screenshot_honours_its_scale_e2e.py", "tests/test_a_served_browser_answers_a_plain_client_e2e.py", "tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py", "tests/test_accept_language_on_the_wire_e2e.py", "tests/test_browser_output_is_drained.py", "tests/test_click_rhythm.py", "tests/test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py", "tests/test_control_a_selects_all_in_a_field_e2e.py", "tests/test_cross_origin_iframe.py", "tests/test_declared_host_network_e2e.py", "tests/test_detectors_e2e.py", "tests/test_e2e.py", "tests/test_element_handle_actions.py", "tests/test_element_screenshot_e2e.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_file_chooser.py", "tests/test_fingerprint_surface.py", "tests/test_fission_frames_history_and_processes_e2e.py", "tests/test_fission_frames_workers_storage_and_special_frames_e2e.py", "tests/test_frames_outlive_the_back_forward_cache_e2e.py", "tests/test_goto_networkidle_after_spa_e2e.py", "tests/test_goto_script_redirect_e2e.py", "tests/test_hidden_display_linux.py", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_the_ice_name_of_a_context_goes_by_the_proxy_of_that_context", "tests/test_ignore_https_errors_e2e.py", "tests/test_injected_node_surface.py", "tests/test_juggler_connection.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transport.py", "tests/test_navigation_across_processes_e2e.py", "tests/test_navigation_response.py", "tests/test_networkidle_reaches_the_client_e2e.py", "tests/test_oop_frame_element.py", "tests/test_oop_frame_geometry.py", "tests/test_page_number_follows_the_call.py", "tests/test_persistent_profile_keeps_state.py", "tests/test_pointer_position.py", "tests/test_popups_reach_the_client_e2e.py", "tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py", "tests/test_realness_behind_a_declared_exit_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_route_header_order_e2e.py", "tests/test_same_document_goto_e2e.py", "tests/test_screencast.py", "tests/test_screencast_stop_e2e.py", "tests/test_screenshot_looks_where_you_are.py", "tests/test_security_state_engine_e2e.py", "tests/test_service_worker.py", "tests/test_service_worker_controller_e2e.py", "tests/test_set_offline_e2e.py", "tests/test_shadow_trusted_input.py", "tests/test_strict_and_force.py", "tests/test_the_callers_code_is_not_counted_e2e.py", "tests/test_the_device_enumeration_takes_the_declared_time_e2e.py", "tests/test_the_engine_is_born_in_the_job_e2e.py::test_a_launch_scans_no_process_of_the_machine", "tests/test_the_engine_is_born_in_the_job_e2e.py::test_after_close_no_process_of_the_session_is_left", "tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_trial_does_not_act.py", "tests/test_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_ua_widget_not_selectable.py", "tests/test_voices_e2e.py", "tests/test_wait_for_function.py", "tests/test_webgl_draws_on_the_engine_s_own_gl_e2e.py", "tests/test_webgl_noise_active.py", "tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_not_blocked_behind_tcp_only_socks", "tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away", "tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_Line truncated
{"id": "wrapper.e2e.suite.linux.2", "giro": "G2", "os": ["linux"], "min_tests": 411, "exact": true, "tests": ["tests/test_a_click_waits_for_the_navigation_it_plans_e2e.py", "tests/test_a_context_init_script_runs_once_e2e.py", "tests/test_a_drag_keeps_its_buttons_pressed_e2e.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_goto_to_a_response_with_no_document_ends_e2e.py", "tests/test_a_keepalive_request_reaches_the_client_e2e.py", "tests/test_a_latin_letter_on_a_cyrillic_persona_e2e.py", "tests/test_a_page_cannot_probe_the_juggler_e2e.py", "tests/test_a_page_that_moves_on_e2e.py", "tests/test_a_pointer_event_is_handled_before_the_call_returns_e2e.py", "tests/test_a_request_says_what_it_is_e2e.py", "tests/test_a_worker_comes_back_with_its_page_from_the_cache_e2e.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_isolated_page_and_the_next_e2e.py", "tests/test_bypass_csp_e2e.py", "tests/test_caller_world_handles_e2e.py", "tests/test_canvas_reads_as_drawn.py", "tests/test_canvas_render_stealth.py", "tests/test_context_locale_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_download_is_intercepted_e2e.py", "tests/test_drag_motion.py", "tests/test_expose_binding_e2e.py", "tests/test_fakeweb_p4_e2e.py", "tests/test_fingerprint_consistency.py", "tests/test_fission_frames_dialogs_downloads_popups_e2e.py", "tests/test_fission_frames_route_and_bindings_e2e.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fission_iframe_crash_e2e.py", "tests/test_fission_strategy1_bench.py", "tests/test_goto_to_the_same_url_e2e.py", "tests/test_http3_through_the_proxy_e2e.py", "tests/test_input_is_born_before_the_page_sees_it_e2e.py", "tests/test_juggler_actions.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py::test_a_javascript_that_THROWS_arrives_as_an_error_not_as_None", "tests/test_juggler_injected.py::test_actionability_DISTINGUISHES_instead_of_always_saying_yes", "tests/test_juggler_injected.py::test_reads_that_make_no_sense_are_REJECTED", "tests/test_juggler_injected.py::test_states_DISCRIMINATE_instead_of_always_saying_true", "tests/test_juggler_injected.py::test_the_DOM_READING_group", "tests/test_juggler_injected.py::test_the_selector_engines_respond", "tests/test_juggler_injected.py::test_the_text_reads", "tests/test_juggler_lifecycle_e2e.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_long_session_e2e.py", "tests/test_mouse.py", "tests/test_mouse_events_keep_their_values_e2e.py", "tests/test_new_page_defaults.py", "tests/test_popup_destinations_e2e.py", "tests/test_popup_pages.py", "tests/test_proxy_http_auth_e2e.py", "tests/test_proxy_reaches_the_browser.py", "tests/test_proxy_socks_auth_e2e.py", "tests/test_requestless_navigation.py", "tests/test_route_abort_code.py", "tests/test_route_e2e.py", "tests/test_route_post_data_e2e.py", "tests/test_route_sends_a_navigation_elsewhere_e2e.py", "tests/test_route_superseded_e2e.py", "tests/test_same_document_navigation.py", "tests/test_screenshot_of_text_returns_linux_e2e.py", "tests/test_scroll_into_view.py", "tests/test_scroll_only_if_needed_e2e.py", "tests/test_service_workers_blocked.py", "tests/test_set_input_files_payloads.py", "tests/test_software_compositing_is_declared_e2e.py", "tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py", "tests/test_the_callers_code_runs_once_e2e.py", "tests/test_the_close_returns_when_the_browser_has_exited_e2e.py", "tests/test_the_favicon_stays_out_of_sight_e2e.py", "tests/test_the_font_list_is_the_bundle_e2e.py", "tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py", "tests/test_the_scheme_is_the_personas_e2e.py", "tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_when_the_exit_of_the_lab_is_loopback", "tests/test_typing_a_character_without_a_key_e2e.py", "tests/test_wait_for_timeout.py", "tests/test_web_fonts_of_closed_contexts_e2e.py"], "marker": "e2e", "needs_root": false, "windows_twin": "wrapper.e2e.suite.windows.2", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 2 rows of linux are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 564 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapLine truncated
@@ -27,6 +27,6 @@
{"id": "wrapper.e2e.suite.windows.control_a", "giro": "G2", "os": ["windows"], "min_tests": 20, "exact": true, "tests": ["tests/test_control_a_selects_all_in_a_field_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.1", "note": "The keyboard shortcut Control+A selects all in a field (5 ways to press it x an input and a textarea, in-process and served to the stock client), alone on its own Windows runner (windows-latest), as e2e.yml runs it on the published engine: the Windows keyboard of a real user is what it needs. The same file is in one of wrapper.e2e.suite.windows.1..4 and in wrapper.e2e.suite.linux.1."},
{"id": "wrapper.e2e.ab_oracle", "giro": "G2", "os": ["linux", "windows"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_oracle_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Same seed, same bytes: the engine published as firefox-68 against the candidate, on one machine, with the same core and wrapper, after the control: the published engine against ITSELF (the A/A; a difference is a broken control, exit 2, and the A/B is not run). On a pull request (no candidate: INVPW_BINARY_PATH is the published engine, no INVISIBLE_SEAL_FILE) the A/A is the whole test, on the first two seeds of the candidate set (all five when the pull request changes a file of this oracle: the step of e2e.yml that runs scripts/ci_ab_pr_seeds.py exports AB_ORACLE_PR_SEEDS), and saves both dumps and the diff under $AB_ORACLE_OUT or $RUNNER_TEMP/invpw-evidence/ab-oracle. scripts/ci_ab_oracle.py runs the host gate's dump (scripts/ci_host_gate.py dump: the persona seeds of ci/persona-seeds.json, each at its own DPR with nothing pinned, the whole page of scripts/host_gate; the `candidate` set of 5 seeds that reach every webgl renderer and every DPR, or with AB_ORACLE_SEED_SET=final and AB_ORACLE_SHARD=i/n the 20 seeds that reach every value of every dimension split over n jobs) twice, once with the firefox-68 binary (the release's seal.json, then the core's own download.ensure_binary under that seal: the archive's sha256 is checked against the seal) and once with the candidate binary of the leg under its own seal, and compares every leaf of every visit: the only differences allowed are the `noise` entries of scripts/host_gate/exceptions.json and the diag. keys; anything else is red with the leaf, the two values and the seed; fewer leaves than the host gate's reference holds (16439 per visit; a DPR the reference does not record is held to the least of those it does) is red. The files (dump-68.json, dump-68-again.json, diff-a-a.json and, with a candidate, dump-candidate.json and diff.json) are the artifact ab-oracle-<os> of the leg. 1 = the one test; the comparator's own cases (51, the A/A's among them) are in tests/test_ab_oracle.py, the persona seeds' (15) in tests/test_persona_cover.py, in the rows of the whole unit suite. Needs the engine's binary (INVPW_BINARY_PATH) and, for the A/B, the candidate's seal (INVISIBLE_SEAL_FILE) and the network (the release assets of firefox-68). The engine of the candidate must accept the core of the leg and the 68 engine must accept it too: a core that declares something the published engine refuses is a red of this suite, not of the engine."},
{"id": "wrapper.e2e.ab_network", "giro": "G2", "os": ["linux", "windows"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_network_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Network A/B oracle: the P4 journey, HTTPS h1/h2 (ClientHello, h2 frames, header order), HTTP/3 (transport parameters, H3 SETTINGS), WebRTC through the coherent SOCKS5 lab gateway, DNS through the fake DoH, and an idle launch; transcripts compared leaf by leaf, direct connections red on either side. A/A first (the published engine twice: a difference is a broken control; ci/ab-network-volatile.json holds the leaves the A/A proved volatile, and may only shrink), then the published engine against the candidate. Without a candidate (a PR's e2e) the A/A alone, on the first seed (all five when the pull request changes a file of this oracle: AB_NETWORK_PR_SEEDS), in jobs of its own in e2e.yml on Linux and on Windows (the shared e2e jobs leave this file out)."},
{"id": "wrapper.e2e.ab_host", "giro": "G2", "os": ["linux", "windows"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_host_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Host A/B oracle: the whole TRACE of a closed run, from the launch to the exit of the browser, after the same journey. Compared: the processes by kind (the parent, -contentproc type, sandboxingKind, isForBrowser, the helpers by what they ran) with their count, except for the kinds of type tab whose count follows the idle time (only their presence counts), and the SET of host paths the tree touched, identical with no exception; what is ours (the package, the profile and temp dirs of the launch, the run cache, its own shared memory) leaves the comparison as a class. Linux: strace of the whole tree. Windows: the process-creation audit (event 4688, with the command line) and an ETW file trace of Kernel-File, which need an administrator. It has jobs of its own in e2e.yml on Linux and on Windows (a measurement shares the machine with no other browser), and its footprints keep the lifecycle of the tree (who started and ended when, how) and how the close ended. Each engine run starts with a discarded warm-up launch whose trace is kept and listed apart (what only the warm-up did, with the process that did it); only the tree of the launch is compared (a Windows service's paths are counted by process name and left out), and a path or a kind that differs names the processes to blame. A/A first, then the published engine against the candidate; the one declared difference (Linux glxtest, gone on the 69) is in ci/ab-host-expected.json, applied by kind, a list that may only shrink. There is no list of noise. Without a candidate (a PR e2e) the A/A alone, on the first two seeds (all five when the pull request changes a file of this oracle: AB_HOST_PR_SEEDS)."},
{"id": "wrapper.e2e.ab_host", "giro": "G2", "os": ["linux", "windows"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_host_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Host A/B oracle: the whole TRACE of a closed run, from the launch to the exit of the browser, after the same journey. Compared: the processes by kind (the parent, -contentproc type, sandboxingKind, isForBrowser, the helpers by what they ran) with their count, except for the kinds of type tab whose count follows the idle time (only their presence counts), and the host paths the tree touched, judged by one rule (red if and only if a path is in all the measured launches of one engine and in no launch of the other, the long launches included; every other path that differs is listed in not-judged.json, not judged); what is ours (the package, the profile and temp dirs of the launch, the run cache, its own shared memory) leaves the comparison as a class. Linux: strace of the whole tree. Windows: the process-creation audit (event 4688, with the command line) and an ETW file trace of Kernel-File, which need an administrator. It has jobs of its own in e2e.yml on Linux and on Windows (a measurement shares the machine with no other browser), and its footprints keep the lifecycle of the tree (who started and ended when, how) and how the close ended. Each engine run starts with a discarded warm-up launch whose trace is kept and listed apart (what only the warm-up did, with the process that did it); only the tree of the launch is compared (a Windows service's paths are counted by process name and left out), and a path or a kind that differs names the processes to blame. A/A first, then the published engine against the candidate; the one declared difference (Linux glxtest, gone on the 69) is in ci/ab-host-expected.json, applied by kind, a list that may only shrink. There is no list of noise. Without a candidate (a PR e2e) the A/A alone, on the first two seeds (all five when the pull request changes a file of this oracle: AB_HOST_PR_SEEDS)."},
{"id": "wrapper.e2e.ab_host_crash", "giro": "G2", "os": ["linux"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_host_crash_linux_e2e.py"], "marker": "e2e", "needs_root": false, "linux_only": "A signal sent to the parent of the browser with os.kill, the core the kernel writes and gdb reads, and the signal line of strace exist on Linux only: Windows has no counterpart of this test. What a Windows launch that did not end with 0 leaves (the `.extra` files and the minidump names, read from the crash folders) is held by the unit tests of the recorder with fake launches, and by every Windows leg of the three oracles, which are red on any parent that does not end with 0.", "note": "The recorder of the host oracle, tested on a launch that dies on purpose: scripts/ci_ab_host.py crash-probe launches the engine once under the oracle's stand-in (strace of the tree, cores enabled, a crash watcher), sends SIGSEGV to the browser's parent with os.kill and closes it as the oracle closes its launches; the test passes when the oracle reports RED (exit 1, `FAIL the parent process exited with code ...: seed N, launch crash`) and the artifact (RUNNER_TEMP/invpw-evidence/ab-host-crash) holds the signal line of the strace log (strace-signals.txt, strace-tail.txt), the core run through gdb (gdb-core.*.txt: `thread apply all bt`, the MOZ_CRASH reason, `info sharedlibrary`), the build ids and what the collectors did not find (said.txt). It fails when the oracle says green for a launch that died, when the evidence is missing and when the probe did not run; the red of the probe does not make the job red. It runs in the job of the host oracle on Linux (e2e-host: strace, gdb and elfutils installed, kernel.core_pattern pointed at INVPW_CORE_DIR), after the A/A, and is left out of the shared e2e job (OWN_JOB_FILES)."}
]
+111 -172
View File
@@ -18,8 +18,12 @@ Three things are compared, over the whole trace:
`-isForBrowser` / `-notForBrowser`, and the helpers (glxtest, pingsender, ...) by what they ran. Every kind and its COUNT must be identical,
with one exception: for the content processes of type `tab` only the presence of the kind counts, because how many are alive follows the idle
time (a spare process is prelaunched after a delay and closed after a grace period);
* the files: every path the tree touched (opened, stat'ed, accessed, read as a link, executed), classified `ours` or `host`. The SET of host
paths must be identical, no exception. `ours` leaves the comparison as a class (OURS below: reading its own package is not touching the host);
* the files: every path the tree touched (opened, stat'ed, accessed, read as a link, executed), classified `ours` or `host`. ONE rule judges the host paths, in the A/A and in the
A/B, on Linux and on Windows, the system modules and the shortcut inventory included (`file_rule`): a path is red if and only if it is in ALL the measured launches (the warm-up and
the seeds) of one engine and in NO launch of the other (its idle and bare launches included). Every other path that is not in the same share of the launches of both engines is LISTED, not judged: the log and the file
`not-judged-a-a.json` / `not-judged.json` of the artifact give, per path, in how many launches of how many each engine has it (measured and long) and the processes that touched it,
and mark `watch` the paths in at least half of the launches of one engine and in none of the other's. `ours` leaves the comparison as a class (OURS below: reading its own package is
not touching the host);
* the network, per kind (Linux): every NETLINK socket the tree opens, by protocol (NETLINK_ROUTE, NETLINK_KOBJECT_UEVENT, ...), with the requests
it sends on it (RTM_GETLINK, RTM_GETADDR, ...) and the multicast groups it binds to, and every connect or send towards a PUBLIC address, with
the transport, the family, the address and the port. The SET per kind must be identical, no exception, like the host paths. A destination that
@@ -37,14 +41,18 @@ after the warm-up is red.
The exit pings (`firefox --backgroundtask pingsender`, through the session's route, never the separate `pingsender[.exe]`) leave only when Mozilla's `canUpload()` is
true (TelemetrySend.sys.mjs:1083), which the core's declared terms of use make true from the start: in a measured launch their
number is 0 or 3 (the three pings of a first run, spawned by the parent), anything else is red. The paths and the destinations only they touch are compared when they are
number is 0 or 3 (the three pings of a first run, spawned by the parent), anything else is red. The paths only they touch are paths like any other (`file_rule`); the destinations only they reach are compared when they are
there on both sides of a launch, and left out when they are there on one side only (a destination is `public, telemetry`: the telemetry host is the third party's, and
whether the connection succeeded is not in the verdict). The IDLE launch of each engine run (a page, no pref changed, up to 120 s) is evidence: which pings leave in a long launch is not a rule until it is proven (the core declares
the terms of use accepted, so `canUpload()` is true from the start and the notification of the data policy is never recorded; Linux started 1 pingsender in it, Windows 0).
Only a separate `pingsender[.exe]` there is red. Behind a session proxy a direct pingsender is the network oracle's.
On Windows the system modules (a path under the system folder) are compared as a SET over the union of the measured seeds of a side (`SYSTEM_REASON`): a module that is in a
seed of each side is the same module; one that only one side has in any seed is still red.
ACCEPTED LOSSES (the rule of the host paths trades them for a verdict that does not follow the machine's timing; for the 69):
* a path that one engine has in every measured launch and the other in only some of them is not red: always against sometimes is listed, never judged;
* a reading tied to one seed is not judged: no path is compared seed by seed;
* what happens only in the long launches (idle, bare) is only listed: judging it would take two idle launches per engine;
* the cause of the pingsender that starts in one launch of eight is not known: its paths are listed like the others, there is no rule and no preference for it;
* a pid that Windows reuses may attribute to the engine the tools of the oracle itself, among the processes that touched a path.
How the trace is taken:
@@ -508,14 +516,11 @@ def privileged_problems(fp: dict) -> list:
return ["%d %s processes: the preloaded about:newtab is absent or present, never more than one (%s)" % (n, PRIVILEGED, PRIVILEGED_REASON)] if n > 1 else []
def pingsender_surface(fp: dict) -> tuple:
"""`(paths only the pingsender kind touched, its destinations)` of a launch: a destination is `<kind>: connect public, telemetry` (or `send`), whatever the
address and the port: the telemetry host is the third party's."""
touched = fp.get("touched_by", {})
files = sorted(p for p in fp.get("files", []) if touched.get(p) and all(is_pingsender_part(k) for k in touched[p]))
nets = sorted({"%s: %s public, telemetry" % (PINGSENDER_KIND, e.split(": ", 1)[1].split(" ", 1)[0])
def pingsender_destinations(fp: dict) -> list:
"""The destinations of the pingsender kind in a launch: `<kind>: connect public, telemetry` (or `send`), whatever the address and the port: the telemetry host is the
third party's."""
return sorted({"%s: %s public, telemetry" % (PINGSENDER_KIND, e.split(": ", 1)[1].split(" ", 1)[0])
for e in fp.get("net") or [] if e.startswith(PINGSENDER_KIND + ": ")})
return files, nets
def _bare_summary(bare: dict | None) -> dict | None:
@@ -529,119 +534,64 @@ def _bare_summary(bare: dict | None) -> dict | None:
"cores": core.get("cores"), "core_pattern": core.get("core_pattern")}
#: THE SYSTEM MODULES OF WINDOWS: the paths under System32, SysWOW64 and WinSxS (the security catalogs are under System32 catroot) that are not in the package. They are
#: loaded by the Windows loader on behalf of system DLLs (a catalog lookup when a library is loaded, a library a system DLL loads lazily, the resource file of a module), and no
#: page reads them: which of them a launch opens follows the system and its timing, not the engine. They are compared as a set per PATH over the union of the launches of a
#: run (the measured seeds and the warm-up, and as a layer of its own the long idle and bare launches), never seed by seed:
#: * in the A/B, red only a module the CANDIDATE opened that NO launch of the 68 opened, in either run of the 68 (the published engine twice, warm-ups included); a module
#: the candidate lacks is not red (printed as `lacking`);
#: * in the A/A, a module of this class that only one run has is `rare`: printed with its count, and the control is red only if the rare ones of a run are more than RARE_LIMIT
#: paths in its measured launches, or RARE_LIMIT_LONG in its long ones (the class is growing and must be looked at).
#: Everything outside these folders stays strict, and the shortcut inventory is its own rule (absent or complete).
SYSTEM_FOLDERS = tuple("c:" + chr(92) + "windows" + chr(92) + name + chr(92) for name in ("system32", "syswow64", "winsxs"))
SYSTEM_PREFIX = tuple("file." + f for f in SYSTEM_FOLDERS)
RARE_LIMIT = 5
SYSTEM_REASON = ("loaded by the Windows loader on behalf of system DLLs, and no page reads them: compared as a set per path over the union of all the launches of a run; in the "
"A/B red only a module the candidate opened that no launch of the 68 opened; in the A/A the ones only one run has are rare, red above %d" % RARE_LIMIT)
#: THE RULE OF THE HOST PATHS, one for the A/A and the A/B, Linux and Windows, over every host path (the system modules and the shortcut inventory included). A path is
#: RED if and only if it is in ALL the measured launches (the warm-up and the seeds) of one engine and in NO launch of the other (its long idle and bare launches included). In
#: the A/A that is a broken control, in the A/B a difference (the declared ones apply to it as they always did). Every other path that is not in all the launches of both engines is
#: LISTED, not judged (`file_rule`, the file `not-judged[-a-a].json` of the artifact, the log): the paths that are not in the same share of the launches of both engines, with in
#: how many launches of how many each engine has them and the processes that touched them; the ones in at least half of the launches of one engine and in none of the other's are
#: marked `watch`.
NOT_JUDGED_FORMAT = "ab-host-not-judged/1"
NOT_JUDGED_REASON = ("a path in all the measured launches of one engine and in no launch of the other is red; the other paths that differ are listed, not judged; `watch` is a path "
"in at least half of the launches of one engine and in none of the other's")
LISTED_IN_LOG = 50
LAYERS = {"measured": ("seeds", "warmup"), "long": ("idle", "bare")}
RARE_LIMIT_LONG = 30
def launches_of(fp: dict) -> list:
"""`[(name, measured, launch)]` of a footprint in the order of the run: the warm-up and the seeds (`measured`), then the idle and the bare launch (the long ones)."""
out = [("warmup", True, fp["warmup"])] if fp.get("warmup") else []
out += [("s%s" % s["seed"], True, s) for s in fp.get("seeds", [])]
return out + [(name, False, fp[name]) for name in ("idle", "bare") if fp.get(name)]
def _launches(fp: dict, layer: str) -> list:
out = []
for key in LAYERS[layer]:
got = fp.get(key)
out += got if key == "seeds" else [got or {}]
return out
def path_table(fps: list) -> dict:
"""What the launches of ONE engine (the footprints of its runs) did to the host paths: `{"launches": {"measured": n, "long": n}, "paths": {path: {"measured": k,
"long": k}}, "by": {path: [kinds that touched it]}}`."""
launches, paths, by = {"measured": 0, "long": 0}, {}, {}
for fp in fps:
for _name, measured, launch in launches_of(fp):
layer = "measured" if measured else "long"
launches[layer] += 1
for path in set(launch.get("files", [])):
paths.setdefault(path, {"measured": 0, "long": 0})[layer] += 1
by.setdefault(path, set()).update((launch.get("touched_by") or {}).get(path, []))
return {"launches": launches, "paths": paths, "by": {path: sorted(kinds) for path, kinds in by.items()}}
def system_paths(fp: dict, layers=("measured", "long"), with_inventory: bool = True) -> set:
"""The system modules (SYSTEM_FOLDERS) the launches of the given layers of a footprint opened. Two layers: `measured` (the seeds and the warm-up) and `long` (the idle
and the bare launch, 120 s, in which the parent runs Mozilla's idle tasks: the maintenance at 57 s, the shell code). Without `with_inventory` the ones a launch opened
as part of the shortcut inventory (its own rule: absent or complete, `INVENTORY_MARKER`) are left out."""
out = set()
for layer in layers:
for launch in _launches(fp, layer):
skip = set() if with_inventory else set(launch.get("inventory") or [])
out.update(p for p in launch.get("files", []) if p.startswith(SYSTEM_FOLDERS) and p not in skip)
return out
def file_rule(a: dict, b: dict, a_a: bool, also_68=()) -> tuple:
"""`(red, not_judged)` of the host paths of two footprints, by the rule above. `red` is `{"A": [paths only A has, in all its measured launches], "B": [...]}`. `also_68`
are the other footprints of the engine of A in an A/B (the published engine measured twice): its launches are all of them the engine's."""
ta, tb = path_table([a, *also_68]), path_table([b])
red = {side: sorted(p for p, c in mine["paths"].items() if mine["launches"]["measured"] and c["measured"] == mine["launches"]["measured"] and p not in other["paths"])
for side, mine, other in (("A", ta, tb), ("B", tb, ta))}
judged = set(red["A"]) | set(red["B"])
every = {side: sum(t["launches"].values()) for side, t in (("A", ta), ("B", tb))}
def same(seen: dict) -> bool:
return all(seen["A"][layer] * tb["launches"][layer] == seen["B"][layer] * ta["launches"][layer] for layer in ("measured", "long"))
BS = chr(92)
CATROOT = BS + "catroot" + BS
def is_catalog(path: str) -> bool:
"""A security catalog under `catroot`: Windows' signature verification reads it when a library is loaded, the engine does not choose it."""
return CATROOT in path and path.endswith(".cat")
def mui_dll(path: str) -> str | None:
"""The library a resource file belongs to (`...\\system32\\en-us\\x.dll.mui` is `...\\system32\\x.dll`), None for a path that is not one."""
if not path.endswith(".mui"):
return None
folder, _sep, name = path.rpartition(BS)
parent, _sep2, language = folder.rpartition(BS)
return parent + BS + name[:-4] if re.fullmatch(r"[a-z]{2,3}(-[a-z0-9]{2,8})*", language) and parent else None
def classify_rare(paths, seen: set) -> dict:
"""Splits the modules of a layer that only one run has: `counted` (what the cap counts: every module that is not excused, orphan resource files included), `mui` (a
resource file whose library is among the modules `seen` in that run: the library carries the count), `cat` (a security catalog under catroot) and `orphans` (the
resource files whose library was never seen: they are in `counted`)."""
out = {"counted": [], "mui": [], "cat": [], "orphans": []}
for path in sorted(paths):
dll = mui_dll(path)
if is_catalog(path):
out["cat"].append(path)
elif dll is not None and dll in seen:
out["mui"].append(path)
else:
out["counted"].append(path)
if dll is not None:
out["orphans"].append(path)
return out
def system_class(a: dict, b: dict, a_a: bool, also_68=()) -> tuple:
"""`(differences, problems, report)` of the system modules of two footprints: see SYSTEM_REASON. `also_68` are the other footprints of the 68 in an A/B.
A/A: a module only one run has is rare, counted in two layers with their own caps: the measured launches (RARE_LIMIT) and the long ones (RARE_LIMIT_LONG, what only a
long launch of the run opened). A module the other run has in ANY launch is not rare. The cap counts every rare module but two kinds that are not the engine's choice,
both listed and counted in the report, never silent (`classify_rare`): a resource file (`.mui`) whose library is among the modules seen in that run, since the library
carries the count, and a security catalog under `catroot`. An orphan `.mui` (its library never seen) counts. A/B: red only a module any launch of the candidate opened
that no launch of either 68 run opened, with the same two kinds left out of the red (a new library shows through the library itself); the ones each side opened are
listed per run."""
differences, problems = [], []
if a_a:
rare, excused = {"measured": {}, "long": {}}, {"measured": {}, "long": {}}
for side, x, y in (("A", a, b), ("B", b, a)):
other = system_paths(y, with_inventory=False)
seen = system_paths(x)
measured = system_paths(x, ("measured",), False)
for layer, paths in (("measured", measured - other), ("long", system_paths(x, ("long",), False) - measured - other)):
split = classify_rare(paths, seen)
rare[layer][side], excused[layer][side] = split["counted"], split
for layer, limit in (("measured", RARE_LIMIT), ("long", RARE_LIMIT_LONG)):
for side in ("A", "B"):
if len(rare[layer][side]) > limit:
problems.append("the system modules only run %s has in its %s launches are %d, more than %d: the class is growing (%s)"
% (side, layer, len(rare[layer][side]), limit, rare[layer][side][:3]))
counts = {layer: {side: {"counted": len(excused[layer][side]["counted"]), "mui_excused": len(excused[layer][side]["mui"]),
"cat_excused": len(excused[layer][side]["cat"]), "orphans": len(excused[layer][side]["orphans"])}
for side in ("A", "B")} for layer in rare}
return differences, problems, {"mode": "a-a", "rare": rare, "excused": excused, "counts": counts, "limits": {"measured": RARE_LIMIT, "long": RARE_LIMIT_LONG},
"reason": SYSTEM_REASON}
known = set(system_paths(a, with_inventory=False)).union(*[system_paths(x, with_inventory=False) for x in also_68])
mine = system_paths(b, with_inventory=False)
split = classify_rare(mine - known, system_paths(b))
for path in split["counted"]:
differences.append({"seed": "all", "category": "file", "leaf": "file." + path, "a": MISSING, "b": 1, "by": {"A": [], "B": []}, "calls": {"A": [], "B": []}})
listed = {"68": [p for p in sorted(known) if mui_dll(p) or is_catalog(p)], "candidate": [p for p in sorted(mine) if mui_dll(p) or is_catalog(p)]}
return differences, problems, {"mode": "a-b", "candidate_only": split["counted"], "excused_candidate_only": {"mui": split["mui"], "cat": split["cat"]}, "orphans": split["orphans"],
"listed_mui_and_cat": listed, "lacking": sorted(known - mine)[:50], "lacking_count": len(known - mine), "reason": SYSTEM_REASON}
entries = []
for path in sorted(set(ta["paths"]) | set(tb["paths"])):
if path in judged:
continue
seen = {side: t["paths"].get(path, {"measured": 0, "long": 0}) for side, t in (("A", ta), ("B", tb))}
if same(seen):
continue # in the same share of the launches of both engines (every one of them, for a path that is there always): nothing to list
watch = any(sum(seen[mine].values()) * 2 >= every[mine] and not sum(seen[other].values()) for mine, other in (("A", "B"), ("B", "A")))
entries.append({"path": path, "watch": watch,
**{side: {layer: [seen[side][layer], t["launches"][layer]] for layer in ("measured", "long")} for side, t in (("A", ta), ("B", tb))},
"touched_by": {"A": ta["by"].get(path, []), "B": tb["by"].get(path, [])}})
entries.sort(key=lambda e: (not e["watch"], e["path"]))
return red, {"format": NOT_JUDGED_FORMAT, "mode": "a-a" if a_a else "a-b", "reason": NOT_JUDGED_REASON, "launches": {"A": ta["launches"], "B": tb["launches"]}, "paths": entries}
PRIVILEGED = "Privileged Cont"
@@ -842,15 +792,10 @@ def derive_labels(labels: dict, parents: dict) -> dict:
return out
def is_pingsender_part(kind: str) -> bool:
"""The pingsender kind and what it spawned: what is there when the pingsenders are."""
return kind == PINGSENDER_KIND or kind.endswith("<-pingsender")
#: The shortcut inventory of Windows (a launch that ran it touches these): StartupOSIntegration.sys.mjs `onStartupIdle` (:165) -> `ensurePrivateBrowsingShortcutExists`
#: (:238, `hasPinnableShortcut` :266 -> nsWindowsShellService.cpp `HasPinnableShortcut` :1672 -> `FindPinnableShortcut` :1625) and `CustomIconManager.ensureAppliedOrRevert` ->
#: `enumerateInstallShortcuts` (CustomIconManager.sys.mjs:189 -> nsWindowsShellService.cpp `EnumerateInstallShortcutsImpl` :2960): Mozilla code at startup idle, which a short
#: launch may or may not have reached before it closed. The marker is a path of the places it walks.
#: launch may or may not have reached before it closed. The marker is a path of the places it walks. It is evidence (`inventory` of a launch): its paths are judged like any other (`file_rule`).
INVENTORY_MARKER = re.compile(r"(\\start menu\\|\\users\\public\\desktop|\\quick launch\\|_shortcuts\.ini$|\\implicitappshortcuts)")
@@ -1444,9 +1389,9 @@ def net_class(entry: str) -> str:
def leaves_of(seed_footprint: dict, with_pingsender: bool = False) -> dict:
"""{leaf: value} of one seed: proc.<kind> = how many processes of that kind the run made (1 for a kind of type tab: its presence),
file.<path> = 1 for every HOST path the tree touched and net.<kind>: <what> = 1 for every netlink socket, netlink request and public
destination of a process of that kind (`network_events`)."""
"""{leaf: value} of one seed: proc.<kind> = how many processes of that kind the run made (1 for a kind of type tab: its presence) and
net.<kind>: <what> = 1 for every netlink socket, netlink request and public destination of a process of that kind (`network_events`). The host paths are not leaves
of a seed: they are judged over all the launches (`file_rule`)."""
out = {}
for kind, n in seed_footprint.get("kinds", {}).items():
if kind == PRIVILEGED:
@@ -1454,17 +1399,11 @@ def leaves_of(seed_footprint: dict, with_pingsender: bool = False) -> dict:
if kind == PINGSENDER_KIND or (kind.endswith("<-pingsender") and not with_pingsender):
continue # 0 or 3 of them, with their form (`pingsender_problems`), and what they spawned: there when they are
out["proc." + kind] = 1 if is_tab(kind) and n else n
# what only the pingsender kind touches or reaches is compared when it is on both sides of the launch (`with_pingsender`), left out when on one side only
surface_files, surface_nets = pingsender_surface(seed_footprint)
for path in seed_footprint.get("files", []):
if path in surface_files and not with_pingsender:
continue
out["file." + path] = 1
for entry in seed_footprint.get("net") or []:
if not entry.startswith(PINGSENDER_KIND + ": "):
out["net." + net_class(entry)] = 1
if with_pingsender:
for entry in surface_nets:
for entry in pingsender_destinations(seed_footprint):
out["net." + entry] = 1
return out
@@ -1612,52 +1551,45 @@ def judge(a: dict, b: dict, expected: list | None = None, a_a: bool = False, pla
for seed in sorted(set(seeds_a) & set(seeds_b)):
both = bool(seeds_a[seed].get("kinds", {}).get(PINGSENDER_KIND)) and bool(seeds_b[seed].get("kinds", {}).get(PINGSENDER_KIND))
la, lb = leaves_of(seeds_a[seed], both), leaves_of(seeds_b[seed], both)
# The shortcut inventory (Windows) is there or it is not (`INVENTORY_MARKER`): when one side ran it and the other did not, the paths it walked that the other
# side does not have are left out; when both ran it, its paths are compared like any other, so it has to be complete.
inv_a, inv_b = set(seeds_a[seed].get("inventory") or []), set(seeds_b[seed].get("inventory") or [])
if inv_a and not inv_b:
for path in inv_a - set(seeds_b[seed].get("files", [])):
la.pop("file." + path, None)
elif inv_b and not inv_a:
for path in inv_b - set(seeds_a[seed].get("files", [])):
lb.pop("file." + path, None)
for side, fp in (("A", seeds_a[seed]), ("B", seeds_b[seed])):
for message in fp.get("problems", []) + pingsender_problems(fp) + privileged_problems(fp):
problems.append("seed %s side %s: %s" % (seed, side, message))
per = {c: 0 for c in CATEGORIES}
for leaf in set(la) | set(lb):
per[category_of(leaf)] = per.get(category_of(leaf), 0) + 1
per["file"] = len(set(seeds_a[seed].get("files", [])) | set(seeds_b[seed].get("files", [])))
counts[str(seed)] = per
for side, leaves in (("A", la), ("B", lb)):
for side, leaves, files in (("A", la, seeds_a[seed].get("files", [])), ("B", lb, seeds_b[seed].get("files", []))):
have = {c: sum(1 for k in leaves if category_of(k) == c) for c in floors}
have["file"] = len(files)
for c, floor in floors.items():
if have[c] < floor:
problems.append("seed %s side %s has %d %s leaves, fewer than the floor of %d: the run was not seen"
% (seed, side, have[c], c, floor))
if os_name == "windows":
for leaves in (la, lb):
for k in [k for k in leaves if k.startswith(SYSTEM_PREFIX)]:
del leaves[k]
for leaf in sorted(set(la) | set(lb)):
va, vb = la.get(leaf, MISSING), lb.get(leaf, MISSING)
if va != vb:
differences.append({"seed": seed, "category": category_of(leaf), "leaf": leaf, "a": _clip(va), "b": _clip(vb),
"by": {"A": _by(seeds_a[seed], leaf), "B": _by(seeds_b[seed], leaf)},
"calls": {"A": _calls(seeds_a[seed], leaf), "B": _calls(seeds_b[seed], leaf)}})
system = None
if os_name == "windows":
more, found, system = system_class(a, b, a_a, also_68 or ())
differences += more
problems += found
red, not_judged = file_rule(a, b, a_a, also_68 or ())
for side, seeds in (("A", seeds_a), ("B", seeds_b)):
for path in red[side]:
leaf = "file." + path
for seed in sorted(seeds):
other = {"A": "B", "B": "A"}[side]
differences.append({"seed": seed, "category": "file", "leaf": leaf, "a": 1 if side == "A" else MISSING, "b": 1 if side == "B" else MISSING,
"by": {side: _by(seeds[seed], leaf), other: []}, "calls": {side: _calls(seeds[seed], leaf), other: []}})
differences.sort(key=lambda d: (d["seed"], d["leaf"]))
if os_name == "windows" and not a_a:
for where, fp in [("seed %s" % seed, seeds_b[seed]) for seed in sorted(seeds_b)] + ([("warm-up", b["warmup"])] if b.get("warmup") else []):
problems += geolocation_problems(fp, where)
problems += idle_problems(a, b)
wa, wb = a.get("warmup") or {}, b.get("warmup") or {}
if wa.get("kinds", {}).get(PINGSENDER_KIND) and wb.get("kinds", {}).get(PINGSENDER_KIND):
for what, x, y in zip(("paths", "destinations"), pingsender_surface(wa), pingsender_surface(wb)):
if x != y:
problems.append("warm-up: the pingsender %s differ: A only %s | B only %s" % (what, sorted(set(x) - set(y))[:5], sorted(set(y) - set(x))[:5]))
x, y = pingsender_destinations(wa), pingsender_destinations(wb)
if x != y:
problems.append("warm-up: the pingsender destinations differ: A only %s | B only %s" % (sorted(set(x) - set(y))[:5], sorted(set(y) - set(x))[:5]))
stale = []
if not a_a:
for entry in expected or []:
@@ -1692,31 +1624,38 @@ def judge(a: dict, b: dict, expected: list | None = None, a_a: bool = False, pla
"net": sorted(set(warm["A"].get("net", [])) & set(warm["B"].get("net", [])))}
return {"format": FORMAT, "mode": "a-a" if a_a else "a-b", "verdict": "red" if problems else "green", "problems": problems,
"differences": differences, "declared": declared, "ours": OURS, "tab": {"reason": TAB_REASON, "counts": tab},
"outside_tree": outside, "warmup": dict(warm, both=both), "idle": {side: _idle_summary(fp.get("idle")) for side, fp in (("A", a), ("B", b))}, "system_modules": system,
"outside_tree": outside, "warmup": dict(warm, both=both), "idle": {side: _idle_summary(fp.get("idle")) for side, fp in (("A", a), ("B", b))}, "not_judged": not_judged,
"bare": {side: _bare_summary((fp.get("bare") or {}).get("bare")) for side, fp in (("A", a), ("B", b))},
"shortcuts": {side: _shortcuts_summary(((fp.get("idle") or {}).get("idle") or {}).get("shortcut_changes")) for side, fp in (("A", a), ("B", b))},
"stale": [e.get("id") for e in stale], "leaves": counts, "net": net}
def _launch_counts(counts: dict) -> str:
"""`5/6 measured, 0/2 long` of the entry of a path in the not judged list."""
return "%d/%d measured, %d/%d long" % (*counts["measured"], *counts["long"])
def write_verdict(path: Path, report: dict, listed_name: str) -> None:
"""The verdict at `path` and, next to it, the not judged list as `listed_name` (a file of its own: the verdict stays small)."""
write_json(path.with_name(listed_name), report["not_judged"])
write_json(path, {k: v for k, v in report.items() if k != "not_judged"})
def print_report(report: dict, a_name: str, b_name: str) -> None:
for seed, per in sorted(report["leaves"].items()):
print("seed %s leaves: %s" % (seed, ", ".join("%s %d" % kv for kv in sorted(per.items()))))
for d in report["differences"][:200]:
print("DIFF seed %s %s: %s %s | %s %s%s" % (d["seed"], d["leaf"], a_name, json.dumps(d["a"], sort_keys=True)[:160],
b_name, json.dumps(d["b"], sort_keys=True)[:160], _by_text(d)))
system = report.get("system_modules")
if system and system["mode"] == "a-a":
for side, name in (("A", a_name), ("B", b_name)):
for layer in ("measured", "long"):
c = system["counts"][layer][side]
print("RARE system modules only %s has in its %s launches: %d counted (red above %d), %d .mui excused with their library, %d .cat excused, %d orphan .mui%s" % (
name, layer, c["counted"], system["limits"][layer], c["mui_excused"], c["cat_excused"], c["orphans"],
(": " + json.dumps(system["rare"][layer][side][:20])) if system["rare"][layer][side] else ""))
elif system:
print("SYSTEM modules the 68 has and the candidate lacks (not red): %d; the candidate has alone: %d counted, %d .mui excused, %d .cat excused, %d orphan .mui; .mui and .cat "
"opened: 68 %d, candidate %d" % (system["lacking_count"], len(system["candidate_only"]), len(system["excused_candidate_only"]["mui"]),
len(system["excused_candidate_only"]["cat"]), len(system["orphans"]), len(system["listed_mui_and_cat"]["68"]),
len(system["listed_mui_and_cat"]["candidate"])))
listed = (report.get("not_judged") or {}).get("paths", [])
if listed:
watch = [e for e in listed if e["watch"]]
print("NOT JUDGED (listed in the artifact, not red): %d paths, %d to watch" % (len(listed), len(watch)))
for e in watch + [e for e in listed if not e["watch"]][:LISTED_IN_LOG]:
print("%s %s: %s %s | %s %s (by %s | %s)" % ("WATCH" if e["watch"] else "LISTED", e["path"], a_name, _launch_counts(e["A"]), b_name, _launch_counts(e["B"]),
", ".join(e["touched_by"]["A"]) or "-", ", ".join(e["touched_by"]["B"]) or "-"))
if len(listed) - len(watch) > LISTED_IN_LOG:
print("LISTED: %d more paths in the file of the not judged list" % (len(listed) - len(watch) - LISTED_IN_LOG))
for side, name in (("A", a_name), ("B", b_name)):
warm = (report.get("warmup") or {}).get(side)
if warm:
@@ -2461,7 +2400,7 @@ def ab(candidate: str | None, candidate_seal: Path | None, leg: str, out: Path,
return 2
first, again = (read_json(out / runs[0][1]), read_json(out / runs[1][1]))
control = judge(first, again, a_a=True)
write_json(out / "diff-a-a.json", control)
write_verdict(out / "diff-a-a.json", control, "not-judged-a-a.json")
print("--- A/A: %s against itself" % engine_tag)
print_report(control, engine_tag, engine_tag + " again")
if control["verdict"] != "green":
@@ -2475,7 +2414,7 @@ def ab(candidate: str | None, candidate_seal: Path | None, leg: str, out: Path,
return 2
expected = load_expected(expected_file)
report = judge(first, read_json(out / runs[2][1]), expected=expected, a_a=False, also_68=[again])
write_json(out / "diff.json", report)
write_verdict(out / "diff.json", report, "not-judged.json")
print("--- A/B: %s against the candidate" % engine_tag)
print_report(report, engine_tag, oracle.CANDIDATE)
return 0 if report["verdict"] == "green" else 1
@@ -2521,7 +2460,7 @@ def main(argv=None) -> int:
a, b = read_json(args.a), read_json(args.b)
report = judge(a, b, expected=None if args.a_a else load_expected(args.expected), a_a=args.a_a)
if args.out:
write_json(args.out, report)
write_verdict(args.out, report, args.out.stem + "-not-judged.json")
print_report(report, a.get("engine", "A"), b.get("engine", "B"))
if report["verdict"] == "green":
return 0
+31 -168
View File
@@ -241,9 +241,10 @@ def test_in_the_a_a_the_declared_list_is_not_applied():
def test_the_declared_gfxtest_does_not_cover_a_path():
c = a_candidate_without_gfxtest()
c["seeds"][0]["files"] = FILES + ["/usr/lib/x86_64-linux-gnu/libglx.so.0"]
for seed in c["seeds"]:
seed["files"] = FILES + ["/usr/lib/x86_64-linux-gnu/libglx.so.0"]
report = judge(footprint(), c, expected=expected())
assert report["verdict"] == "red" and [d["leaf"] for d in report["differences"]] == ["file./usr/lib/x86_64-linux-gnu/libglx.so.0"]
assert report["verdict"] == "red" and {d["leaf"] for d in report["differences"]} == {"file./usr/lib/x86_64-linux-gnu/libglx.so.0"}
def test_the_cli_says_broken_control_for_an_a_a_difference(tmp_path, capsys):
@@ -457,7 +458,7 @@ def test_a_closed_linux_run_makes_a_footprint_of_its_kinds_and_its_host_paths(tm
assert fp["kinds"] == {"glxtest": 1, "lsb_release": 1, "parent": 1, "tab/isForBrowser": 1, "utility/sandboxingKind=1": 1}
assert "/etc/hosts" not in fp["files"] and "/etc/localtime" in fp["files"] and "/proc/N/status" in fp["files"] and "/e/firefox/libxul.so" not in fp["files"]
assert fp["ours"] == {"package": 2, "profile": 1} and fp["trace"]["source"] == "strace" and fp["problems"] == []
assert host.leaves_of(fp)["proc.tab/isForBrowser"] == 1 and "file./etc/localtime" in host.leaves_of(fp)
assert host.leaves_of(fp)["proc.tab/isForBrowser"] == 1 and not any(leaf.startswith("file.") for leaf in host.leaves_of(fp)), "the host paths are judged over all the launches"
def test_the_strace_stand_in_prints_the_paths_of_the_descriptors_only_when_asked(monkeypatch):
@@ -841,7 +842,7 @@ def test_the_separate_pingsender_executable_is_red_whatever_the_count():
assert any("the separate %s ran (B266" % exe in p for p in judge(fp, footprint("again"), a_a=True)["problems"])
def test_what_only_the_pingsender_touches_is_compared_when_it_is_on_both_sides_and_left_out_when_it_is_on_one_side_only():
def test_what_only_the_pingsender_touches_is_a_path_like_any_other_and_its_destinations_are_compared_when_it_is_on_both_sides_and_left_out_when_it_is_on_one_side_only():
imagehlp = "c:\\windows\\system32\\imagehlp.dll"
def with_surface(fp, n, files=(imagehlp,), net=("backgroundtask/pingsender: connect tcp AF_INET 141.101.90.1:443",)):
@@ -854,7 +855,8 @@ def test_what_only_the_pingsender_touches_is_compared_when_it_is_on_both_sides_a
return fp
one_side = judge(with_surface(footprint(), 3), footprint("again"), a_a=True)
assert one_side["verdict"] == "green", "present on one side only: left out"
assert {d["leaf"] for d in one_side["differences"]} == {"file." + imagehlp}, "its paths are paths like any other: in every launch of one side and in none of the other"
assert not any(d["category"] == "net" for d in one_side["differences"]), "its destinations on one side only are left out"
same = judge(with_surface(footprint(), 3), with_surface(footprint("again"), 3), a_a=True)
assert same["verdict"] == "green", same["problems"]
a = with_surface(footprint(), 3)
@@ -876,7 +878,7 @@ def test_a_pingsender_that_goes_to_the_telemetry_host_direct_is_the_products_beh
for seed in b["seeds"]:
seed["net"] = other
assert judge(a, b, a_a=True)["verdict"] == "green", "the address and the family are the third party's: `public, telemetry`"
assert host.pingsender_surface(a["seeds"][0]) == ([], ["backgroundtask/pingsender: connect public, telemetry"])
assert host.pingsender_destinations(a["seeds"][0]) == ["backgroundtask/pingsender: connect public, telemetry"]
idle = with_idle(footprint(), net=ping)
assert judge(idle, with_idle(footprint("again")), a_a=True)["verdict"] == "green", "no rule about a pingsender that goes out direct in the host oracle"
assert "session_proxy" not in inspect.getsource(host)
@@ -1317,7 +1319,7 @@ def test_a_windows_ab_runs_the_stock_control_after_the_candidate_and_before_the_
def fake_judge(a, b, **kw):
order.append(("judge", "a-a" if kw.get("a_a") else "a-b"))
return {"verdict": "green", "problems": []}
return {"verdict": "green", "problems": [], "not_judged": {}}
monkeypatch.setattr(host, "run_subprocess", fake_run)
monkeypatch.setattr(host, "run_stock_subprocess", fake_stock)
@@ -1539,12 +1541,17 @@ def test_the_pingsender_records_say_the_type_the_form_and_the_parent_of_each_pro
assert host.ping_records(linux, {7: host.PINGSENDER_KIND}, {}, False) == [{"type": "first-shutdown", "form": "backgroundtask", "parent": "(oracle)"}]
def test_the_pingsender_surface_of_the_two_warm_ups_is_compared_when_both_have_the_pingsender_and_left_out_when_one_has_it(capsys):
def test_the_pingsender_destinations_of_the_two_warm_ups_are_compared_when_both_have_the_pingsender_and_left_out_when_one_has_it_and_its_paths_are_listed():
kinds = dict(KINDS, **{host.PINGSENDER_KIND: 3})
ping = "backgroundtask/pingsender: connect tcp AF_INET 141.101.90.1:443"
a = with_warmup(footprint(), kinds=kinds, files=FILES + ["/etc/machine-id"], touched_by={"/etc/machine-id": [host.PINGSENDER_KIND]})
b = with_warmup(footprint("again"), kinds=kinds, files=FILES + ["/etc/resolv.conf"], touched_by={"/etc/resolv.conf": [host.PINGSENDER_KIND]})
a["warmup"]["net"] = [ping]
report = judge(a, b, a_a=True)
assert report["verdict"] == "red" and any("warm-up: the pingsender paths differ: A only ['/etc/machine-id'] | B only ['/etc/resolv.conf']" in p for p in report["problems"])
assert report["verdict"] == "red" and any("warm-up: the pingsender destinations differ: A only ['backgroundtask/pingsender: connect public, telemetry'] | B only []" in p
for p in report["problems"])
paths = {e["path"]: e for e in report["not_judged"]["paths"]}
assert paths["/etc/machine-id"]["touched_by"]["A"] == [host.PINGSENDER_KIND] and paths["/etc/resolv.conf"]["touched_by"]["B"] == [host.PINGSENDER_KIND], "its paths are listed"
assert judge(a, with_warmup(footprint("again")), a_a=True)["verdict"] == "green", "the pingsender is in one warm-up only"
@@ -1602,23 +1609,25 @@ def with_inventory(fp, paths=INV, present=True):
return fp
def test_the_shortcut_inventory_is_absent_or_complete_one_side_with_it_and_the_other_without_is_green():
def test_the_shortcut_inventory_is_judged_like_every_other_path_one_side_with_it_and_the_other_without_is_red():
report = judge(with_inventory(footprint(platform="win32")), footprint("again", platform="win32"), a_a=True)
assert report["verdict"] == "green", report["problems"]
assert judge(footprint("again", platform="win32"), with_inventory(footprint(platform="win32")), a_a=True)["verdict"] == "green"
assert report["verdict"] == "red" and {d["leaf"] for d in report["differences"]} == {"file." + p for p in INV}
back = judge(footprint("again", platform="win32"), with_inventory(footprint(platform="win32")), a_a=True)
assert {d["leaf"] for d in back["differences"]} == {"file." + p for p in INV}
assert judge(with_inventory(footprint(platform="win32")), with_inventory(footprint("again", platform="win32")), a_a=True)["verdict"] == "green"
def test_an_inventory_that_is_not_complete_on_both_sides_is_red_and_so_is_a_path_next_to_it():
def test_an_inventory_that_is_not_complete_on_both_sides_is_red_and_so_is_a_path_next_to_it_in_every_launch():
short = with_inventory(footprint("again", platform="win32"), INV[:3])
report = judge(with_inventory(footprint(platform="win32")), short, a_a=True)
assert report["verdict"] == "red" and {d["leaf"] for d in report["differences"]} == {"file." + p for p in INV[3:]}
extra = with_inventory(footprint(platform="win32"))
extra["seeds"][0]["files"] = extra["seeds"][0]["files"] + ["d:\\lab\\runner\\.ssh\\config"]
other = judge(extra, footprint("again", platform="win32"), a_a=True)
assert other["verdict"] == "red" and {d["leaf"] for d in other["differences"]} == {"file.d:\\lab\\runner\\.ssh\\config"}, "only the inventory's own paths are left out"
for seed in extra["seeds"]:
seed["files"] = seed["files"] + ["d:\\lab\\runner\\.ssh\\config"]
other = judge(extra, with_inventory(footprint("again", platform="win32")), a_a=True)
assert other["verdict"] == "red" and {d["leaf"] for d in other["differences"]} == {"file.d:\\lab\\runner\\.ssh\\config"}
known = with_inventory(footprint(platform="win32"), INV + [FILES[0]])
assert judge(known, footprint("again", platform="win32"), a_a=True)["verdict"] == "green", "a path of the inventory window that the other side has too is not left out of its side"
assert {d["leaf"] for d in judge(known, footprint("again", platform="win32"), a_a=True)["differences"]} == {"file." + p for p in INV}, "FILES[0] is in both"
def test_the_inventory_of_a_launch_is_what_the_parent_first_touched_from_the_first_to_the_last_open_of_the_places_it_walks():
@@ -1879,11 +1888,7 @@ def test_a_launch_that_left_nothing_says_so_and_the_report_carries_the_summary_l
# -
# The system modules of Windows: a set per path over the union of all the launches of a run.
SYS_A = "c:" + chr(92) + "windows" + chr(92) + "system32" + chr(92) + "wevtapi.dll"
SYS_B = "c:" + chr(92) + "windows" + chr(92) + "system32" + chr(92) + "imagehlp.dll"
OUTSIDE = "c:" + chr(92) + "windows" + chr(92) + "systemapps" + chr(92) + "x" + chr(92) + "resources.pri"
# Windows footprints with paths added to chosen launches (the host paths are judged over all the launches: tests/test_ab_host_aa_stable.py).
def with_system(fp, per_launch):
@@ -1905,72 +1910,6 @@ def win(engine="firefox-68", **kw):
return footprint(engine, platform="win32", **kw)
def test_a_system_module_in_a_launch_of_each_run_is_the_same_module_and_a_rare_one_is_printed_not_red(capsys):
a = with_system(win(), {11: [SYS_B]})
b = with_system(win("again"), {"warmup": [SYS_B], 12: [SYS_A]})
report = judge(a, b, a_a=True)
assert report["verdict"] == "green", report["problems"]
assert report["system_modules"]["rare"]["measured"] == {"A": [], "B": [SYS_A]} and report["system_modules"]["counts"]["measured"]["B"]["counted"] == 1 and report["system_modules"]["counts"]["measured"]["A"]["counted"] == 0
host.print_report(report, "firefox-68", "firefox-68 again")
assert "RARE system modules only firefox-68 again has in its measured launches: 1 counted (red above 5), 0 .mui excused with their library, 0 .cat excused, 0 orphan .mui" in capsys.readouterr().out
assert "no page reads them" in host.SYSTEM_REASON and "Windows loader" in host.SYSTEM_REASON
def test_six_rare_system_modules_in_an_a_a_run_are_red_and_five_are_not():
many = ["c:" + chr(92) + "windows" + chr(92) + "system32" + chr(92) + "rare%d.dll" % i for i in range(6)]
assert judge(with_system(win(), {11: many}), win("again"), a_a=True)["verdict"] == "red"
report = judge(with_system(win(), {11: many}), win("again"), a_a=True)
assert any("the system modules only run A has in its measured launches are 6, more than 5: the class is growing" in p for p in report["problems"])
assert judge(with_system(win(), {11: many[:5]}), win("again"), a_a=True)["verdict"] == "green"
assert judge(win(), with_system(win("again"), {"warmup": many}), a_a=True)["verdict"] == "red", "either run, the warm-up included"
def test_the_rare_modules_of_the_long_launches_are_counted_apart_with_a_cap_of_thirty():
many = ["c:" + chr(92) + "windows" + chr(92) + "system32" + chr(92) + "long%d.dll" % i for i in range(31)]
ok = judge(with_system(win(), {"idle": []}), with_system(win("again"), {"idle": many[:30], "bare": []}), a_a=True)
assert ok["verdict"] == "green", ok["problems"]
assert [ok["system_modules"]["counts"][l][side]["counted"] for l in ("measured", "long") for side in "AB"] == [0, 0, 0, 30] and ok["system_modules"]["limits"] == {"measured": 5, "long": 30}
red = judge(with_system(win(), {"idle": []}), with_system(win("again"), {"idle": many, "bare": []}), a_a=True)
assert red["verdict"] == "red" and any("only run B has in its long launches are 31, more than 30" in p for p in red["problems"])
seven = many[:7]
measured = judge(with_system(win(), {"idle": []}), with_system(win("again"), {11: seven}), a_a=True)
assert measured["verdict"] == "red", "the measured launches keep the cap of 5"
in_both = judge(with_system(win(), {"idle": many}), with_system(win("again"), {11: many, "idle": []}), a_a=True)
assert in_both["verdict"] == "green" and in_both["system_modules"]["counts"]["long"]["B"]["counted"] == 0, "a module the other run has in any launch is not rare"
def test_in_an_ab_a_system_module_only_the_candidate_opened_is_red_and_one_the_candidate_lacks_is_green():
published = with_system(win(), {11: [SYS_A]})
again = with_system(win("again"), {12: [SYS_B]})
candidate = with_system(win("candidate"), {11: [SYS_B]})
green = judge(published, candidate, expected=[], also_68=[again])
assert green["verdict"] == "green", green["problems"]
assert green["system_modules"]["lacking"] == [SYS_A] and green["system_modules"]["candidate_only"] == []
new = "c:" + chr(92) + "windows" + chr(92) + "system32" + chr(92) + "dnsapi.dll"
red = judge(published, with_system(win("candidate"), {11: [SYS_B, new]}), expected=[], also_68=[again])
assert red["verdict"] == "red" and [d["leaf"] for d in red["differences"]] == ["file." + new]
assert judge(win(), with_system(win("candidate"), {"warmup": [new]}), expected=[])["verdict"] == "red", "a module the candidate opened in a warm-up counts"
assert judge(with_system(win(), {"warmup": [new]}), with_system(win("candidate"), {11: [new]}), expected=[])["verdict"] == "green", "a 68 warm-up opened it too"
# the long launches are inside the class: a candidate's long-launch module is red only if no launch of the 68 loaded it
long_red = judge(published, with_system(win("candidate"), {"idle": [new]}), expected=[], also_68=[again])
assert long_red["verdict"] == "red" and [d["leaf"] for d in long_red["differences"]] == ["file." + new]
assert judge(with_system(win(), {"idle": [new]}), with_system(win("candidate"), {"idle": [new]}), expected=[])["verdict"] == "green", "a 68 long launch opened it"
assert judge(with_system(win(), {"warmup": [new]}), with_system(win("candidate"), {"bare": [new]}), expected=[])["verdict"] == "green", "any 68 launch counts"
assert judge(published, with_system(win("candidate"), {"bare": [new]}), expected=[], also_68=[with_system(win("again"), {"idle": [new]})])["verdict"] == "green", "the other 68 run too"
def test_the_system_class_is_system32_syswow64_and_winsxs_and_everything_else_stays_strict_seed_by_seed():
for folder in ("syswow64", "winsxs"):
path = "c:" + chr(92) + "windows" + chr(92) + folder + chr(92) + "x.dll"
assert judge(with_system(win(), {11: [path]}), win("again"), a_a=True)["verdict"] == "green"
for other in (OUTSIDE, "c:" + chr(92) + "program files" + chr(92) + "vendor" + chr(92) + "hook.dll"):
report = judge(with_system(win(), {11: [other]}), win("again"), a_a=True)
assert report["verdict"] == "red" and {d["seed"] for d in report["differences"]} == {11}, other
lin = "/usr/lib/libx.so"
assert judge(with_system(footprint(), {11: [lin]}), footprint("again"), a_a=True)["system_modules"] is None
assert {d["seed"] for d in judge(with_system(footprint(), {11: [lin]}), footprint("again"), a_a=True)["differences"]} == {11}
def test_the_ab_passes_the_other_run_of_the_68_to_the_judge(tmp_path, monkeypatch):
seen = {}
pub = fake_engine(tmp_path / "fetch", "pub")
@@ -2005,80 +1944,6 @@ def test_the_preloaded_newtab_process_is_absent_or_present_per_launch_never_more
assert "NewTabPagePreloading.sys.mjs:96" in host.PRIVILEGED_REASON and "firefox.js:1952" in host.PRIVILEGED_REASON and "idle time" in host.PRIVILEGED_REASON
# -
# What the cap does not count: a resource file whose library is seen, and a security catalog (both counted and printed, never silent).
DIR32 = "c:" + chr(92) + "windows" + chr(92) + "system32" + chr(92)
CATDIR = DIR32 + "catroot" + chr(92) + "{f750e6c3-38ee-11d1-85e5-00c04fc295ee}" + chr(92)
def dll(name):
return DIR32 + name + ".dll"
def mui(name):
return DIR32 + "en-us" + chr(92) + name + ".dll.mui"
def test_a_resource_file_is_counted_by_its_library_and_an_orphan_one_counts_itself():
assert host.mui_dll(mui("avrt")) == dll("avrt") and host.mui_dll(DIR32 + "fr-fr" + chr(92) + "x.dll.mui") == dll("x") and host.mui_dll(dll("x")) is None
assert host.mui_dll(DIR32 + "drivers" + chr(92) + "x.sys.mui") is None, "a folder that is not a language is not one"
seen = {dll("avrt")}
split = host.classify_rare([mui("avrt"), mui("orphan"), dll("wevtapi")], seen)
assert split == {"counted": [mui("orphan"), dll("wevtapi")], "mui": [mui("avrt")], "cat": [], "orphans": [mui("orphan")]}
def test_a_catalog_under_catroot_is_not_counted_and_one_outside_catroot_is():
inside, outside = CATDIR + "package~1.cat", DIR32 + "package~1.cat"
assert host.is_catalog(inside) and not host.is_catalog(outside) and not host.is_catalog(CATDIR + "x.dll")
split = host.classify_rare([inside, outside], set())
assert split["cat"] == [inside] and split["counted"] == [outside]
def test_in_an_a_a_the_resource_files_with_their_library_and_the_catalogs_do_not_count_toward_the_cap_and_are_printed(capsys):
muis = [mui("m%d" % i) for i in range(15)]
libs = [dll("m%d" % i) for i in range(15)]
cats = [CATDIR + "package%d~1.cat" % i for i in range(6)]
a = with_system(win(), {11: muis + libs + cats})
b = with_system(win("again"), {11: libs})
report = judge(a, b, a_a=True)
counts = report["system_modules"]["counts"]["measured"]["A"]
assert report["verdict"] == "green", report["problems"]
assert counts == {"counted": 0, "mui_excused": 15, "cat_excused": 6, "orphans": 0}
host.print_report(report, "firefox-68", "firefox-68 again")
assert "firefox-68 has in its measured launches: 0 counted (red above 5), 15 .mui excused with their library, 6 .cat excused, 0 orphan .mui" in capsys.readouterr().out
def test_orphan_resource_files_and_libraries_keep_the_cap_and_six_rare_libraries_stay_red():
orphans = [mui("o%d" % i) for i in range(6)]
red = judge(with_system(win(), {11: orphans}), win("again"), a_a=True)
assert red["verdict"] == "red" and red["system_modules"]["counts"]["measured"]["A"]["orphans"] == 6
libs = [dll("r%d" % i) for i in range(6)]
assert judge(with_system(win(), {11: libs + [mui("r0")]}), win("again"), a_a=True)["verdict"] == "red"
five = judge(with_system(win(), {11: libs[:5] + [mui("r0"), CATDIR + "c.cat"]}), win("again"), a_a=True)
assert five["verdict"] == "green" and five["system_modules"]["counts"]["measured"]["A"]["counted"] == 5, "the cap is not raised"
assert host.RARE_LIMIT == 5 and host.RARE_LIMIT_LONG == 30
def test_the_library_is_looked_for_in_the_run_that_has_the_resource_file_both_layers_included():
a = with_system(win(), {11: [mui("w")], "idle": [dll("w")]})
report = judge(with_system(a, {"bare": []}), with_system(win("again"), {"idle": []}), a_a=True)
assert report["system_modules"]["counts"]["measured"]["A"]["mui_excused"] == 1, "its library was opened by a long launch of the same run: seen in that run"
def test_in_an_ab_the_excused_files_stay_listed_per_run_and_a_new_library_shows_through_itself():
published = with_system(win(), {11: [dll("old"), mui("old"), CATDIR + "old.cat"]})
new = "c:" + chr(92) + "windows" + chr(92) + "system32" + chr(92) + "newlib.dll"
candidate = with_system(win("candidate"), {11: [dll("old"), mui("old"), mui("newlib"), CATDIR + "new.cat", new]})
report = judge(published, candidate, expected=[])
assert [d["leaf"] for d in report["differences"]] == ["file." + new], "the new library is red; its resource file and the new catalog are not red on their own"
system = report["system_modules"]
assert system["excused_candidate_only"] == {"mui": [mui("newlib")], "cat": [CATDIR + "new.cat"]} and system["orphans"] == []
assert mui("old") in system["listed_mui_and_cat"]["68"] and CATDIR + "old.cat" in system["listed_mui_and_cat"]["68"] and mui("newlib") in system["listed_mui_and_cat"]["candidate"]
orphan = judge(published, with_system(win("candidate"), {11: [dll("old"), mui("lonely")]}), expected=[])
assert [d["leaf"] for d in orphan["differences"]] == ["file." + mui("lonely")] and orphan["system_modules"]["orphans"] == [mui("lonely")]
# -
# A launch whose parent did not end with 0 is red in EVERY launch of the oracle, and what it left is saved (scripts/ci_crash_evidence.py: run 45030727459 had a firefox-68 parent
# die with -11 in a normal close and nothing was kept). Each recorder is shown on the input that makes it fail: a launch that died.
@@ -2690,18 +2555,16 @@ def test_the_13_wof_streams_of_run_45060573559_are_their_files_and_the_a_a_has_n
assert all(host.wof_base(p) in a_warm for p in WIN_STREAMS), "each of the 13 is a file the run has"
report = judge(a, b, a_a=True)
assert report["problems"] == [] and report["verdict"] == "green" and report["differences"] == []
counts = report["system_modules"]["counts"]["measured"]
assert counts["A"] == {"counted": 0, "mui_excused": 13, "cat_excused": 4, "orphans": 0} and counts["B"]["counted"] == 0
assert report["system_modules"]["rare"]["measured"] == {"A": [], "B": []}, "none of the 13 is rare: the 6 libraries are in both runs, the 7 others are the excused files"
assert not any(e["path"].endswith(host.WOF_STREAM) for e in report["not_judged"]["paths"]), "none of the 13 is a path of its own"
def test_the_same_13_streams_are_red_without_the_mapping_of_a_stream_to_its_file(tmp_path, monkeypatch):
def test_the_same_13_streams_are_paths_of_their_own_listed_and_not_red_without_the_mapping_of_a_stream_to_its_file(tmp_path, monkeypatch):
monkeypatch.setattr(host, "wof_base", lambda name: name)
a, b, a_warm = real_win_runs(tmp_path)
assert [p for p in a_warm if p.endswith(host.WOF_STREAM)] == sorted(WIN_STREAMS)
report = judge(a, b, a_a=True)
assert report["verdict"] == "red" and report["system_modules"]["rare"]["measured"]["A"] == sorted(WIN_STREAMS), "the real 13"
assert len(report["problems"]) == 1 and "the system modules only run A has in its measured launches are 13, more than 5: the class is growing" in report["problems"][0]
assert report["verdict"] == "green", "the real 13 are in the warm-up of run A only: not in all its measured launches"
assert sorted(e["path"] for e in report["not_judged"]["paths"] if e["path"].endswith(host.WOF_STREAM)) == sorted(WIN_STREAMS)
# -
+7 -2
View File
@@ -4,7 +4,8 @@ candidate, against the candidate (e2e, Linux and Windows).
scripts/ci_ab_host.py walks the first steps of the fake web's journey (no internet) with the stock Playwright client, closes the browser and waits for its tree to exit, and
compares the TRACE of the run from the launch to the exit (not a photograph of one instant): the kinds of process (the parent, `-contentproc` with its type, `-sandboxingKind`
and `-isForBrowser` / `-notForBrowser`, the helpers by what they ran) with their count, but for the kinds of type `tab` whose count follows the idle time (only their presence
counts), and the set of host paths the tree touched, whatever is `ours` (its package, profile and temp dirs, the run's cache, its own shared memory) being left out as a class.
counts), and the host paths the tree touched, whatever is `ours` (its package, profile and temp dirs, the run's cache, its own shared memory) being left out as a class. One rule judges
the paths (`file_rule`): red if and only if a path is in all the measured launches of one engine and in no launch of the other; the rest is listed in not-judged-a-a.json and not-judged.json.
Linux: strace of the whole tree. Windows: the process-creation audit (event 4688, with the command line) and an ETW file trace (Kernel-File), which need an administrator, as the
hosted runners are. One browser at a time.
@@ -88,7 +89,7 @@ def test_the_engine_leaves_the_same_footprint_on_the_host_after_the_same_journey
capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=TIMEOUT_S)
(out / "ab-host.log").write_text(done.stdout + "\n--- stderr\n" + done.stderr, encoding="utf-8")
verdict = [line for line in done.stdout.splitlines()
if line.startswith(("DIFF ", "FAIL ", "DECLARED ", "OURS ", "AB HOST", "BROKEN CONTROL", "seed ", "---"))]
if line.startswith(("DIFF ", "FAIL ", "DECLARED ", "OURS ", "AB HOST", "BROKEN CONTROL", "seed ", "---", "NOT JUDGED", "WATCH "))]
control = json.loads((out / "diff-a-a.json").read_text(encoding="utf-8")) if (out / "diff-a-a.json").exists() else {}
assert done.returncode != 2, "the control is broken: the engine differs from itself, what is compared is not stable (nothing is excused: a difference between two traces of one engine is a defect of the comparison)\n" + "\n".join(verdict[:80])
assert done.returncode == 0, "the host footprint differs:\n" + "\n".join(verdict[:80]) + "\n" + done.stderr[-1500:]
@@ -96,6 +97,10 @@ def test_the_engine_leaves_the_same_footprint_on_the_host_after_the_same_journey
names = sorted(p.name for p in out.glob("footprint-*.json"))
assert names == (["footprint-68-again.json", "footprint-68.json", "footprint-candidate.json"] if candidate
else ["footprint-68-again.json", "footprint-68.json"])
listed = ["not-judged-a-a.json"] + (["not-judged.json"] if candidate else [])
for name in listed:
document = json.loads((out / name).read_text(encoding="utf-8"))
assert document["format"] == host.NOT_JUDGED_FORMAT and isinstance(document["paths"], list) and document["launches"]["A"]["measured"] >= 2, name
if candidate:
diff = json.loads((out / "diff.json").read_text(encoding="utf-8"))
assert diff["verdict"] == "green" and diff["differences"] == [] and diff["problems"] == []