Repository navigation
fix(ci): let tshark read the checkout past Ubuntu 26.04's AppArmor profile (#2019) - #2021
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:
Not verified:
Nit: the docs note says reads are allowed only under |
|
The fix is verified on a real Ubuntu 26.04 runner. On this head, Engines (PyShark), parity 3.11 and parity 3.10 (KTLO) all ran on The one red check, Project tests, fails because of #2020: the same three |
|
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 |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
Ubuntu 25.04+ confine
/usr/bin/tsharkwith an AppArmor profile that reads only/tmpand/usr/share/wireshark, so PyShark tests onubuntu-26.04fail withTSharkCrashExceptionretcode 3.engine-tests(PyShark cell only) andpypcap-parity(shared withpypcap-parity-ktloby anchor; KTLO-guarded). When/etc/apparmor.d/tsharkexists it appendsfile r ${GITHUB_WORKSPACE}/**,tolocal/tsharkand runsapparmor_parser -r; a no-op on 24.04.FILE RULE([file] ACCESS FILEGLOB), the form upstream'sprofiles/apparmor.d/tsharkuses; the parser followsinclude if existsand folds included files into its cache-staleness check (parser_lex.l,update_mru_tstamp).tests/project/test_tshark_apparmor_2019.pypins placement/body and runs the script against a scratch/etc/apparmor.d; 7 of 8 fail onmain.unit-tests.ymlline citations the pins check are shifted.Not verified on a real 26.04 runner: this host has no tshark or AppArmor.
Closes #2019