Subject: Re: bug#12778: Failure when running check-root make target

From: Andrew Warshall <[email-masked]>
Date: Mon, 5 Nov 2012 10:19:23 -0500

On Mon, 5 Nov 2012 15:46:32 +0000
"Voelker, Bernhard" <[email-masked]> wrote:
> > Does "make NON_ROOT_USERNAME=nobody check-TESTS" run as root in the
> > gnulib-tests/ directory work for you?
> 
> Sure it does. ;-)
> 
> But with sudo it fails for 1 test:
> 
>   $ sudo env PATH="$PATH"  make NON_ROOT_USERNAME=nobody check-TESTS
>   PASS: [...]
>   ../build-aux/test-driver: line 95:  5158 Aborted
> "$@" > $log_file 2>&1 FAIL: test-getlogin

You've uncovered bug #11150, I believe. Is this in an xterm? The
getlogin test fails for me too there (at least, it's done so for a
while), and arguably rightly so. Basically, all that getlogin() does is
to look the TTY it's connected to up in /var/run/utmp. This should list
who's logged in at every terminal. Unfortunately, xterm doesn't write
to /var/run/utmp, so getlogin() fails in this case. Whether you think
this counts as a bug in getlogin() is up to you; anyway, it's different
(I assume) from the issue we were having.

If you want to complain about the getlogin() issue, by the way, 
that should go to the bug-gnulib list (at least, that's where it got
forwarded before).

         -Andrew Warshall