[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getlogin test on Linux/SPARC
From: |
Bruno Haible |
Subject: |
getlogin test on Linux/SPARC |
Date: |
Wed, 21 Sep 2011 12:22:23 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
On a Linux 2.6.26 / SPARC machine, I'm getting these test failures:
test-getlogin.c:43: assertion failed
FAIL: test-getlogin
test-getlogin_r.c:44: assertion failed
FAIL: test-getlogin_r
Apparently getlogin's error code here is EINVAL instead of ENOTTY.
This fixes the test failure.
2011-09-21 Bruno Haible <address@hidden>
getlogin, getlogin_r tests: Avoid test failure on Linux/SPARC.
* tests/test-getlogin.c (main): Allow a failure with EINVAL.
* tests/test-getlogin_r.c (main): Likewise.
--- tests/test-getlogin.c.orig Wed Sep 21 12:20:40 2011
+++ tests/test-getlogin.c Wed Sep 21 12:16:25 2011
@@ -40,7 +40,9 @@
if (buf == NULL)
{
/* getlogin() fails when stdin is not connected to a tty. */
- ASSERT (errno == ENOTTY);
+ ASSERT (errno == ENOTTY
+ || errno == EINVAL /* seen on Linux/SPARC */
+ );
#if !defined __hpux /* On HP-UX 11.11 it fails anyway. */
ASSERT (! isatty (0));
#endif
--- tests/test-getlogin_r.c.orig Wed Sep 21 12:20:40 2011
+++ tests/test-getlogin_r.c Wed Sep 21 12:16:26 2011
@@ -41,7 +41,9 @@
if (err != 0)
{
/* getlogin_r() fails when stdin is not connected to a tty. */
- ASSERT (err == ENOTTY);
+ ASSERT (err == ENOTTY
+ || errno == EINVAL /* seen on Linux/SPARC */
+ );
#if !defined __hpux /* On HP-UX 11.11 it fails anyway. */
ASSERT (! isatty (0));
#endif
--
In memoriam Orlando Letelier <http://en.wikipedia.org/wiki/Orlando_Letelier>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- getlogin test on Linux/SPARC,
Bruno Haible <=