[PATCH v5 0/4] Add system-wide tunables
DJ Delorie
dj@redhat.com
Thu Feb 12 19:39:28 GMT 2026
Michael Jeanson <mjeanson@efficios.com> writes:
> So most tests that use GLIBC_TUNABLES should be modified to explictly
> check that the tunables they depend on are set to the expected values?
>
> For example in the rseq-disabled test I could add something like this at
> the beginning of the test:
>
> static void
> check_rseq_tunable_disabled (void)
> {
> bool rseq_tunable = TUNABLE_GET_FULL (glibc, pthread, rseq, int, NULL);
>
> if (rseq_tunable)
> FAIL_UNSUPPORTED ("rseq tunable forced to enabled, skipping test");
> }
Yes, that's what I was thinking. It would make the tests more robust,
although I don't expect many non-overridable system-level tunables, less
so on libc developers' machines ;-)
Ideally, tests should check *everything* that's related to the test,
either to ensure the test is operating in the right environment to test
what it's testing, or to check that the framework itself is operating
correctly. This avoids false positives. Such rigor is rarely required,
but your example is a case where it would be.
More information about the Libc-alpha
mailing list