mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-12 08:21:58 +03:00
tst-ttyname: skip the test when /dev/ptmx is not available
* sysdeps/unix/sysv/linux/tst-ttyname.c (do_in_chroot_1): Skip the test instead of failing in case of ENOENT returned by posix_openpt.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2018-01-08 Dmitry V. Levin <ldv@altlinux.org>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/tst-ttyname.c (do_in_chroot_1): Skip the
|
||||||
|
test instead of failing in case of ENOENT returned by posix_openpt.
|
||||||
|
|
||||||
2018-01-08 Florian Weimer <fweimer@redhat.com>
|
2018-01-08 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
resolv: Support binary labels in test framework.
|
resolv: Support binary labels in test framework.
|
||||||
|
@ -253,7 +253,14 @@ do_in_chroot_1 (int (*cb)(const char *, int))
|
|||||||
/* Open the PTS that we'll be testing on. */
|
/* Open the PTS that we'll be testing on. */
|
||||||
int master;
|
int master;
|
||||||
char *slavename;
|
char *slavename;
|
||||||
VERIFY ((master = posix_openpt (O_RDWR|O_NOCTTY|O_NONBLOCK)) >= 0);
|
master = posix_openpt (O_RDWR|O_NOCTTY|O_NONBLOCK);
|
||||||
|
if (master < 0)
|
||||||
|
{
|
||||||
|
if (errno == ENOENT)
|
||||||
|
FAIL_UNSUPPORTED ("posix_openpt: %m");
|
||||||
|
else
|
||||||
|
FAIL_EXIT1 ("posix_openpt: %m");
|
||||||
|
}
|
||||||
VERIFY ((slavename = ptsname (master)));
|
VERIFY ((slavename = ptsname (master)));
|
||||||
VERIFY (unlockpt (master) == 0);
|
VERIFY (unlockpt (master) == 0);
|
||||||
if (strncmp (slavename, "/dev/pts/", 9) != 0)
|
if (strncmp (slavename, "/dev/pts/", 9) != 0)
|
||||||
|
Reference in New Issue
Block a user