[patch v1] add ptmx support to test-container
DJ Delorie
dj@redhat.com
Thu Mar 20 23:59:23 GMT 2025
"H.J. Lu" <hjl.tools@gmail.com> writes:
>> +#ifdef __linux__
>> + devmount (new_root_path, "ptmx");
>> +#endif
>
> I think the ptmx test should be done with header files in
> sysdeps/generic and sysdeps/unix/sysv/linux to avoid
> "#ifdef __linux__".
It's not the only __linux__ test in that file, though.
test-container is a neccessarily os-aware program, I don't see making it
portable across the two kernels we normally support (Linux and HURD) to
be information other programs would benefit from. Who would benefit
from a "#define TEST_CONTAINER_NEEDS_DEV_PTMX" ? And keep in mind it
would need two macros if we macroized the commands; one for the
pre-namespace commands and one for the post-namespace ones.
As for existing portability macros, posix_openpt() is generally
implemented by separate files with their own kernel-specific paths
within, so there's nothing existing to check for.
More information about the Libc-alpha
mailing list