summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-02-27 18:20:35 +0300
committerChristian Brauner <brauner@kernel.org>2026-03-02 13:08:20 +0300
commitf7df26875b9a07d756a5f4cac26dac95bf1d9de1 (patch)
tree73224725d6472dc847994d35be862524e8739ad4 /tools/testing
parent1a0c73b2aaf2198f36d8156b78e083c58806d47b (diff)
downloadlinux-f7df26875b9a07d756a5f4cac26dac95bf1d9de1.tar.xz
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>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/filesystems/devpts_pts.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/testing/selftests/filesystems/devpts_pts.c b/tools/testing/selftests/filesystems/devpts_pts.c
index 54fea349204e..aa8d5324f2a6 100644
--- a/tools/testing/selftests/filesystems/devpts_pts.c
+++ b/tools/testing/selftests/filesystems/devpts_pts.c
@@ -119,9 +119,7 @@ static int do_tiocgptpeer(char *ptmx, char *expected_procfd_contents)
goto do_cleanup;
}
-#ifdef TIOCGPTPEER
slave = ioctl(master, TIOCGPTPEER, O_RDWR | O_NOCTTY | O_CLOEXEC);
-#endif
if (slave < 0) {
if (errno == EINVAL) {
fprintf(stderr, "TIOCGPTPEER is not supported. "