summaryrefslogtreecommitdiff
path: root/tests/test-getlogin_r.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* getlogin tests, getlogin_r tests: Avoid failure on Solaris OpenIndiana.Bruno Haible2020-12-301-0/+8
| | | | | | | * tests/test-getlogin.c (main): Don't fail if getlogin() returns NULL with no errno. * tests/test-getlogin_r.c (main): Don't fail if getlogin_r() returns EINVAL.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* getlogin tests: Avoid #ifdefs when sharing code between modules.Bruno Haible2017-07-111-83/+3
| | | | | | | | | | * modules/getlogin_r-tests (Files): Add tests/test-getlogin.h. * modules/getlogin-tests (Files): Likewise. Remove tests/test-getlogin_r.c. * tests/test-getlogin.h: Extracted from tests/test-getlogin_r.c. * tests/test-getlogin.c: Extracted from tests/test-getlogin_r.c. * tests/test-getlogin_r.c: Include test-getlogin.h. Omit code that tests getlogin().
* getlogin: don’t assume one name per uidPaul Eggert2017-07-101-14/+21
| | | | | | | | | | | | | | Problem reported by Wolfgang F. Muthmann (Bug#27640). * modules/getlogin-tests (Files): Add tests/test-getlogin_r.c. (ttyname): Remove test. * modules/getlogin_r-tests (ttyname): Remove test. * tests/test-getlogin.c: Replace this near-clone of test-getlogin_r.c with ‘#define TEST_LOGIN’ followed by ‘#include "test-getlogin_r.c"’. * tests/test-getlogin_r.c: If TEST_GETLOGIN is defined, test getlogin rather than getlogin_r. This avoids code duplication. (main): Use isatty and fstat rather than ttyname and stat. Use getpwnam instead of getpwuid, to be portable to test platforms that have multiple login names for the same uid.
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* getlogin_r tests: Port to mingw.Bruno Haible2016-12-171-1/+3
| | | | * tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* getlogin_r-tests: check return value rather than errnoPádraig Brady2014-05-221-4/+4
| | | | | * tests/test-getlogin_r.c (main): As per POSIX we should be verifying the return value from getlogin_r() rather than errno.
* getlogin_r-tests: fix various issues in recent changePádraig Brady2014-05-221-1/+6
| | | | | | | | * tests/test-getlogin_r.c: Include required headers that were missed in recent commit eec20b4e. Also consistently check the errno rather than the return value from getlogin_r as POSIX only specifies that non zero is returned on error. * modules/getlogin_r-tests (configure.ac): Add the check for ttyname().
* getlogin_r-tests: avoid false failure under sudo/ssh etc.Pádraig Brady2014-05-191-5/+24
| | | | | * tests/test-getlogin_r.c (main): Sync up with test-getlogin.c changes from commit 97249cf29 to not depend on environment variables.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* getlogin_r-tests: allow errno == ENXIO or ENOENTPádraig Brady2012-11-091-0/+8
| | | | | | | | * tests/test-getlogin.c (main): Skip tests if getlogin fails with errno == ENXIO (No controlling tty). * tests/test-getlogin_r.c (main): Skip tests if getlogin_r fails with errno == ENOENT. This was reported to happen in various situations on GNU/Linux.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* getlogin, getlogin_r tests: Avoid test failure on Linux/SPARC.Bruno Haible2011-09-211-1/+3
| | | | | * tests/test-getlogin.c (main): Allow a failure with EINVAL. * tests/test-getlogin_r.c (main): Likewise.
* getlogin_r: Avoid test failure on HP-UX 11.Bruno Haible2011-01-031-1/+7
| | | | | | | * tests/test-getlogin_r.c (main): Allow an error code EINVAL instead of ERANGE when the second argument is zero. * doc/posix-functions/getlogin_r.texi: Document the HP-UX 11 portability problem.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* getlogin, getlogin_r: Document HP-UX 11.11 bugs.Bruno Haible2010-12-201-1/+6
| | | | | | * doc/posix-functions/getlogin.texi: Document HP-UX 11.11 bug. * doc/posix-functions/getlogin_r.texi: Likewise. * tests/test-getlogin_r.c (main): Avoid test failure on HP-UX 11.11.
* getlogin, getlogin_r: Avoid test failure.Bruno Haible2010-01-121-1/+8
|
* getlogin_r: Support for native Windows.Bruno Haible2010-01-091-0/+8
|
* Tests for module 'getlogin_r'.Bruno Haible2010-01-091-0/+73