mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:32:37 +00:00
qa: Fix interface_ipc*.py on NetBSD and prevent future regressions #36587
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36587
Loading…
Reference in a new issue
No description provided.
Delete branch "261021-macos-netbsd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR fixes the
interface_ipc*.pytests, which have been failing on NetBSD since https://github.com/bitcoin/bitcoin/pull/35037.As file descriptor budget regressions of this kind recur (see https://github.com/bitcoin/bitcoin/pull/31537 and https://github.com/bitcoin/bitcoin/pull/36078), the macOS CI job now models NetBSD's limit so they are caught before merging rather than by nightly NetBSD CI afterwards.
See the commit messages for details.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, 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.
NetBSD test logs are available here: https://github.com/hebasto/bitcoin-core-nightly/actions/runs/39563835829.
Base:
aa76bd266df9742a266d52e0e5da8dbf033658f6Head:
311bc7c3bb274c7065f871198fa0910c205b8a6aFindings
[Minor] Escape the wrapper path in
BITCOIN_CMDA checkout path containing whitespace makes functional-test nodes fail to start when
CI_LIMIT_FD_COUNTis set; the default CI paths are unaffected.Explanation and suggested change
When
CI_LIMIT_FD_COUNTis set, this assigns the wrapper path toBITCOIN_CMDwithout escaping it. The test framework parses that variable withshlex.split, so aBASE_ROOT_DIRcontaining spaces splits the wrapper path into multiple arguments and node launches fail. Escape the wrapper path before adding it toBITCOIN_CMD, for example withprintf -v wrapper '%q' "${BASE_ROOT_DIR}/ci/test/wrap-fd-limit.sh". The default GitHub and container CI paths contain no whitespace.Location:
ci/test/03_test_script.sh:163(head).Design and approach
Concept and approach. Keep the IPC budget fix and the macOS 256-descriptor cap, but restore coverage of
feature_init.py's high-limit cases. The wrapper replaces the limits that the test sets, so those cases pass without exercisingRLIM_INFINITYor1<<31node startups; add an uncappedfeature_init.pyrerun or another way for the test to bypass the wrapper. #36587 (comment)Review coverage was incomplete.
Review limitations
maxconnectionsoverrides was cut off. A caller that relies on a bitcoin.conf override on an IPC-enabled node could change whether the new command-line default affects that test.maxconnectionsand also enableipcbindreturned many unrelated locale matches. A test that relies on a bitcoin.confmaxconnectionsoverride on an IPC-enabled node was therefore not ruled out. Command-line-maxconnectionsadded in TestNode.init comes beforeextra_args, so explicit command-line overrides should still take effect.Review tier: standard
Full review report
Concept ACK
But
wrap-fd-limit.shin311bc7c3bbloses our coverage for "infinite" file descriptors introduced by #34937.We could run
feature_init.pyboth capped and uncapped:Alternatively we could drop that test.
missing pipefail and nounset? I guess the script may fail anyway when nounset is hit, but can't hurt to be explicit here
Approach NACK. Rather than hijacking tests we already have, to emulate the constraints of other operating systems, we should add proper tests for things we are claiming/trying to support i.e #36147.
I would agree with this in an ideal world. However, a native NetBSD CI job seems to be a hard goal for this project.
Shouldn't that problem be solved at a different layer? If the problem is infrastructure, introduce more caching, or prebuilt/reusable container images, rather than trying to push complexity into unrelated tests.
Would dropping the last commit from this PR change your mind?
It seems plausible that a user is running the tests with a fd limit on any select based OS. If we want to support that, it seems fine to add it to the CI. Using any CI config for that seems fine, given that such a user may be on any of those OS's.
It's not clear we do (#36761). We may move away from
select()on macOS (and all other OS's), so I don't think adding new test coverage forselecton NetBSD, via macOS is a great approach. It seems like it would be more productive to work on switching NetBSD topoll()?If we do still want to do this, it seems like it should be in it's own, isolated test, which will not interfere with any
poll()migration, so we can avoid any concerns about "losing coverage", if macOS was migrated away fromselect().