Subject: Re: bug#11150: getlogin test failure

From: Matthew Burgess <[email-masked]>
Date: Thu, 19 Apr 2012 6:33:46 -0600

On Thu, 19 Apr 2012 13:18:17 +0200, Jim Meyering <[email-masked]> wrote:
> [email-masked] wrote:
> 
>> ----- Mail original -----
>>> De: "Matt Burgess" <[email-masked]>
>>> À: [email-masked]
>>> Cc: [email-masked], [email-masked]
>>> Envoyé: Lundi 2 Avril 2012 00:34:51
>>> Objet: bug#11150: getlogin test failure
>>>
>>> Hi,
>>>
>>> The coreutils-8.16 release brought in the getlogin gnulib module.
>>>
>>> When running through the testsuite, test-getlogin.c fails for me on a
>>> GNU/Linux system.  There are a couple of different failure scenarios:
>>>
>>
>> I am surprised nobody answered to this test failure that I fixed on my
>> build system using the same sed as LFS book.
>>

I'm just as guilty of not following up on my own report.

> If you run the root-only tests as recommended in README,
> does that test still fail?

I run the root-only tests as:

make NON_ROOT_USERNAME=nobody check-root

I get no failures during that run.

I run the other tests as:

su nobody -s /bin/bash -c "make RUN_EXPENSIVE_TESTS=yes check"

It's here that the getlogin test fails.  I don't care so much about the
odd(ish) tty issues for now.  However, the assert in getlogin.c:60-61 that
assumes getlogin() and getenv("LOGNAME") always returns the same name fails
when run under 'su' as shown above, and as recommended in README.

Hopefully, that failure is easy enough for anyone to reproduce.  At some
point I hope to get more time to look into the tty issue.

Regards,

Matt.