]> 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>
Mon, 6 Jun 2022 10:13:47 +0000 (12:13 +0200)
commitedbf01f92b772439260c6a245669a045038d53e3
tree66e16a30772db6db2a30aa5d9fa922f671c4fa6f
parent4d9ec6cb01a8425bd59a1fdf71caa1d48b10cfcc
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