This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Implement per-thread file system attributes
On 6/28/19 2:34 PM, Florian Weimer wrote:
> * Carlos O'Donell:
>
>>> if (flag != PTHREAD_PER_THREAD_NP)
>>> TEST_COMPARE (flag, PTHREAD_PER_PROCESS_NP);
>>
>> I don't follow why you can't call this unconditionally?
>
> This asserts that the flag has one of two values, PTHREAD_PER_THREAD_NP
> or PTHREAD_PER_PROCESS_NP.
I still don't follow.
Why can't we just use:
TEST_COMPARE (flag, PTHREAD_PER_PROCESS_NP);
We only expect flag to be PTHREAD_PER_PROCESS_NP.
If flag is PTHREAD_PER_PROCESS_NP then nothing happens.
If it's not PTHREAD_PER_PROCESS_NP then we record the value
along with a failure, but continue running (and will report
a test failure).
--
Cheers,
Carlos.