[PATCH v6 3/4] nptl: Remove INVALID_TD_P

Florian Weimer fweimer@redhat.com
Mon Dec 8 22:25:35 GMT 2025


* 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).

> +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.

Thanks,
Florian



More information about the Libc-alpha mailing list