]> Savannah Git Hosting - gnulib.git/commit
getlogin, getlogin_r tests: Avoid test failure in specific environments.
authorBruno Haible <bruno@clisp.org>
Mon, 6 Jun 2022 09:55:04 +0000 (11:55 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 31 Aug 2022 23:09:03 +0000 (01:09 +0200)
commit0d0e4e1fd2899f9a8642a5fa78e0d4a46451cc48
tree0fd1231b8b3696c149e7d4301376b46ef3a2df07
parent14c875cd64b290d729973f296d4dd955742e6449
getlogin, getlogin_r tests: Avoid test failure in specific environments.

Reported by Letu Ren <fantasquex@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00001.html>.

* modules/getlogin-tests (Depends-on): Add stdbool.
* modules/getlogin_r-tests (Depends-on): Likewise.
* tests/test-getlogin.h: Include stdbool.h.
(test_getlogin_result): On Linux, skip the test if /proc/self/loginuid
contains "-1".
ChangeLog
modules/getlogin-tests
modules/getlogin_r-tests
tests/test-getlogin.h