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, 2026rustaceanrob referenced this in commit bff05e19eb on Jun 12, 2026in test/lint/lint-tests.py:64 in f6bdbcf79d
60 | @@ -61,7 +61,7 @@ def get_duplicates(input_list): 61 | 62 | 63 | def check_unique_test_names(test_suite_list): 64 | - output = [re.search(r"\((.*?),", x) for x in test_suite_list] 65 | + output = [re.search(r"\((.*?)[,)]", x) for x in test_suite_list]
maflcko commented at 1:28 PM on June 12, 2026:What is the point of this duplicate check? Cmake already checks for this, so this duplicate check is redundant and should be removed.
l0rinc commented at 9:13 PM on June 12, 2026:sedited referenced this in commit 946feb3f1f on Jun 16, 2026sedited referenced this in commit 9460090f1a on Jun 16, 2026alexanderwiederin referenced this in commit b95c2a40c5 on Jun 24, 2026sedited referenced this in commit d0f9ae934c on Jun 25, 2026Kino1994 referenced this in commit 18c8991c82 on Jun 28, 2026Kino1994 referenced this in commit a186844ce3 on Jun 28, 2026Kino1994 referenced this in commit 9be6241a1f on Jun 28, 2026yuvicc referenced this in commit 75e21edcc5 on Jun 29, 2026Kino1994 referenced this in commit 3e8a109007 on Aug 19, 2026Kino1994 referenced this in commit 66137ba537 on Aug 19, 2026Kino1994 referenced this in commit e38665cc8a on Aug 19, 2026rustaceanrob deleted the branch on Aug 20, 2026
github-metadata-mirror
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-08-31 17:51 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me