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: 25105 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)