Addressing ptest failures for multiple packages#17749
Conversation
c8b4336 to
932a7cb
Compare
932a7cb to
345d053
Compare
Bumps Release and adds a changelog entry on every affected spec. All fixes target failures observed running the package %check stage in the Azure Linux build chroot; no upstream version changes.
345d053 to
36647d5
Compare
15f7255 to
11851b4
Compare
|
Buddy build |
ptest failures for multiple packages
ptest failures for multiple packagesThere was a problem hiding this comment.
Pull request overview
This pull request addresses widespread package test (%check/ptest) failures across the Azure Linux packaging repo by updating spec files to make test execution reliable in the RPM build chroot (via targeted skips/deselects/patches and dependency tweaks), while also bumping Release where needed and updating toolchain manifests accordingly.
Changes:
- Adjust
%checksections across many specs (pinning test deps, switching test runners, adding targeted ignores/deselects/XFAILs, and patching tests for Python 3.12 compatibility). - Add/refresh downstream patches and spec metadata (e.g., missing test files for an nbdkit CVE backport; gevent, future, dtc compatibility fixes).
- Update toolchain/pkggen manifests to reflect the updated
Releaseof impacted toolchain components.
Reviewed changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| toolkit/resources/manifests/package/toolchain_x86_64.txt | Updates toolchain manifest entries for debugedit/libtool/libltdl release bumps. |
| toolkit/resources/manifests/package/toolchain_aarch64.txt | Updates toolchain manifest entries for debugedit/libtool/libltdl release bumps. |
| toolkit/resources/manifests/package/pkggen_core_x86_64.txt | Updates core pkggen manifest for libtool/debugedit/libltdl release bumps. |
| toolkit/resources/manifests/package/pkggen_core_aarch64.txt | Updates core pkggen manifest for libtool/debugedit/libltdl release bumps. |
| SPECS/python-urllib3/python-urllib3.spec | Pins pytest <9 during %check to keep urllib3 tests running under newer pytest behavior. |
| SPECS/python-twisted/python-twisted.spec | Replaces long/hanging tox suite with a curated trial smoke subset; adjusts BRs. |
| SPECS/python-tqdm/python-tqdm.spec | Ignores pandas-dependent tests broken by pandas API removals. |
| SPECS/python-tox-current-env/python-tox-current-env.spec | Pins packaging in %check and tolerates tox failures due to chroot-incompatible integration tests. |
| SPECS/python-toolz/python-toolz.spec | Replaces nose with pytest for Python 3.12; pins packaging and excludes a known-broken test. |
| SPECS/python-sqlalchemy/python-sqlalchemy.spec | Patches async event-loop behavior for Python 3.12; drops doc copyright html; ignores mypy tests. |
| SPECS/python-sphinx/python-sphinx.spec | Adds filelock BR; removes unreliable pip-upgrade bootstrap; expands ignore/deselect lists. |
| SPECS/python-setuptools_scm/python-setuptools_scm.spec | Pins packaging in %check to avoid conflicts with RPM-managed packaging. |
| SPECS/python-routes/python-routes.spec | Pins packaging and unpins tox to allow tox 4 for py312 environment. |
| SPECS/python-responses/python-responses.spec | Pins packaging in %check to avoid conflicts with RPM-managed packaging. |
| SPECS/python-remoto/python-remoto.spec | Sed-patches tests for newer pytest setup semantics. |
| SPECS/python-pytest-benchmark/python-pytest-benchmark.spec | Installs editable to expose plugin entry points; suppresses warnings and excludes broken tests. |
| SPECS/python-pycodestyle/python-pycodestyle.spec | Pins packaging in %check to avoid conflicts with RPM-managed packaging. |
| SPECS/python-pexpect/python-pexpect.spec | Patches asserts for Python 3.12; ignores tests requiring SSH/removed asyncio APIs. |
| SPECS/python-pbr/python-pbr.spec | Replaces tox with direct stestr; adds BRs and excludes self-bootstrap tests. |
| SPECS/python-markdown/python-markdown.spec | Sed-skips a couple tests broken by Python 3.12 html.parser behavior changes. |
| SPECS/python-logutils/python-logutils.spec | Sed-patches tests for Python 3.12 unittest/log-level behavior changes. |
| SPECS/python-google-pasta/python-google-pasta.spec | Switches %check to pytest and excludes tests broken by Python 3.12 AST changes. |
| SPECS/python-gevent/skip-irrelevant-tests.patch | Tightens gevent’s test exclusions/timeouts to stabilize suite in chroot. |
| SPECS/python-gevent/python-gevent.spec | Documents and applies the improved gevent test exclusions (replacing prior broad tolerance). |
| SPECS/python-fields/python-fields.spec | Pins pytest <9 during %check for duplicate parametrize-ID behavior changes. |
| SPECS/python-distlib/python-distlib.spec | Expands pytest exclusion set for env-dependent tests. |
| SPECS/python-coverage/python-coverage.spec | Replaces non-functional tox bootstrap with direct pytest run; adds BRs and ignores/deselects. |
| SPECS/python-cherrypy/python-cherrypy.spec | Adds an explicit list of tox deselects for chroot-specific failures. |
| SPECS/python-astunparse/python-astunparse.spec | Switches %check to pytest; deselects match-AST-related failure; adds pytest BR. |
| SPECS/perl-List-MoreUtils/perl-List-MoreUtils.spec | Removes unavailable XS bootstrap and runs only pure-perl tests. |
| SPECS/nbdkit/nbdkit.spec | Skips known chroot-incompatible tests; marks one OCaml test XFAIL; updates release. |
| SPECS/nbdkit/CVE-2025-47712.patch | Extends CVE backport patch to include a missing test script referenced by Makefile. |
| SPECS/man-db/man-db.spec | Marks a single groff/font-dependent manpage check as XFAIL. |
| SPECS/m2crypto/m2crypto.spec | Moves %check to pytest with documented Python 3.12 limitations; adds BRs and tolerates failures. |
| SPECS/libtool/libtool.spec | Skips only the known-broken tests via TESTSUITEFLAGS while keeping other regressions fatal. |
| SPECS/keyutils/keyutils.spec | Makes %check tolerant due to request_key host-namespace behavior. |
| SPECS/future/future.spec | Adds imp-removal patch for Python 3.12+; expands ignore/deselect set in %check. |
| SPECS/future/future-fix-imp-removal.patch | Implements imp→importlib fallback for Python 3.12+. |
| SPECS/fillup/fillup.spec | Disables parallel make flags for non-parallel-safe test target. |
| SPECS/fakeroot/fakeroot.spec | Splits/retries tcp test variant and fixes COPYING placement under %license. |
| SPECS/dtc/fix-check-err-tuple.patch | Fixes SWIG tuple return handling in pylibfdt wrapper to keep tests passing. |
| SPECS/dtc/dtc.spec | Adds the SWIG tuple-handling patch and bumps release. |
| SPECS/debugedit/debugedit.spec | Replaces a broken check macro with explicit make ... check. |
| SPECS/atftp/atftp.spec | Adds PCRE2 support and disables %check due to upstream tests being interactive/network-dependent. |
11851b4 to
7612e9d
Compare
7612e9d to
23a1ae7
Compare
mfrw
left a comment
There was a problem hiding this comment.
Hi sir, there are a few suggestion of duplicate use of python dependcies - rest the PR looks good.
Thank you for this - this is a massive effort :)
[sorry took a little more time to review - given the size of the change]
| - Skip exactly tests 66 (link-order, broken with binutils >= 2.39) and | ||
| 169 (cmdline_wrap, cascades from 66) via TESTSUITEFLAGS instead of | ||
| swallowing all `make check` failures. Any other regression now | ||
| fails the build. |
There was a problem hiding this comment.
This is a really good approach IMHO.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Fix failing core ptest across packages
Summary
Summary
Bumps
Releaseand adds a changelog entry on every affected spec. Per-spec rationale:%checkentirely (set to:). Upstreamtest/test.shis an interactive end-to-end network test (sudo+tmpfs, multiple SSH hosts for multicast) and is not runnable in a non-interactive build chroot. Upstream's ownredhat/atftp.spec.inships no%checkfor the same reason. Also addpcre2-develBR and--enable-libpcre.%make_build_checkmacro with an explicitmake %{?_smp_mflags} checkin%checkso the test target actually runs.fix-check-err-tuple.patchto handle SWIG returning a tuple instead of an integer fromfdt_get_mem_rsvinpylibfdt(make checkitself is unchanged).obj-sysvandobj-tcptest runs and retry thetcpvariant once to ride out intermittentt.tarfailures in the chroot; also moveCOPYINGfrom%docto%licenseso the toolkit license-checker no longer flags it.%{?_smp_mflags}frommake testin%check; the test target is not parallel-safe.future-fix-imp-removal.patch(fall back toimportlibwhen theimpmodule is unavailable, Python 3.12+); expand the pytest-kexclusion list and add 10--ignoreentries for test modules that still depend onimpor stdlib modules removed in 3.12.make -k test; thekeyctl/requesting/validcase invokes the kernelrequest_keycallout which spawns/sbin/request-keyin the host pid/mount namespace and cannot see the chroot-installed binary. The other ~140 tests pass.make checkwithTESTSUITEFLAGS='1-65 67-168'to skip exactly test 66 (link-order, broken withbinutils >= 2.39— debbugs #58105) and test 169 (cmdline_wrap, which cascades from any earlier failure including 66). Any other regression still hard-fails the build.setup.py testwithpytest, copy systemsixover the bundledM2Crypto/six.pyso the test run surfaces the real underlying error in the log, and tolerate (|| :) because M2Crypto 0.38.0 has two upstream incompatibilities with Python 3.12 that cannot be fixed at the spec level: (1) the bundledsix.moveslazy importer is broken by 3.12 importlib changes, and (2)SSL/ssl_dispatcher.pyimportsasyncore, which was removed by PEP 594. These are fixed in M2Crypto >= 0.40; the day this package is rebased,%checkbecomes meaningful with no further work. Addpython3-pytestandpython3-sixBRs.make check XFAIL_TESTS="man1/lexgrog.1"; thelexgrog.1page trips groff's line-adjust check due to the missingCW(constant-width) font in the build chroot. The other 11 man-page tests still hard-fail on regression.tests/test-blocksize-extents-overflow.sh(completes the CVE-2025-47712 backport — without itmake checkaborted with No rule to make target); skip 10 chroot-incompatible tests (5 TLS — Azure Linux gnutls 3.8.x rejects the test PKI; 3 OCaml — 1.35.3's OCaml plugin is incompatible with ocaml 5.x multicore; 2 file-plugin dir-mode — upstreamfree(): invalid pointerunderMALLOC_CHECK_=1) and XFAILtest-ocaml-errorcodes.cpan -i List::MoreUtils::XSbootstrap from%check(XS package is not available in the build env) and run only the pure-perl tests viamake test TEST_FILES="t/pureperl/*.t".setup.py testwithpytestand deselecttests/test_unparse.py::UnparseTestCase::test_files; astunparse 1.6.3 has no_Matchhandler for the Python 3.10+ match-statement AST. All other tests still hard-fail. Addpython3-pytestBR.--deselects in thetoxinvocation (multipart-form half-close timing, timing-sensitive bus/conn/gc tests, range-header parsing, SIGHUP-daemonized reload). All other test failures still hard-fail.pip3 install -r requirements/dev.pip; toxchain silently ran zero tests (the rpm-installed pip has noRECORDfile, so the install aborted before tox was present). Replace it with a direct pytest invocation: build the encoded-source zip viaigor.py zip_mods, copy the builtCTracer.sointo the source tree soCOVERAGE_CORE=ctraceresolves correctly, ignore 4 test modules (test_concurrency.pyandtest_oddball.pyimportflakywhich lives in SPECS-EXTENDED and can't be a core BR;test_process.pyandtest_venv.pyneed subprocesses / virtualenv) and deselect 10 environment-dependent tests. Addpython3-execnet,python3-hypothesis,python3-pytest-xdist,python3-sortedcontainersBRs.-kexclusion to also skiptest_package_data; depends on package-data layout that is not reliable in the build env.pytest>=5.4.0,<9in the%checkbootstrap; pytest 9.x rejects duplicate parametrize IDs (test_tuple_pickleusesloadstwice).%tox || :with proper scoped exclusions via an updatedskip-irrelevant-tests.patch: (1) add 2 atexit-sensitive stdlib tests to gevent's nativedisabled_testslist, (2) decorate one timing-flaky core test with@unittest.skip, (3) neutralizeTestEtcHosts(synthetic resolver comparison that recurses in restricted DNS environments), (4) bump per-file test timeout 100s → 300s, (5) skip the monkey-patched stdlibtest_socket.pyentirely (upstream itself flags it as flaky under monkey-patching).%toxnow runs clean — no|| :.setup.py testwithpytest; excludePrefixSuffixGoldenTest(51 failures from Python 3.12 AST changes) and thefstring/inline_*tests that error from the same AST changes. Addpython3-pipBR.%prep(replaceassertEqualswithassertEqualintest_dictconfig.py; add explicitl.setLevel(logging.WARNING)intest_adapter.py,test_testing.py,test_queue.py).%{pkgname}to%autosetup -nso the source dir matchesmarkdown-3.8.2; rename two test methods (test_raw_missing_close_bracket,test_unclosed_comment_*) to skip them — both fail due to Python 3.12html.parserbehaviour changes.tox 3.x+virtualenv 21.xcan no longer editable-install pbr from source under modern setuptools. Replace tox with a directstestrinvocation and exclude 5 tests (test_freeze_command,test_console_script_{develop,install},test_pep_517_support,test_requirement_parsing) that recursively pip-install pbr-from-source inside a PEP 517 isolated env where pbr'ssetup.pycannot find itself. Fixed upstream in pbr >= 6.1. Addpython3-virtualenvandpython3-wheelBRs.assertRaisesRegex(assertRaisesRegexpwas removed in Python 3.12);--ignoretest_pxssh.py(needs an SSH server) andtest_async.py(usesasyncio.coroutine, removed in 3.12).packaging==23.2in the test bootstrap to avoid the uninstall conflict with the system RPM-managedpackaging.pip3 install -e .so the pytest plugin entry point is discovered; suppressast.StrDeprecationWarning; extend the-kexclusion list with 10 more tests broken by Python 3.12CodeType/ pytest output-format differences.def setup(self)→def setup_method(self)intest_process.py/test_util.py; newer pytest no longer auto-invokessetupon plain (non-unittest) classes.packaging==23.2in%checkto avoid the uninstall conflict with the system RPM-managedpackaging.packaging==23.2and drop thetox==3.4.0pin (tox 4.x is required for thepy312environment).packaging==23.2in%checkto avoid the uninstall conflict with the system RPM-managedpackaging.python3-filelockBR (two test modules failed pytest collection without it); drop the unreliablepip install --upgradebootstrap (rpm-installed pip has noRECORDfile); extend--ignorewith three more modules that depend onhtml5libvia docutils (test_build_texinfo,test_domain_std,test_smartquotes—html5libcannot be a core BR because its transitivewebencodingsdep lives in SPECS-EXTENDED); deselect 7 version-specific tests (test_enum_class,test_autodoc_type_aliases,test_autodoc_default_options,test_viewcode,test_viewcode_linenos, twotest_intltranslation cases) that are fixed in later Sphinx releases. Any other failure still hard-fails.lib/sqlalchemy/util/_concurrency_py3k.pyto create a new event loop when none is running (Python 3.12 deprecatedget_event_loop()); pass--ignore=test/ext/mypy --ignore=test/typing/test_mypy.py(version-specific mypy output mismatches); drop the redundantdoc/copyright.htmlHTML rendering ofLICENSEand add%license LICENSEto the-docsubpackage so the toolkit license-checker no longer flags it.nosetestswithpytest(noseis incompatible with Python 3.12 — noimpmodule); pinpackaging==23.2; excludetest_inspect_wrapped_property(Python 3.12inspectbehaviour change).packaging==23.2(avoid uninstall conflict) and toleratetox -e py%{python3_version_nodots}because 177 of 185 integration tests invoketoxinternally, which itself fails inside the build chroot.--ignore=tests/tests_pandas.py; the file usespandas.core.common.is_builtin_funcwhich was removed in newer pandas releases.tox -e nocov-posix-alldepssuite (>10000 tests) repeatedly hangs in CI past 5h on conch/names/dns/process/multicast modules with no captured culprit. Replace it with a curatedtrialsmoke-test subset on 7 pure-logic modules (test_compat,test_error,test_cooperator,test_paths,test_text,test_strerror,test_randbytes— ~200 unit tests, no network, no spawned children, no privileged sockets, no extra PyPI deps). Drop the BRs and setup steps (pip,sudo,net-tools,tzdata,git, multicast route, test user) that only existed to bootstrap tox; addpython3-attrs,python3-constantly,python3-hyperlink,python3-typing-extensionsBRs thattrialneeds to importtwisted. Once we upgrade the package, we can revert this.pytest>=7.4.0,<9in the%checkbootstrap; pytest 9.x rejects non-Collection iterables (itertools.chain) inparametrizeargvaluesused by the urllib3 test suite.Testing
Each spec was rebuilt locally with:
and the
ptestlog was inspected to confirm only the intended skips / XFAILs trigger and that no real regression is masked.Change Log
Does this affect the toolchain?
YES