Repository navigation
fix(ci): run GNU timeout in the experimental tests step on any image (#2020) - #2022
Conversation
…ofile (#2019) Ubuntu 25.04+ confine /usr/bin/tshark with an enforcing AppArmor profile that reads only under /tmp and /usr/share/wireshark, so PyShark tests on ubuntu-26.04 runners fail with TSharkCrashException retcode 3. - engine-tests (PyShark) and pypcap-parity (and its KTLO twin) gain a step after the tshark install that, when /etc/apparmor.d/tshark exists, appends 'file r ${GITHUB_WORKSPACE}/**,' to local/tshark and reloads the profile with apparmor_parser -r; a no-op on 24.04. - tests/project/test_tshark_apparmor_2019.py pins the step's placement and runs its script against a scratch /etc/apparmor.d. - Docs: note the AppArmor denial and the fix under PyShark's requirements; shift the unit-tests.yml line citations the new steps moved. Closes #2019
|
GOOD TO GO at A Sonnet cross-review confirmed:
One residual risk: the runner-images 26.04 readme does not list |
|
Verified on a real Ubuntu 26.04 runner: this head's Project tests job ran on The two red checks, Engines (PyShark) and parity 3.11, are #2019's AppArmor denial; their logs show "permission to read the file" on 26.04. That one is fixed by #2021. Each PR fixes the other's red check, so merging both turns |
|
Coverage: 91.55% (unit tier, Python 3.15,
Per-file detail: the |
|
On PRs the "Plain unittest ordering" job is skipped, since it runs only on This host has GNU |
…2020) Ubuntu 26.04 ships uutils coreutils 0.10.0 as `timeout`, whose `--kill-after` sends SIGKILL with the first signal and only to its child: `Run unit tests` lost pytest's teardown grace and exited 137 where GNU's exits 124. The step now resolves `gnutimeout` (GNU 9.7 on that image) where it exists, `timeout` otherwise. - tests/project/test_gnu_timeout_2020.py: no workflow `run:` script gives a bare `timeout` an option; the step resolves before it runs, and its replay runs `gnutimeout` where one is on PATH - adjust the step-text pins in the #1740, #1938 and #1963 tests - docs: workflows.rst says which timeout runs
|
This PR is now stacked on #2021, at head |
85ba99c to
72f84e5
Compare
|
GOOD TO GO at
The stacked tree passes the shared pins (135 passed). CI on this head is the check of both fixes together. |
Please follow the guide below
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Closes #2020. On Ubuntu 26.04
timeoutis uutils 0.10.0, whose--kill-afterSIGKILLs at once and only its child.Run unit tests(experimental.yml) now runsgnutimeout(GNU 9.7) where it exists,timeoutotherwise.docker run ubuntu:26.04, the old step failstest_a_timeout_exits_124,test_the_timeout_ends_the_run_in_progress_and_starts_no_other(137 != 124) andtest_a_tests_step_killed_after_the_timeout_records_137_and_its_time(elapsed 5). The new step passes all three. With uutils, a grandchild that ignores SIGINT outlives the kill; with GNU it does not.tests/project/test_gnu_timeout_2020.pyfails any workflowrun:script that passes an option to a baretimeout. Againstmain's step it gives 4 failed; with this change, 6 pass.timeout 60 apt-get …in unit-tests.yml stays as it is: both builds exit 124 and end the child's children there. Those are CI: tshark can't read captures on Ubuntu 26.04 runners (AppArmor profile) #2019's steps.