Re: [PATCH v2] selftests: harness: Restore order of test functions

From: Shuah Khan

Date: Mon Apr 27 2026 - 13:48:27 EST


On 4/22/26 06:32, Thomas Weißschuh wrote:
The recent addition of explicit constructor orders for fixture tests
broke the ordering of those relative to non-fixture tests and the
reverse-constructor-order detection.

Restore the ordering of the test functions relative to each other by
using the same explicit test order for all test registrations and
__constructor_order_first().

Rename the constant, as it is not specific to TEST_F() anymore.

Fixes: 6be268151426 ("selftests/harness: order TEST_F and XFAIL_ADD constructors")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Reviewed-by: Kees Cook <kees@xxxxxxxxxx>
---
Changes in v2:
- Pick up review tag from Kees.
- Add missing closing brace in FIXTURE_VARIANT_ADD().
- Link to v1: https://patch.msgid.link/20260420-kselftests-harness-order-v1-1-b3c603782ce8@xxxxxxxxxxxxx
---

Applied to linux-kselftest fixes for Linux 7.1-rc2

thanks,
-- Shuah