Skip to content

Commit 00ddf4c

Browse files
committed
selftests/nolibc: only run constructor tests on nolibc
The nolibc testsuite can be run against other libcs to test for interoperability. Some aspects of the constructor execution are not standardized and musl does not provide all tested feature, for one it does not provide arguments to the constructors, anymore? Skip the constructor tests on non-nolibc configurations. Acked-by: Willy Tarreau <[email protected]> Link: https://lore.kernel.org/r/20250212-nolibc-test-constructor-v1-1-c963875b3da4@weissschuh.net Signed-off-by: Thomas Weißschuh <[email protected]>
1 parent 16681be commit 00ddf4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/nolibc/nolibc-test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,9 @@ int run_startup(int min, int max)
738738
CASE_TEST(environ_HOME); EXPECT_PTRNZ(1, getenv("HOME")); break;
739739
CASE_TEST(auxv_addr); EXPECT_PTRGT(test_auxv != (void *)-1, test_auxv, brk); break;
740740
CASE_TEST(auxv_AT_UID); EXPECT_EQ(1, getauxval(AT_UID), getuid()); break;
741-
CASE_TEST(constructor); EXPECT_EQ(1, constructor_test_value, 2); break;
741+
CASE_TEST(constructor); EXPECT_EQ(is_nolibc, constructor_test_value, 2); break;
742742
CASE_TEST(linkage_errno); EXPECT_PTREQ(1, linkage_test_errno_addr(), &errno); break;
743-
CASE_TEST(linkage_constr); EXPECT_EQ(1, linkage_test_constructor_test_value, 6); break;
743+
CASE_TEST(linkage_constr); EXPECT_EQ(is_nolibc, linkage_test_constructor_test_value, 6); break;
744744
case __LINE__:
745745
return ret; /* must be last */
746746
/* note: do not set any defaults so as to permit holes above */

0 commit comments

Comments
 (0)