Tests without a fixture did not have their file names linted because the grep matches on BOOST_FIXTURE. Updates to match BOOST_FIXTURE or BOOST_TEST.
lint: Grep for `AUTO` test suites in file names #35451
pull rustaceanrob wants to merge 1 commits into bitcoin:master from rustaceanrob:26-6-3-tname-lint changing 2 files +6 −6-
rustaceanrob commented at 3:59 PM on June 3, 2026: member
- DrahtBot added the label Tests on Jun 3, 2026
-
DrahtBot commented at 3:59 PM on June 3, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35451.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
in src/test/CMakeLists.txt:47 in 38ddd8f7d3
43 | @@ -44,7 +44,7 @@ add_executable(test_bitcoin 44 | descriptor_tests.cpp 45 | disconnected_transactions.cpp 46 | feefrac_tests.cpp 47 | - feerounder_tests.cpp 48 | + fee_rounder_tests.cpp
l0rinc commented at 12:27 PM on June 4, 2026:38ddd8f lint: Grep for
AUTOtest suites in file names:Fixing the suite name would result in a smaller diff:
-BOOST_AUTO_TEST_SUITE(fee_rounder_tests) +BOOST_AUTO_TEST_SUITE(feerounder_tests)If you insist on the rename, please separate it to a dedicated commit explaining the reasoning.
in test/lint/lint-tests.py:34 in 38ddd8f7d3
30 | @@ -31,7 +31,7 @@ def check_matching_test_names(test_suite_list): 31 | not_matching = [ 32 | x 33 | for x in test_suite_list 34 | - if re.search(r"/(.*?)\.cpp:BOOST_FIXTURE_TEST_SUITE\(\1(_[a-z0-9]+)?, .*\)", x) is None 35 | + if re.search(r"/(.*?)\.cpp:BOOST_(FIXTURE|AUTO)_TEST_SUITE\(\1(_[a-z0-9]+)?[,)]", x) is None
l0rinc commented at 1:03 PM on June 4, 2026:The filename check currently requires a trailing comma because it only sees
BOOST_FIXTURE_TEST_SUITE(name, fixture), butBOOST_AUTO_TEST_SUITE(name)doesn't require it anymore.Using a character set here for
,or)is a compact choice, and we don't need the search to validate the whole line. 👍Since we're fixing it here, we should adjust
check_unique_test_namesas well:- output = [re.search(r"\((.*?),", x) for x in test_suite_list] + output = [re.search(r"\((.*?)[,)]", x) for x in test_suite_list]And since we don't need to capture the alternation (unlike the first part, which is referenced later), we can make it non-capturing by prefixing with
?::if re.search(r"/(.*?)\.cpp:BOOST_(?:FIXTURE|AUTO)_TEST_SUITE\(\1(_[a-z0-9]+)?[,)]", x) is Nonel0rinc changes_requestedl0rinc commented at 1:07 PM on June 4, 2026: contributorConcept ACK, good find
rustaceanrob force-pushed on Jun 4, 2026rustaceanrob commented at 1:45 PM on June 4, 2026: memberApplied feedback in f2aef5ba11d399c0cdbf4c0107ee851f28cf6bb0
l0rinc commented at 1:48 PM on June 4, 2026: contributorlightly tested code review ACK f2aef5ba11d399c0cdbf4c0107ee851f28cf6bb0
in test/lint/lint-tests.py:21 in f2aef5ba11
18 | command = [ 19 | "git", 20 | "grep", 21 | "-E", 22 | - r"^BOOST_FIXTURE_TEST_SUITE\(", 23 | + r"^BOOST_(FIXTURE|AUTO)_TEST_SUITE\(",
hebasto commented at 2:23 PM on June 4, 2026:Using full macro names in the regex will be helpful when grepping for them across the entire codebase.
l0rinc approvedf6bdbcf79dlint: Grep for `AUTO` test suites in file names
Tests without a fixture did not have their file names linted because the grep matches on `BOOST_FIXTURE`. Updates to match `BOOST_FIXTURE` or `BOOST_TEST`. Co-authored-by: l0rinc <pap.lorinc@gmail.com>
rustaceanrob force-pushed on Jun 5, 2026rustaceanrob commented at 8:44 AM on June 5, 2026: memberUse of full names f6bdbcf79d9e4b17ef9fc4e254e4ada789be88a1
l0rinc commented at 8:50 AM on June 5, 2026: contributorACK f6bdbcf79d9e4b17ef9fc4e254e4ada789be88a1
nit: the PR description likely needs some minor updates
hebasto approvedhebasto commented at 2:55 PM on June 5, 2026: memberACK f6bdbcf79d9e4b17ef9fc4e254e4ada789be88a1.
achow101 commented at 9:40 PM on June 10, 2026: memberACK f6bdbcf79d9e4b17ef9fc4e254e4ada789be88a1
achow101 merged this on Jun 10, 2026achow101 closed this on Jun 10, 2026
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-06-11 10:51 UTC
More mirrored repositories can be found on mirror.b10c.me