sys/mount.h vs fcntl.h
Florian Weimer
fweimer@redhat.com
Tue Feb 3 20:17:08 GMT 2026
* DJ Delorie:
>>> tst-fcntl-cloexec.c and tst-open-tree-cloexec.c test to ensure that
>>> fcntl.h and sys/mount.h can be used independently and still provide the
>>> right defines and values. Which means they can't include other headers,
>>> and must intrinsically "know" the right values for all platforms.
>>
>> The right way to check for correct values would be a Python test. Or
>> the test I suggested above.
>
> Why python, when we can do it in C? We need to test the "independend
> inclusion" part anyway...
It avoids architecture-specific aspects in the tests and reduces future
maintenance overhead. These tests are quite simple to write, too, and
can use regular expressions for the constant that should be compared.
Thanks,
Florian
More information about the Libc-alpha
mailing list