Merge pull request #629 from oss-invisible/ci/windows-worker-dumps
ci: every Windows e2e job leaves a full dump of a crashing python.exe in its evidence
This commit is contained in:
5 files changed
+554
-2
No files matched your search
@@ -424,6 +424,28 @@ jobs:
|
||||
if ($b.Width -lt 1920 -or $b.Height -lt 1080) { Write-Error "the runner's screen is $($b.Width)x$($b.Height), not 1920x1080: the OS cursor could not be parked outside the browser window"; exit 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
# The native crash of the pytest worker ("node down: Not properly terminated", "Windows fatal exception: access violation" in a thread Python has no state for, jobs
|
||||
# 138402013609 and 138966622085): Windows Error Reporting writes a FULL dump of a python.exe that dies from an unhandled exception, into the evidence folder the job
|
||||
# uploads (dumps/python), so the faulting module and stack can be read. HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\<image>, DumpType 2 = full,
|
||||
# DumpCount = how many are kept: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps . faulthandler (pytest enables it) is a vectored handler that
|
||||
# returns EXCEPTION_CONTINUE_SEARCH, so WER still sees the exception. BEFORE the first pytest step; the summary step before the upload reads what it left.
|
||||
- name: Windows Error Reporting keeps a full dump of a python.exe that crashes (into the evidence)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$dumps = Join-Path $env:RUNNER_TEMP 'invpw-evidence\dumps\python'
|
||||
New-Item -ItemType Directory -Force -Path $dumps | Out-Null
|
||||
$wer = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting'
|
||||
New-Item -Force -Path $wer | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name Disabled -PropertyType DWord -Value 0 | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name DontShowUI -PropertyType DWord -Value 1 | Out-Null
|
||||
$key = "$wer\LocalDumps\python.exe"
|
||||
New-Item -Force -Path $key | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpFolder -PropertyType ExpandString -Value $dumps | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpType -PropertyType DWord -Value 2 | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpCount -PropertyType DWord -Value 3 | Out-Null
|
||||
Get-ItemProperty -Path $key | Format-List DumpFolder, DumpType, DumpCount
|
||||
Get-ItemProperty -Path $wer | Format-List Disabled, DontShowUI
|
||||
- name: Install wrapper + test deps (the stock client is in the dev extra)
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
@@ -439,6 +461,18 @@ jobs:
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
run: INVPW_BINARY_PATH="$FF" python -u -m pytest -m e2e -p no:cacheprovider -v tests/test_control_a_selects_all_in_a_field_e2e.py
|
||||
- name: What Windows Error Reporting kept of a crashing python.exe (size, faulting module, in the evidence)
|
||||
if: always()
|
||||
shell: bash
|
||||
run: python scripts/ci_wer_dumps.py "$RUNNER_TEMP/invpw-evidence/dumps/python"
|
||||
- name: Upload what the tests saved
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: invpw-evidence-windows-control-a-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: ${{ runner.temp }}/invpw-evidence
|
||||
if-no-files-found: ignore
|
||||
retention-days: 14
|
||||
|
||||
# THE SAME e2e ON WINDOWS (Federico, 12/11: every test of the product runs on Linux AND Windows; where Windows behaves
|
||||
# differently the test adapts to the system). Before this, 562 of the 808 e2e had never run on Windows in any round. The census
|
||||
@@ -481,6 +515,28 @@ jobs:
|
||||
if ($b.Width -lt 1920 -or $b.Height -lt 1080) { Write-Error "the runner's screen is $($b.Width)x$($b.Height), not 1920x1080: the OS cursor could not be parked outside the browser window"; exit 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
# The native crash of the pytest worker ("node down: Not properly terminated", "Windows fatal exception: access violation" in a thread Python has no state for, jobs
|
||||
# 138402013609 and 138966622085): Windows Error Reporting writes a FULL dump of a python.exe that dies from an unhandled exception, into the evidence folder the job
|
||||
# uploads (dumps/python), so the faulting module and stack can be read. HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\<image>, DumpType 2 = full,
|
||||
# DumpCount = how many are kept: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps . faulthandler (pytest enables it) is a vectored handler that
|
||||
# returns EXCEPTION_CONTINUE_SEARCH, so WER still sees the exception. BEFORE the first pytest step; the summary step before the upload reads what it left.
|
||||
- name: Windows Error Reporting keeps a full dump of a python.exe that crashes (into the evidence)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$dumps = Join-Path $env:RUNNER_TEMP 'invpw-evidence\dumps\python'
|
||||
New-Item -ItemType Directory -Force -Path $dumps | Out-Null
|
||||
$wer = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting'
|
||||
New-Item -Force -Path $wer | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name Disabled -PropertyType DWord -Value 0 | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name DontShowUI -PropertyType DWord -Value 1 | Out-Null
|
||||
$key = "$wer\LocalDumps\python.exe"
|
||||
New-Item -Force -Path $key | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpFolder -PropertyType ExpandString -Value $dumps | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpType -PropertyType DWord -Value 2 | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpCount -PropertyType DWord -Value 3 | Out-Null
|
||||
Get-ItemProperty -Path $key | Format-List DumpFolder, DumpType, DumpCount
|
||||
Get-ItemProperty -Path $wer | Format-List Disabled, DontShowUI
|
||||
# The A/A of the three A/B oracles (page, network, host) runs on the first seeds of the candidate set on a pull request, and on ALL of them when the pull request
|
||||
# changes a file of that oracle (scripts/ci_ab_pr_seeds.py holds the lists). The checkout is shallow, so the script fetches the base commit and lists the files that
|
||||
# differ from it (`git diff --name-only <base> HEAD`: HEAD is the merge commit, so this is the pull request's own change); the tests read the variables it prints.
|
||||
@@ -544,6 +600,10 @@ jobs:
|
||||
path: ${{ runner.temp }}/e2e-junit-*.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
- name: What Windows Error Reporting kept of a crashing python.exe (size, faulting module, in the evidence)
|
||||
if: always()
|
||||
shell: bash
|
||||
run: python scripts/ci_wer_dumps.py "$RUNNER_TEMP/invpw-evidence/dumps/python"
|
||||
- name: Upload what the tests saved
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
@@ -679,6 +739,28 @@ jobs:
|
||||
if ($b.Width -lt 1920 -or $b.Height -lt 1080) { Write-Error "the runner's screen is $($b.Width)x$($b.Height), not 1920x1080: the OS cursor could not be parked outside the browser window"; exit 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
# The native crash of the pytest worker ("node down: Not properly terminated", "Windows fatal exception: access violation" in a thread Python has no state for, jobs
|
||||
# 138402013609 and 138966622085): Windows Error Reporting writes a FULL dump of a python.exe that dies from an unhandled exception, into the evidence folder the job
|
||||
# uploads (dumps/python), so the faulting module and stack can be read. HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\<image>, DumpType 2 = full,
|
||||
# DumpCount = how many are kept: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps . faulthandler (pytest enables it) is a vectored handler that
|
||||
# returns EXCEPTION_CONTINUE_SEARCH, so WER still sees the exception. BEFORE the first pytest step; the summary step before the upload reads what it left.
|
||||
- name: Windows Error Reporting keeps a full dump of a python.exe that crashes (into the evidence)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$dumps = Join-Path $env:RUNNER_TEMP 'invpw-evidence\dumps\python'
|
||||
New-Item -ItemType Directory -Force -Path $dumps | Out-Null
|
||||
$wer = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting'
|
||||
New-Item -Force -Path $wer | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name Disabled -PropertyType DWord -Value 0 | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name DontShowUI -PropertyType DWord -Value 1 | Out-Null
|
||||
$key = "$wer\LocalDumps\python.exe"
|
||||
New-Item -Force -Path $key | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpFolder -PropertyType ExpandString -Value $dumps | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpType -PropertyType DWord -Value 2 | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpCount -PropertyType DWord -Value 3 | Out-Null
|
||||
Get-ItemProperty -Path $key | Format-List DumpFolder, DumpType, DumpCount
|
||||
Get-ItemProperty -Path $wer | Format-List Disabled, DontShowUI
|
||||
- name: How many seeds the A/A of each oracle visits (all of them when the pull request touches the oracle)
|
||||
if: github.event_name == 'pull_request'
|
||||
shell: bash
|
||||
@@ -721,6 +803,10 @@ jobs:
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: What Windows Error Reporting kept of a crashing python.exe (size, faulting module, in the evidence)
|
||||
if: always()
|
||||
shell: bash
|
||||
run: python scripts/ci_wer_dumps.py "$RUNNER_TEMP/invpw-evidence/dumps/python"
|
||||
- name: Upload what the test saved
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
@@ -876,6 +962,28 @@ jobs:
|
||||
if ($b.Width -lt 1920 -or $b.Height -lt 1080) { Write-Error "the runner's screen is $($b.Width)x$($b.Height), not 1920x1080: the OS cursor could not be parked outside the browser window"; exit 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
# The native crash of the pytest worker ("node down: Not properly terminated", "Windows fatal exception: access violation" in a thread Python has no state for, jobs
|
||||
# 138402013609 and 138966622085): Windows Error Reporting writes a FULL dump of a python.exe that dies from an unhandled exception, into the evidence folder the job
|
||||
# uploads (dumps/python), so the faulting module and stack can be read. HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\<image>, DumpType 2 = full,
|
||||
# DumpCount = how many are kept: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps . faulthandler (pytest enables it) is a vectored handler that
|
||||
# returns EXCEPTION_CONTINUE_SEARCH, so WER still sees the exception. BEFORE the first pytest step; the summary step before the upload reads what it left.
|
||||
- name: Windows Error Reporting keeps a full dump of a python.exe that crashes (into the evidence)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$dumps = Join-Path $env:RUNNER_TEMP 'invpw-evidence\dumps\python'
|
||||
New-Item -ItemType Directory -Force -Path $dumps | Out-Null
|
||||
$wer = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting'
|
||||
New-Item -Force -Path $wer | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name Disabled -PropertyType DWord -Value 0 | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name DontShowUI -PropertyType DWord -Value 1 | Out-Null
|
||||
$key = "$wer\LocalDumps\python.exe"
|
||||
New-Item -Force -Path $key | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpFolder -PropertyType ExpandString -Value $dumps | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpType -PropertyType DWord -Value 2 | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpCount -PropertyType DWord -Value 3 | Out-Null
|
||||
Get-ItemProperty -Path $key | Format-List DumpFolder, DumpType, DumpCount
|
||||
Get-ItemProperty -Path $wer | Format-List Disabled, DontShowUI
|
||||
- name: How many seeds the A/A of each oracle visits (all of them when the pull request touches the oracle)
|
||||
if: github.event_name == 'pull_request'
|
||||
shell: bash
|
||||
@@ -984,6 +1092,10 @@ jobs:
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: What Windows Error Reporting kept of a crashing python.exe (size, faulting module, in the evidence)
|
||||
if: always()
|
||||
shell: bash
|
||||
run: python scripts/ci_wer_dumps.py "$RUNNER_TEMP/invpw-evidence/dumps/python"
|
||||
- name: Upload what the test saved
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
@@ -1120,6 +1232,28 @@ jobs:
|
||||
if ($b.Width -lt 1920 -or $b.Height -lt 1080) { Write-Error "the runner's screen is $($b.Width)x$($b.Height), not 1920x1080: the OS cursor could not be parked outside the browser window"; exit 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
# The native crash of the pytest worker ("node down: Not properly terminated", "Windows fatal exception: access violation" in a thread Python has no state for, jobs
|
||||
# 138402013609 and 138966622085): Windows Error Reporting writes a FULL dump of a python.exe that dies from an unhandled exception, into the evidence folder the job
|
||||
# uploads (dumps/python), so the faulting module and stack can be read. HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\<image>, DumpType 2 = full,
|
||||
# DumpCount = how many are kept: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps . faulthandler (pytest enables it) is a vectored handler that
|
||||
# returns EXCEPTION_CONTINUE_SEARCH, so WER still sees the exception. BEFORE the first pytest step; the summary step before the upload reads what it left.
|
||||
- name: Windows Error Reporting keeps a full dump of a python.exe that crashes (into the evidence)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$dumps = Join-Path $env:RUNNER_TEMP 'invpw-evidence\dumps\python'
|
||||
New-Item -ItemType Directory -Force -Path $dumps | Out-Null
|
||||
$wer = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting'
|
||||
New-Item -Force -Path $wer | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name Disabled -PropertyType DWord -Value 0 | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name DontShowUI -PropertyType DWord -Value 1 | Out-Null
|
||||
$key = "$wer\LocalDumps\python.exe"
|
||||
New-Item -Force -Path $key | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpFolder -PropertyType ExpandString -Value $dumps | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpType -PropertyType DWord -Value 2 | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpCount -PropertyType DWord -Value 3 | Out-Null
|
||||
Get-ItemProperty -Path $key | Format-List DumpFolder, DumpType, DumpCount
|
||||
Get-ItemProperty -Path $wer | Format-List Disabled, DontShowUI
|
||||
- name: How many seeds the A/A of each oracle visits (all of them when the pull request touches the oracle)
|
||||
if: github.event_name == 'pull_request'
|
||||
shell: bash
|
||||
@@ -1162,6 +1296,10 @@ jobs:
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: What Windows Error Reporting kept of a crashing python.exe (size, faulting module, in the evidence)
|
||||
if: always()
|
||||
shell: bash
|
||||
run: python scripts/ci_wer_dumps.py "$RUNNER_TEMP/invpw-evidence/dumps/python"
|
||||
- name: Upload what the test saved
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
@@ -1328,6 +1466,28 @@ jobs:
|
||||
if ($b.Width -lt 1920 -or $b.Height -lt 1080) { Write-Error "the runner's screen is $($b.Width)x$($b.Height), not 1920x1080: the OS cursor could not be parked outside the browser window"; exit 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
# The native crash of the pytest worker ("node down: Not properly terminated", "Windows fatal exception: access violation" in a thread Python has no state for, jobs
|
||||
# 138402013609 and 138966622085): Windows Error Reporting writes a FULL dump of a python.exe that dies from an unhandled exception, into the evidence folder the job
|
||||
# uploads (dumps/python), so the faulting module and stack can be read. HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\<image>, DumpType 2 = full,
|
||||
# DumpCount = how many are kept: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps . faulthandler (pytest enables it) is a vectored handler that
|
||||
# returns EXCEPTION_CONTINUE_SEARCH, so WER still sees the exception. BEFORE the first pytest step; the summary step before the upload reads what it left.
|
||||
- name: Windows Error Reporting keeps a full dump of a python.exe that crashes (into the evidence)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$dumps = Join-Path $env:RUNNER_TEMP 'invpw-evidence\dumps\python'
|
||||
New-Item -ItemType Directory -Force -Path $dumps | Out-Null
|
||||
$wer = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting'
|
||||
New-Item -Force -Path $wer | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name Disabled -PropertyType DWord -Value 0 | Out-Null
|
||||
New-ItemProperty -Force -Path $wer -Name DontShowUI -PropertyType DWord -Value 1 | Out-Null
|
||||
$key = "$wer\LocalDumps\python.exe"
|
||||
New-Item -Force -Path $key | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpFolder -PropertyType ExpandString -Value $dumps | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpType -PropertyType DWord -Value 2 | Out-Null
|
||||
New-ItemProperty -Force -Path $key -Name DumpCount -PropertyType DWord -Value 3 | Out-Null
|
||||
Get-ItemProperty -Path $key | Format-List DumpFolder, DumpType, DumpCount
|
||||
Get-ItemProperty -Path $wer | Format-List Disabled, DontShowUI
|
||||
- name: Install wrapper + test deps (+ Playwright ONLY as a system tool)
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
@@ -1366,6 +1526,10 @@ jobs:
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: What Windows Error Reporting kept of a crashing python.exe (size, faulting module, in the evidence)
|
||||
if: always()
|
||||
shell: bash
|
||||
run: python scripts/ci_wer_dumps.py "$RUNNER_TEMP/invpw-evidence/dumps/python"
|
||||
- name: Upload what the test saved
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
{"id": "wrapper.e2e.fakeweb", "giro": "G2", "os": ["linux", "windows"], "min_tests": 7, "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: every step as stock, and every page left only once its noise is done), each judged against what stock Firefox does, as tests/fakeweb/pages.json declares it. 7 = 3 + 4 (the last two: a `load` that takes 20 s is a step that succeeds, and a `load` that never comes ends in an error that names the wait and the page). 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).", "stock_firefox": true, "extra_steps": ["fakeweb_profiles"]},
|
||||
{"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": 4035, "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_handle_action_walks_like_a_selector_action.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_refuses_what_would_touch_the_page.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_test_that_is_not_e2e_never_leaves_the_machine.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_network_turn_credential.py", "tests/test_ab_network_turn_deallocation.py", "tests/test_ab_network_webrtc_evidence.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_linux_legs_read_no_mirror.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_windows_temp_is_on_d.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_action_is_pinned_by_commit_sha.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_fakeweb_stock_unsettled.py", "tests/test_fission_idLine truncated
|
||||
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 4039, "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_handle_action_walks_like_a_selector_action.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_refuses_what_would_touch_the_page.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_test_that_is_not_e2e_never_leaves_the_machine.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_network_turn_credential.py", "tests/test_ab_network_turn_deallocation.py", "tests/test_ab_network_webrtc_evidence.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_linux_legs_read_no_mirror.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_windows_temp_is_on_d.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_action_is_pinned_by_commit_sha.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_fakeweb_stock_unsettled.py", "tests/test_fissioLine truncated
|
||||
{"id": "wrapper.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 4057, "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_handle_action_walks_like_a_selector_action.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_refuses_what_would_touch_the_page.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_test_that_is_not_e2e_never_leaves_the_machine.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_network_turn_credential.py", "tests/test_ab_network_turn_deallocation.py", "tests/test_ab_network_webrtc_evidence.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_linux_legs_read_no_mirror.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_windows_temp_is_on_d.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_action_is_pinned_by_commit_sha.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_windows_job_keeps_a_dump_of_a_crashing_python.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_reportLine truncated
|
||||
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 4061, "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_handle_action_walks_like_a_selector_action.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_refuses_what_would_touch_the_page.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_test_that_is_not_e2e_never_leaves_the_machine.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_network_turn_credential.py", "tests/test_ab_network_turn_deallocation.py", "tests/test_ab_network_webrtc_evidence.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_linux_legs_read_no_mirror.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_windows_temp_is_on_d.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_action_is_pinned_by_commit_sha.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_windows_job_keeps_a_dump_of_a_crashing_python.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_reLine 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).", "core_dumps": "invpw-cores"},
|
||||
{"id": "wrapper.e2e.suite.linux.1", "giro": "G2", "os": ["linux"], "min_tests": 447, "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_screenshot_refuses_what_would_touch_the_page_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_throuLine truncated
|
||||
{"id": "wrapper.e2e.suite.linux.2", "giro": "G2", "os": ["linux"], "min_tests": 414, "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
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
r"""Read the full user-mode dumps Windows Error Reporting left for a python.exe that died, and say what each one holds (CI evidence, no debugger needed).
|
||||
|
||||
The Windows e2e jobs set ``HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\python.exe`` (full dump, folder ``<evidence>/dumps/python``)
|
||||
before their tests; when a pytest-xdist worker dies from an unhandled exception ("node down: Not properly terminated", "Windows fatal exception: access violation")
|
||||
WER writes ``python.exe.<pid>.dmp`` there and the evidence artifact carries it. This script runs after the tests (``if: always()``): it lists every dump with its size
|
||||
and reads the header of the MINIDUMP file, with ``struct`` only, to name what a debugger would name first: the thread that raised, the exception code, the faulting
|
||||
address and the module that holds it (with the offset in it), plus the access that failed for an access violation. The summary goes to stdout and to
|
||||
``summary.txt`` beside the dumps. It never fails the job: no dump is the normal case.
|
||||
|
||||
Format of the file: https://learn.microsoft.com/windows/win32/api/minidumpapiset/ (MINIDUMP_HEADER, MINIDUMP_DIRECTORY, MINIDUMP_EXCEPTION_STREAM,
|
||||
MINIDUMP_MODULE). Dump types and the LocalDumps key: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import shutil
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
SIGNATURE = b"MDMP"
|
||||
MODULE_LIST_STREAM = 4
|
||||
EXCEPTION_STREAM = 6
|
||||
MODULE_SIZE = 108 # sizeof(MINIDUMP_MODULE)
|
||||
|
||||
EXCEPTION_NAMES = {
|
||||
0xC0000005: "EXCEPTION_ACCESS_VIOLATION",
|
||||
0xC0000374: "STATUS_HEAP_CORRUPTION",
|
||||
0xC0000409: "STATUS_STACK_BUFFER_OVERRUN (fail fast)",
|
||||
0xC00000FD: "EXCEPTION_STACK_OVERFLOW",
|
||||
0xC000001D: "EXCEPTION_ILLEGAL_INSTRUCTION",
|
||||
0xC0000094: "EXCEPTION_INT_DIVIDE_BY_ZERO",
|
||||
0xC0000026: "STATUS_INVALID_DISPOSITION",
|
||||
0xC0000096: "EXCEPTION_PRIV_INSTRUCTION",
|
||||
0xC0000006: "EXCEPTION_IN_PAGE_ERROR",
|
||||
0x80000003: "EXCEPTION_BREAKPOINT",
|
||||
0xE06D7363: "C++ exception",
|
||||
}
|
||||
ACCESS = {0: "read", 1: "write", 8: "execute (DEP)"}
|
||||
|
||||
|
||||
def read_dump(path: Path) -> dict:
|
||||
"""The facts of one minidump: thread id, exception code and address, the module holding the address. Raises ValueError on a file that is not a minidump."""
|
||||
with open(path, "rb") as f:
|
||||
head = f.read(32)
|
||||
if len(head) < 32 or head[:4] != SIGNATURE:
|
||||
raise ValueError("not a minidump (no MDMP signature)")
|
||||
_sig, _version, n_streams, dir_rva = struct.unpack_from("<4sIII", head, 0)
|
||||
f.seek(dir_rva)
|
||||
directory = [struct.unpack("<III", f.read(12)) for _ in range(n_streams)]
|
||||
out: dict = {"streams": n_streams}
|
||||
modules: list[tuple[int, int, str]] = []
|
||||
for kind, size, rva in directory:
|
||||
if kind == MODULE_LIST_STREAM:
|
||||
f.seek(rva)
|
||||
(count,) = struct.unpack("<I", f.read(4))
|
||||
records = f.read(count * MODULE_SIZE)
|
||||
for i in range(count):
|
||||
base, image_size, _cs, _ts, name_rva = struct.unpack_from("<QIIII", records, i * MODULE_SIZE)
|
||||
here = f.tell()
|
||||
f.seek(name_rva)
|
||||
(nbytes,) = struct.unpack("<I", f.read(4))
|
||||
name = f.read(nbytes).decode("utf-16-le", "replace")
|
||||
f.seek(here)
|
||||
modules.append((base, image_size, name))
|
||||
elif kind == EXCEPTION_STREAM:
|
||||
f.seek(rva)
|
||||
raw = f.read(8 + 8 + 8 + 8 + 8 + 15 * 8)
|
||||
tid, _pad, code, flags, _chain, address, n_params, _pad2 = struct.unpack_from("<IIIIQQII", raw, 0)
|
||||
params = struct.unpack_from("<15Q", raw, 8 + 32)
|
||||
out.update(thread_id=tid, code=code, flags=flags, address=address, params=list(params[:n_params]))
|
||||
out["module_count"] = len(modules)
|
||||
if "address" in out:
|
||||
for base, image_size, name in modules:
|
||||
if base <= out["address"] < base + image_size:
|
||||
out["module"] = name
|
||||
out["offset"] = out["address"] - base
|
||||
break
|
||||
return out
|
||||
|
||||
|
||||
def describe(path: Path) -> str:
|
||||
size = path.stat().st_size
|
||||
head = "%s: %.1f MB" % (path.name, size / 1e6)
|
||||
try:
|
||||
d = read_dump(path)
|
||||
except (ValueError, OSError, struct.error) as e:
|
||||
return "%s, unreadable header: %s" % (head, e)
|
||||
if "code" not in d:
|
||||
return "%s, %d modules, no exception stream (a dump taken on request, not on a fault)" % (head, d["module_count"])
|
||||
name = EXCEPTION_NAMES.get(d["code"], "unknown")
|
||||
lines = [
|
||||
head,
|
||||
" exception 0x%08X %s on thread %d" % (d["code"], name, d["thread_id"]),
|
||||
" at 0x%016X in %s" % (d["address"], ("%s+0x%X" % (d["module"], d["offset"])) if "module" in d else "no module of the dump (JIT or freed code)"),
|
||||
]
|
||||
p = d["params"]
|
||||
if d["code"] in (0xC0000005, 0xC0000006) and len(p) >= 2:
|
||||
lines.append(" failed access: %s of 0x%016X" % (ACCESS.get(p[0], str(p[0])), p[1]))
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def summarize(folder: Path) -> str:
|
||||
dumps = sorted(folder.glob("*.dmp")) if folder.is_dir() else []
|
||||
cdb = shutil.which("cdb") or shutil.which("windbg")
|
||||
lines = ["WER dumps of python.exe in %s: %d" % (folder, len(dumps)), "debugger on the runner: %s" % (cdb or "none (the header reader above is all there is)")]
|
||||
for p in dumps:
|
||||
lines.append(describe(p) + "\n written %s" % time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(p.stat().st_mtime)))
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
folder = Path(argv[1]) if len(argv) > 1 else Path(".")
|
||||
text = summarize(folder)
|
||||
sys.stdout.write(text)
|
||||
if folder.is_dir():
|
||||
(folder / "summary.txt").write_text(text, encoding="utf-8", newline="\n")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv))
|
||||
@@ -0,0 +1,155 @@
|
||||
"""Every Windows job of e2e.yml that runs pytest keeps a full dump of a python.exe that crashes, inside the evidence it uploads.
|
||||
|
||||
The pytest-xdist worker (python.exe) died on the Windows e2e jobs with ``node down: Not properly terminated`` and ``Windows fatal exception: access violation``
|
||||
(jobs 138402013609 and 138966622085), in a thread Python has no state for, so faulthandler named no native frame. Windows Error Reporting writes a full user-mode
|
||||
dump of a process that dies from an unhandled exception when ``HKLM\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps\\python.exe`` says so
|
||||
(DumpFolder, DumpType 2 = full, DumpCount; https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps). faulthandler's handler on Windows is a vectored
|
||||
one that returns EXCEPTION_CONTINUE_SEARCH, so the exception goes on and WER still sees it.
|
||||
|
||||
For each Windows job that runs pytest (found by ``runs-on: windows-*``, so a new one is covered by itself):
|
||||
|
||||
* before its first pytest step a PowerShell step turns WER on (``Disabled`` 0, ``DontShowUI`` 1) and sets LocalDumps of python.exe: ``DumpType`` 2, ``DumpCount`` 3,
|
||||
``DumpFolder`` an expandable string, ``$RUNNER_TEMP/invpw-evidence/dumps/python``: inside the folder the job's evidence upload takes;
|
||||
* after the tests a step with ``if: always()`` runs ``scripts/ci_wer_dumps.py`` on that folder (sizes, faulting module), before the upload;
|
||||
* the upload of ``$RUNNER_TEMP/invpw-evidence`` is ``if: always()``, after the tests.
|
||||
|
||||
Known-bad inputs: a job without the step, the step after the first pytest step, a mini dump (DumpType 1), a key of another executable, a folder outside the evidence, a
|
||||
summary missing or not ``always()``, an upload that is not ``always()``. The green case is the state of the repository.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.unit
|
||||
|
||||
E2E = Path(__file__).resolve().parents[1] / ".github" / "workflows" / "e2e.yml"
|
||||
EXPECTED_WINDOWS_JOBS = {
|
||||
"e2e-windows-control-a", "e2e-windows", "e2e-network-windows", "e2e-host-windows", "e2e-page-windows", "e2e-page-final-windows",
|
||||
}
|
||||
SUMMARY_STEP = " - name: What Windows Error Reporting kept of a crashing python.exe (size, faulting module, in the evidence)\n"
|
||||
WER_STEP = " - name: Windows Error Reporting keeps a full dump of a python.exe that crashes (into the evidence)\n"
|
||||
ALWAYS = " if: always()\n"
|
||||
|
||||
|
||||
def _jobs(text: str) -> dict[str, str]:
|
||||
"""job id -> its text, for the jobs of the file (a job starts at two spaces of indent)."""
|
||||
body = "\n" + text.split("\njobs:\n", 1)[1]
|
||||
starts = [(m.group(1), m.start()) for m in re.finditer(r"\n ([A-Za-z0-9_-]+):[ ]*(?=\n)", body)]
|
||||
out = {}
|
||||
for i, (name, at) in enumerate(starts):
|
||||
out[name] = body[at:starts[i + 1][1] if i + 1 < len(starts) else len(body)]
|
||||
return out
|
||||
|
||||
|
||||
def _windows_jobs(text: str) -> dict[str, str]:
|
||||
return {k: v for k, v in _jobs(text).items() if re.search(r"^ runs-on: windows-", v, re.M)}
|
||||
|
||||
|
||||
def _steps(job: str) -> list[str]:
|
||||
"""The steps of a job, each without its comment lines."""
|
||||
body = job.split("\n steps:\n", 1)[1]
|
||||
chunks = re.split(r"\n(?= - )", "\n" + body)
|
||||
steps = []
|
||||
for c in chunks:
|
||||
lines = [ln for ln in c.split("\n") if not ln.strip().startswith("#")]
|
||||
if any(ln.startswith(" - ") for ln in lines):
|
||||
steps.append("\n".join(lines))
|
||||
return steps
|
||||
|
||||
|
||||
def _problems(name: str, job: str) -> list[str]:
|
||||
steps = _steps(job)
|
||||
runs_pytest = [i for i, s in enumerate(steps) if re.search(r"pytest|run_e2e\.py", s)]
|
||||
if not runs_pytest:
|
||||
return ["%s: no step runs pytest (this test finds them by name: update it with the job)" % name]
|
||||
first, last = runs_pytest[0], runs_pytest[-1]
|
||||
dumps = [i for i, s in enumerate(steps) if "LocalDumps" in s]
|
||||
if len(dumps) != 1:
|
||||
return ["%s: %d steps set LocalDumps, expected 1" % (name, len(dumps))]
|
||||
step = steps[dumps[0]]
|
||||
bad = []
|
||||
if dumps[0] > first:
|
||||
bad.append("%s: LocalDumps is set after the first pytest step" % name)
|
||||
if "shell: pwsh" not in step:
|
||||
bad.append("%s: the LocalDumps step is not PowerShell" % name)
|
||||
if not re.search(r'LocalDumps\\python\.exe"', step):
|
||||
bad.append("%s: LocalDumps is not the key of python.exe" % name)
|
||||
if not re.search(r"-Name DumpType -PropertyType DWord -Value 2\b", step):
|
||||
bad.append("%s: DumpType is not 2 (a full dump)" % name)
|
||||
if not re.search(r"-Name DumpCount -PropertyType DWord -Value 3\b", step):
|
||||
bad.append("%s: DumpCount is not 3" % name)
|
||||
if not re.search(r"-Name DumpFolder -PropertyType ExpandString -Value \$dumps\b", step):
|
||||
bad.append("%s: DumpFolder is not an expandable string" % name)
|
||||
if not re.search(r"\$dumps = Join-Path \$env:RUNNER_TEMP 'invpw-evidence\\dumps\\python'", step):
|
||||
bad.append("%s: the dump folder is not RUNNER_TEMP/invpw-evidence/dumps/python (the folder the evidence upload takes)" % name)
|
||||
if not re.search(r"-Name Disabled -PropertyType DWord -Value 0\b", step):
|
||||
bad.append("%s: WER is not made enabled (Disabled 0)" % name)
|
||||
if not re.search(r"-Name DontShowUI -PropertyType DWord -Value 1\b", step):
|
||||
bad.append("%s: WER may show a dialog (DontShowUI 1 missing)" % name)
|
||||
uploads = [i for i, s in enumerate(steps) if "actions/upload-artifact" in s and re.search(r"^\s+(path: )?\$\{\{ runner\.temp \}\}/invpw-evidence$", s, re.M)]
|
||||
if len(uploads) != 1:
|
||||
return bad + ["%s: %d steps upload the evidence folder, expected 1" % (name, len(uploads))]
|
||||
up = steps[uploads[0]]
|
||||
if uploads[0] < last:
|
||||
bad.append("%s: the evidence is uploaded before the last pytest step" % name)
|
||||
if not re.search(r"^ if: always\(\)$", up, re.M):
|
||||
bad.append("%s: the upload of the evidence is not if: always()" % name)
|
||||
summaries = [i for i, s in enumerate(steps) if "scripts/ci_wer_dumps.py" in s]
|
||||
if len(summaries) != 1:
|
||||
return bad + ["%s: %d steps run scripts/ci_wer_dumps.py, expected 1" % (name, len(summaries))]
|
||||
s = steps[summaries[0]]
|
||||
if not (last < summaries[0] < uploads[0]):
|
||||
bad.append("%s: the dump summary is not between the last pytest step and the upload" % name)
|
||||
if not re.search(r"^ if: always\(\)$", s, re.M):
|
||||
bad.append("%s: the dump summary is not if: always()" % name)
|
||||
if 'invpw-evidence/dumps/python"' not in s:
|
||||
bad.append("%s: the dump summary does not read the dump folder" % name)
|
||||
return bad
|
||||
|
||||
|
||||
def _job() -> str:
|
||||
return _windows_jobs(E2E.read_text(encoding="utf-8"))["e2e-host-windows"]
|
||||
|
||||
|
||||
def test_the_windows_jobs_are_the_ones_this_test_knows():
|
||||
assert set(_windows_jobs(E2E.read_text(encoding="utf-8"))) == EXPECTED_WINDOWS_JOBS
|
||||
|
||||
|
||||
@pytest.mark.parametrize("name", sorted(EXPECTED_WINDOWS_JOBS))
|
||||
def test_the_job_keeps_a_full_dump_of_a_crashing_python_in_its_evidence(name):
|
||||
job = _windows_jobs(E2E.read_text(encoding="utf-8"))[name]
|
||||
assert _problems(name, job) == []
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"mutate, expected",
|
||||
[
|
||||
(lambda t: t.replace("-Name DumpType -PropertyType DWord -Value 2", "-Name DumpType -PropertyType DWord -Value 1"), "DumpType is not 2"),
|
||||
(lambda t: t.replace("LocalDumps\\python.exe", "LocalDumps\\firefox.exe"), "not the key of python.exe"),
|
||||
(lambda t: t.replace("-Name Disabled -PropertyType DWord -Value 0", "-Name Disabled -PropertyType DWord -Value 1"), "Disabled 0"),
|
||||
(lambda t: t.replace("-PropertyType ExpandString", "-PropertyType String"), "not an expandable string"),
|
||||
(lambda t: t.replace("'invpw-evidence\\dumps\\python'", "'crash-dumps'"), "not RUNNER_TEMP/invpw-evidence/dumps/python"),
|
||||
(lambda t: t.replace("scripts/ci_wer_dumps.py", "scripts/nothing.py"), "0 steps run scripts/ci_wer_dumps.py"),
|
||||
(lambda t: t.replace(SUMMARY_STEP + ALWAYS, SUMMARY_STEP), "dump summary is not if: always()"),
|
||||
(lambda t: t.replace(" - name: Upload what the test saved\n" + ALWAYS, " - name: Upload what the test saved\n"), "upload of the evidence is not if: always()"),
|
||||
],
|
||||
)
|
||||
def test_known_bad_jobs_are_refused(mutate, expected):
|
||||
job = _job()
|
||||
bad = mutate(job)
|
||||
assert bad != job, "the mutation did not apply: this test is stale"
|
||||
assert any(expected in p for p in _problems("e2e-host-windows", bad)), _problems("e2e-host-windows", bad)
|
||||
|
||||
|
||||
def test_the_step_after_the_tests_and_the_missing_step_are_refused():
|
||||
job = _job()
|
||||
start = job.index(WER_STEP)
|
||||
end = job.index("\n - ", start + 1)
|
||||
gone = job[:start] + job[end + 1:]
|
||||
assert not any("LocalDumps" in s for s in _steps(gone))
|
||||
assert any("0 steps set LocalDumps" in p for p in _problems("x", gone))
|
||||
moved = job[:start] + job[end + 1:] + "\n" + job[start:end]
|
||||
assert any("after the first pytest step" in p for p in _problems("x", moved)), _problems("x", moved)
|
||||
@@ -0,0 +1,111 @@
|
||||
"""scripts/ci_wer_dumps.py reads the header of a Windows Error Reporting dump and names the thread, the exception and the module that holds the faulting address.
|
||||
|
||||
A minidump is built here byte by byte (MINIDUMP_HEADER, a directory of a module list and an exception stream, MINIDUMP_MODULE records with their UTF-16 names,
|
||||
MINIDUMP_EXCEPTION_STREAM; layouts: https://learn.microsoft.com/windows/win32/api/minidumpapiset/), so no Windows and no debugger is needed:
|
||||
|
||||
* an access violation inside the second module is reported with its code name, the thread id, ``module+offset`` and the failed access (a write of an address);
|
||||
* an address in no module says so; a dump with no exception stream says it was taken on request;
|
||||
* a file that is not a minidump and an empty folder do not raise: the step must never fail the job, and no dump is the normal case;
|
||||
* the summary lists every dump with its size and is written to ``summary.txt`` beside them.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import struct
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "scripts"))
|
||||
import ci_wer_dumps # noqa: E402
|
||||
|
||||
pytestmark = pytest.mark.unit
|
||||
|
||||
PYTHON_BASE, PYTHON_SIZE = 0x00007FF700000000, 0x20000
|
||||
XUL_BASE, XUL_SIZE = 0x00007FFA10000000, 0x5000000
|
||||
|
||||
|
||||
def _minidump(address: int | None, code: int = 0xC0000005, thread: int = 4242, params=(1, 0xDEAD0010)) -> bytes:
|
||||
"""A minidump with two modules and, when ``address`` is not None, an exception stream."""
|
||||
names = ["C:\\hostedtoolcache\\python.exe", "D:\\a\\_temp\\firefox\\xul.dll"]
|
||||
mods = [(PYTHON_BASE, PYTHON_SIZE), (XUL_BASE, XUL_SIZE)]
|
||||
n_streams = 2 if address is not None else 1
|
||||
dir_at = 32
|
||||
module_list_at = dir_at + 12 * n_streams
|
||||
module_list_size = 4 + 108 * len(mods)
|
||||
exception_at = module_list_at + module_list_size
|
||||
exception_size = 8 + 32 + 15 * 8 + 8
|
||||
strings_at = exception_at + (exception_size if address is not None else 0)
|
||||
blobs, rvas, at = [], [], strings_at
|
||||
for n in names:
|
||||
raw = n.encode("utf-16-le")
|
||||
blob = struct.pack("<I", len(raw)) + raw
|
||||
rvas.append(at)
|
||||
blobs.append(blob)
|
||||
at += len(blob)
|
||||
out = struct.pack("<4sIIIIIQ", b"MDMP", 0xA793, n_streams, dir_at, 0, 0, 0x2) # signature, version, streams, directory rva, checksum, time, flags
|
||||
out += struct.pack("<III", 4, module_list_size, module_list_at)
|
||||
if address is not None:
|
||||
out += struct.pack("<III", 6, exception_size, exception_at)
|
||||
out += struct.pack("<I", len(mods))
|
||||
for (base, size), rva in zip(mods, rvas):
|
||||
out += struct.pack("<QIIII", base, size, 0, 0, rva) + b"\0" * (108 - 24)
|
||||
if address is not None:
|
||||
padded = list(params) + [0] * (15 - len(params))
|
||||
out += struct.pack("<IIIIQQII", thread, 0, code, 0, 0, address, len(params), 0) + struct.pack("<15Q", *padded) + struct.pack("<II", 0, 0)
|
||||
for b in blobs:
|
||||
out += b
|
||||
return out
|
||||
|
||||
|
||||
def test_an_access_violation_inside_a_module_is_named_with_its_offset(tmp_path):
|
||||
dump = tmp_path / "python.exe.1234.dmp"
|
||||
dump.write_bytes(_minidump(XUL_BASE + 0x1234))
|
||||
d = ci_wer_dumps.read_dump(dump)
|
||||
assert (d["thread_id"], d["code"], d["address"]) == (4242, 0xC0000005, XUL_BASE + 0x1234)
|
||||
assert d["module"].endswith("xul.dll") and d["offset"] == 0x1234 and d["module_count"] == 2
|
||||
text = ci_wer_dumps.describe(dump)
|
||||
assert "EXCEPTION_ACCESS_VIOLATION on thread 4242" in text
|
||||
assert "xul.dll+0x1234" in text
|
||||
assert "failed access: write of 0x00000000DEAD0010" in text
|
||||
|
||||
|
||||
def test_the_first_module_is_found_too_and_an_address_in_none_says_so(tmp_path):
|
||||
first = tmp_path / "a.dmp"
|
||||
first.write_bytes(_minidump(PYTHON_BASE + 0x10))
|
||||
assert ci_wer_dumps.read_dump(first)["module"].endswith("python.exe")
|
||||
nowhere = tmp_path / "b.dmp"
|
||||
nowhere.write_bytes(_minidump(0x1000))
|
||||
assert "module" not in ci_wer_dumps.read_dump(nowhere)
|
||||
assert "no module of the dump" in ci_wer_dumps.describe(nowhere)
|
||||
|
||||
|
||||
def test_a_dump_with_no_exception_stream_says_it_was_taken_on_request(tmp_path):
|
||||
dump = tmp_path / "c.dmp"
|
||||
dump.write_bytes(_minidump(None))
|
||||
assert "no exception stream" in ci_wer_dumps.describe(dump)
|
||||
|
||||
|
||||
def test_a_file_that_is_not_a_minidump_does_not_raise(tmp_path):
|
||||
junk = tmp_path / "d.dmp"
|
||||
junk.write_bytes(b"not a dump" * 10)
|
||||
assert "unreadable header" in ci_wer_dumps.describe(junk)
|
||||
short = tmp_path / "e.dmp"
|
||||
short.write_bytes(b"MDMP")
|
||||
assert "unreadable header" in ci_wer_dumps.describe(short)
|
||||
|
||||
|
||||
def test_the_summary_lists_every_dump_with_its_size_and_is_saved_beside_them(tmp_path, capsys):
|
||||
(tmp_path / "python.exe.1.dmp").write_bytes(_minidump(XUL_BASE + 8))
|
||||
(tmp_path / "python.exe.2.dmp").write_bytes(_minidump(XUL_BASE + 16))
|
||||
assert ci_wer_dumps.main(["x", str(tmp_path)]) == 0
|
||||
out = capsys.readouterr().out
|
||||
assert ": 2\n" in out and "python.exe.1.dmp" in out and "python.exe.2.dmp" in out and "xul.dll+0x10" in out
|
||||
assert (tmp_path / "summary.txt").read_text(encoding="utf-8") == out
|
||||
|
||||
|
||||
def test_no_dump_and_no_folder_are_the_normal_case(tmp_path, capsys):
|
||||
assert ci_wer_dumps.main(["x", str(tmp_path)]) == 0
|
||||
assert ": 0\n" in capsys.readouterr().out
|
||||
assert ci_wer_dumps.main(["x", str(tmp_path / "missing")]) == 0
|
||||
assert not (tmp_path / "missing").exists()
|
||||
Reference in new issue
Block a user