On 05/17/2014 06:09 PM, Tom G. Christensen wrote:
> On 14/05/14 23:16, Pádraig Brady wrote:
> 
>> So you went the route of adding rather than deleting code. Fair enough.
>> I tweaked a bit in the attached which I;ll apply soon if you're OK with it.
> 
> This broke my daily gnulib bootstrap which runs as a cronjob on a CentOS 6 
> host.
> 
> test-getlogin.c:78: assertion 'errno == ENOTTY' failed
> 
> The actual value of errno is EINVAL.

I pushed the attached to avoid this.

thanks,
Pádraig.

>From 97177368709e802a3e5008e1e9687e33f14da35d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Sun, 18 May 2014 02:48:03 +0100
Subject: [PATCH] getlogin-tests: avoid false failure under cron

* tests/test-getlogin.c (main): Avoid verifying errnos from ttyname()
since that's not what's under test.  Centos 6 was seen to return
EINVAL for ttyname() when run from cron.
---
 ChangeLog             |    7 +++++++
 tests/test-getlogin.c |    2 --
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 87dec13..bcd414d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-05-18  Pádraig Brady  <[email protected]>
+
+	getlogin-tests: avoid false failure under cron
+	* tests/test-getlogin.c (main): Avoid verifying errnos from ttyname()
+	since that's not what's under test.  Centos 6 was seen to return
+	EINVAL for ttyname() when run from cron.
+
 2014-05-16  Jim Meyering  <[email protected]>
 
 	mbrtowc.m4: fix a comment typo
diff --git a/tests/test-getlogin.c b/tests/test-getlogin.c
index 32fd893..e18469e 100644
--- a/tests/test-getlogin.c
+++ b/tests/test-getlogin.c
@@ -75,8 +75,6 @@ main (void)
     tty = ttyname (STDIN_FILENO);
     if (tty == NULL)
       {
-         ASSERT (errno == ENOTTY);
-
          fprintf (stderr, "Skipping test: stdin is not a tty.\n");
          return 77;
       }
-- 
1.7.7.6

Reply via email to