[PATCH v6 3/4] nptl: Remove INVALID_TD_P
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Dec 11 17:41:35 GMT 2025
On 08/12/25 19:25, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> diff --git a/sysdeps/pthread/tst-pthread-exited.c b/sysdeps/pthread/tst-pthread-exited.c
>> new file mode 100644
>> index 0000000000..2e9fd2c9a5
>> --- /dev/null
>> +++ b/sysdeps/pthread/tst-pthread-exited.c
>> @@ -0,0 +1,106 @@
>
>> +static int
>> +do_test_default (void)
>> +{
>> + pthread_t thrs[nthreads];
>> + for (int i = 0; i < nthreads; i++)
>> + thrs[i] = xpthread_create (NULL, noop_thread, NULL);
>
> Missing space before thrs (only one space indent).
Ack.
>
>> +static void
>> +do_test_detached (void)
>> +{
>> + pthread_t thrs[nthreads];
>> + for (int i = 0; i < nthreads; i++)
>> + thrs[i] = xpthread_create (NULL, detached_pause_thread, NULL);
>> +
>> + for (int i = 0; i < nthreads; i++)
>> + {
>> + clockid_t clk;
>> + TEST_COMPARE (pthread_getcpuclockid (thrs[i], &clk), 0);
>> +
>> + struct sched_param sch = { 0 };
>> + int policy;
>> + TEST_COMPARE (pthread_getschedparam (thrs[i], &policy, &sch), 0);
>> +
>> + sch.sched_priority = 8;
>> + TEST_COMPARE (pthread_setschedparam (thrs[i], SCHED_FIFO, &sch), EPERM);
>
> This should have switch to user nobody if the user is root? We are
> missing that in tst-system, too.
Indeed, although I am not sure how common is run make check as root. I will
add the setup to change users.
More information about the Libc-alpha
mailing list