This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v3] tst-ttyname: skip the test if failed to become root
- From: "Dmitry V. Levin" <ldv at altlinux dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 26 Dec 2017 17:10:02 +0300
- Subject: [PATCH v3] tst-ttyname: skip the test if failed to become root
- Authentication-results: sourceware.org; auth=none
* 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)
--
ldv