* tests/test-getlogin.c (main): Allow a failure with EINVAL.
* tests/test-getlogin_r.c (main): Likewise.
+2011-09-21 Bruno Haible <bruno@clisp.org>
+
+ 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.
+
2011-09-20 Bruno Haible <bruno@clisp.org>
time tests: Don't require pid_t.
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
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