Discussion:
test-posix_openpt: don't fail on EACCESS
(too old to reply)
Guido Günther
2017-01-19 18:15:55 UTC
Permalink
Raw Message
In chroots created for e.g. Debian package /dev/ptmx might not be
accessible. Skip the test in this case.
---
gnulib/tests/test-posix_openpt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib/tests/test-posix_openpt.c b/gnulib/tests/test-posix_openpt.c
index 87243b2..045640f 100644
--- a/gnulib/tests/test-posix_openpt.c
+++ b/gnulib/tests/test-posix_openpt.c
@@ -43,7 +43,7 @@ main (void)

/* Open the master of a pseudo-terminal pair. */
master = posix_openpt (O_RDWR | O_NOCTTY);
- if (master < 0 && errno == ENOSYS)
+ if (master < 0 && (errno == ENOSYS || errno == EACCES))
{
fputs ("skipping: platform lacks pty support\n", stderr);
return 77;
Bruno Haible
2017-02-11 18:25:03 UTC
Permalink
Raw Message
Post by Guido Günther
In chroots created for e.g. Debian package /dev/ptmx might not be
accessible. Skip the test in this case.
Same argument as for openpty-tests in
https://lists.gnu.org/archive/html/bug-gnulib/2017-02/msg00035.html

Bruno

Loading...