* [PATCH v3] selftests/filesystems: Assume that TIOCGPTPEER is defined
@ 2026-02-27 15:20 Mark Brown
2026-03-02 10:08 ` Christian Brauner
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2026-02-27 15:20 UTC (permalink / raw)
To: Shuah Khan, Christian Brauner
Cc: Andrew Morton, linux-fsdevel, linux-kselftest, linux-kernel, Mark Brown
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>
---
Changes in v3:
- Rebase onto v7.0-rc1
- Link to v2: https://patch.msgid.link/20251218-selftests-filesystems-devpts-tiocgptpeer-v2-1-a5fb5847fe58@kernel.org
Changes in v2:
- Rebase onto v6.19-rc1.
- Link to v1: https://patch.msgid.link/20251126-selftests-filesystems-devpts-tiocgptpeer-v1-1-92bd65d02981@kernel.org
---
tools/testing/selftests/filesystems/devpts_pts.c | 2 --
1 file changed, 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. "
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20251126-selftests-filesystems-devpts-tiocgptpeer-fbd30e579859
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v3] selftests/filesystems: Assume that TIOCGPTPEER is defined
2026-02-27 15:20 [PATCH v3] selftests/filesystems: Assume that TIOCGPTPEER is defined Mark Brown
@ 2026-03-02 10:08 ` Christian Brauner
0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2026-03-02 10:08 UTC (permalink / raw)
To: Mark Brown
Cc: Christian Brauner, Andrew Morton, linux-fsdevel, linux-kselftest,
linux-kernel, Shuah Khan
On Fri, 27 Feb 2026 15:20:35 +0000, Mark Brown wrote:
> 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.
>
> [...]
Applied to the vfs-7.1.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.1.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.1.misc
[1/1] selftests/filesystems: Assume that TIOCGPTPEER is defined
https://git.kernel.org/vfs/vfs/c/f7df26875b9a
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-02 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-27 15:20 [PATCH v3] selftests/filesystems: Assume that TIOCGPTPEER is defined Mark Brown
2026-03-02 10:08 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®