From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99926 invoked by alias); 25 Dec 2017 11:48:26 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 99774 invoked by uid 89); 25 Dec 2017 11:48:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=2539 X-HELO: vmicros1.altlinux.org Date: Mon, 25 Dec 2017 11:48:00 -0000 From: "Dmitry V. Levin" To: libc-alpha@sourceware.org Subject: [PATCH] tst-ttyname: skip the test when /dev/ptmx is not available Message-ID: <20171225114806.GB4341@altlinux.org> Mail-Followup-To: libc-alpha@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-SW-Source: 2017-12/txt/msg00885.txt.bz2 * sysdeps/unix/sysv/linux/tst-ttyname.c (do_in_chroot_1): Skip the test instead of failing in case of an error returned by posix_openpt. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/tst-ttyname.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/tst-ttyname.c b/sysdeps/unix/sysv/linux/tst-ttyname.c index 0fdf1a8..15f6c4c 100644 --- a/sysdeps/unix/sysv/linux/tst-ttyname.c +++ b/sysdeps/unix/sysv/linux/tst-ttyname.c @@ -253,7 +253,9 @@ do_in_chroot_1 (int (*cb)(const char *, int)) /* Open the PTS that we'll be testing on. */ int master; 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) + FAIL_UNSUPPORTED ("posix_openpt: %m"); VERIFY ((slavename = ptsname (master))); VERIFY (unlockpt (master) == 0); if (strncmp (slavename, "/dev/pts/", 9) != 0) -- ldv