qa: Improve functional test support on illumos and *BSD#35216
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35216. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
code review ACK 9b7788b |
|
Do we also need to trim the CIDR suffix, see https://github.com/hebasto/bitcoin-core-nightly/actions/runs/25427210121/job/74583785372#step:9:501? |
|
Concept ACK - seems fine given such a small diff. Why is it a draft?
Seems like the NetBSD tests were also broken; should include those changes here? |
There are a few points to do:
|
9b7788b to
943b232
Compare
|
|
||
| def skip_if_no_lsof(self): | ||
| """Skip the running test if the lsof utility is not available on non-Linux platforms.""" | ||
| if sys.platform != "linux" and shutil.which("lsof") is None: |
There was a problem hiding this comment.
b3a71f5 qa: Add
skip_if_no_lsofhelper and use it where needed:
nit: the sys.platform != "linux" part indicates the name should probably be adjusted.
get_bind_addrs and feature_bind_extra on illumos943b232 to
a22a6e1
Compare
Some functional tests on non-Linux platforms rely on the `lsof` utility. However, we treat all other functional test dependencies, such as additional Python modules, as optional, and skip dependent tests if those are unavailable. This change makes `lsof` optional as well.
Modern NetBSD `ifconfig` prints interface addresses in CIDR notation (e.g. `inet 127.0.0.1/8`), unlike the other supported platforms which print the netmask as a separate field. The trailing prefix length breaks functional tests that expect a plain IP address. This change is a no-op on other platforms.
On NetBSD, `lsof` can produce the following warnings: 1. "created device cache file: ..." - usually happens in a CI environment. 2. "compiled for NetBSD release 10.0; this is 10.1." or similar - when the `lsof` binary package is installed on a point release. This change suppresses both warnings printed to stderr and fixes the affected tests.
This extends support for `get_bind_addrs` and `feature_bind_extra` to illumos-based OSes.
a22a6e1 to
f4a6d07
Compare
This PR is a follow-up to #34256. It extends functional test support to illumos-based OSes and fixes several related issues on the *BSDs.
Changes:
lsofan optional functional test dependency via a newskip_if_no_lsofhelper, consistent with other optional test deps.ifconfigoutput (no-op on other platforms).lsofwarnings on NetBSD.get_bind_addrs.lsofTest Suite Dependency for FreeBSD and NetBSD.get_bind_addrsandfeature_bind_extraon illumos.CI runs: hebasto/bitcoin-core-nightly#280.
Addresses #34256 (comment).