Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/filesystems: Assume that TIOCGPTPEER is defined

The devpts_pts selftest has an ifdef in case an architecture does not
define TIOCGPTPEER, but the handling for this is broken since we need
errno to be set to EINVAL in order to skip the test as we should. Given
that this ioctl() has been defined since v4.15 we may as well just assume
it's there rather than write handling code which will probably never get
used.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20260227-selftests-filesystems-devpts-tiocgptpeer-v3-1-07db4d85d5aa@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Mark Brown and committed by
Christian Brauner
f7df2687 1a0c73b2

-2
-2
tools/testing/selftests/filesystems/devpts_pts.c
··· 119 119 goto do_cleanup; 120 120 } 121 121 122 - #ifdef TIOCGPTPEER 123 122 slave = ioctl(master, TIOCGPTPEER, O_RDWR | O_NOCTTY | O_CLOEXEC); 124 - #endif 125 123 if (slave < 0) { 126 124 if (errno == EINVAL) { 127 125 fprintf(stderr, "TIOCGPTPEER is not supported. "