From patchwork Mon Dec 25 11:48:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dmitry V. Levin" X-Patchwork-Id: 852795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-88585-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="uQZFjEx6"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z4y7G5YDlz9s4q for ; Mon, 25 Dec 2017 22:48:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=cvuxP2Qwp3VTmtvs4WnH2chgqUSmG Ct+ui7fEVIw/dAEKFAAmiWvzOZ7wTjqaUZF2AlcMo691hgaYGvVZSATSZeqFFZ9t e3a0fp8W2J1DgUjJ2jmJfsTzDWxKmgdz9/ugHJv0SxPd9ZdQ6o3fPZ0UQSJlr4oo qXSyIcjCZHHGt0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=ft1a9KtFX6w1XXZX6hVOaCfuMt0=; b=uQZ FjEx6pKyAogxACxbZ5sKapscM2/vRFwLgHSQmqhCq8eF/kPRfjt1JONSq8o5b4Mx YTLOrZqGZ/Ks0D5jlCK2uggruPlVd9SrFNJIsoZTXaEhStWYmjIpEnN6rCeTC94/ Xk1J9XBF1IUs7BqFMCmtfJMBvgm9htRqDlSwEkAk= 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-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@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 14:48:06 +0300 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-Disposition: inline * 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)