From patchwork Tue Dec 26 14:10:02 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: 852978 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-88605-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="wWHcOGDV"; 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 3z5dD429JQz9sCZ for ; Wed, 27 Dec 2017 01:10:12 +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=QQMStqgMp76x8+V1eQ0gx2ENreupm 16VAvPiVHvINBSw0UZYd53L85qWsCK68xhhAYL3t7rQ7U75WFkOKWp64y8gXpukM +/IgrS5Q8WBymdCcOnTmyFlmFKWNwsZKTCrrpohu2AKcoY+E9UjhSAbSbgLu3yk4 chJY0vFFzeB2fA= 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=07ghqf+lskKU/vDXQ8ZdAuc8lAw=; b=wWH cOGDV/UxoKi7WY8gVL/PssP1k8wpTU1y9N5LkuGN8qzprmN/MVc3WX32RWpIRguH X8sez7R7R+mYCyZX7kYPx/aUYp8iAcItaUGeXc5fQRyoJ+i3tk2DYL6lf0vJVAIF 0itrnrCN4gzQ0rEHlGI7aJICpnm5XPIhZrqNWtyc= Received: (qmail 16557 invoked by alias); 26 Dec 2017 14:10:06 -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 16547 invoked by uid 89); 26 Dec 2017 14:10:06 -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=5547 X-HELO: vmicros1.altlinux.org Date: Tue, 26 Dec 2017 17:10:02 +0300 From: "Dmitry V. Levin" To: libc-alpha@sourceware.org Subject: [PATCH v3] tst-ttyname: skip the test if failed to become root Message-ID: <20171226141002.GA23091@altlinux.org> Mail-Followup-To: libc-alpha@sourceware.org MIME-Version: 1.0 Content-Disposition: inline * sysdeps/unix/sysv/linux/tst-ttyname.c (do_test): Skip the test if support_become_root failed. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/tst-ttyname.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/tst-ttyname.c b/sysdeps/unix/sysv/linux/tst-ttyname.c index 0fdf1a8..3943403 100644 --- a/sysdeps/unix/sysv/linux/tst-ttyname.c +++ b/sysdeps/unix/sysv/linux/tst-ttyname.c @@ -554,7 +554,8 @@ run_chroot_tests (const char *slavename, int slave) static int do_test (void) { - support_become_root (); + if (!support_become_root ()) + return EXIT_UNSUPPORTED; int ret1 = do_in_chroot_1 (run_chroot_tests); if (ret1 == EXIT_UNSUPPORTED)