From bd2dbd2f322ee1046c35b2a138e5256e2ec6f455 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 22 Apr 2026 12:21:48 +1000 Subject: [PATCH] runtests.py: preserve test-execution order in skipped list The sorted() call reordered skipped test names alphabetically, causing CI expected-skipped mismatches (e.g. acls,acls-default instead of acls-default,acls). Sort by original test order instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- runtests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtests.py b/runtests.py index e63a3279..54ca0a05 100755 --- a/runtests.py +++ b/runtests.py @@ -347,6 +347,9 @@ def main(): tests = collect_tests(suitedir, args.tests) full_run = len(args.tests) == 0 + # Record test order for consistent skipped-list output + test_order = {os.path.basename(t).replace('.test', ''): i for i, t in enumerate(tests)} + passed = 0 failed = 0 skipped = 0 @@ -442,7 +445,7 @@ def main(): if vg_errors > 0: print(f' {vg_errors} valgrind error(s) found (see logs in {scratchbase})') - skipped_str = ','.join(sorted(skipped_list)) + skipped_str = ','.join(sorted(skipped_list, key=lambda x: test_order.get(x, 0))) if full_run and args.expect_skipped != 'IGNORE': print('----- skipped results:') print(f' expected: {args.expect_skipped}')