/* Test of getting user name.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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