[PATCH v5 0/4] Add system-wide tunables

Michael Jeanson mjeanson@efficios.com
Thu Feb 12 20:10:36 GMT 2026


On 2026-02-12 14:39, DJ Delorie wrote:
> 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.

One thing I forgot to ask, currently only the tests that need the rseq 
tunable disabled use GLIBC_TUNABLES to explictly set the value because 
we expect the default to always be enabled.

Since the default could now be disabled by a system-wide policy, should 
I add GLIBC_TUNABLES to the environment of all rseq tests like this:

tst-rseq-nptl-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=1

Or would that be considered overzealous?

Thanks,

Michael


More information about the Libc-alpha mailing list