summaryrefslogtreecommitdiff
path: root/modules/sethostname-tests
Commit message (Collapse)AuthorAgeFilesLines
* root-uid: new modulePaul Eggert2012-06-261-0/+1
| | | | | | | | | | | | | | | | | | | | | This is for portability to Tandem's NonStop Kernel. * lib/root-uid.h, modules/root-uid: New files. * lib/euidaccess.c, lib/pt_chown.c, lib/unlinkdir.c: * lib/write-any-file.c, tests/test-sethostname2.c: Include "root-uid.h". * lib/euidaccess.c (euidaccess): * lib/pt_chown.c (main): * lib/unlinkdir.c (cannot_unlink_dir): * lib/write-any-file.c (can_write_any_file): * m4/mknod.m4 (gl_FUNC_MKNOD): * tests/test-sethostname2.c (geteuid, main): Don't assume ROOT_UID == 0. * modules/euidaccess (Depends-on): * modules/pt_chown (Depends-on): * modules/sethostname-tests (Depends-on): * modules/unlinkdir (Depends-on): * modules/write-any-file (Depends-on): Add root-uid.
* sethostname tests: Fix link error on mingw.Bruno Haible2011-12-031-3/+6
| | | | | | | | | | | | | * tests/test-sethostname1.c: New file, extracted from tests/test-sethostname.c. * tests/test-sethostname2.c: New file, extracted from tests/test-sethostname.c. * tests/test-sethostname.c: Remove file. * modules/sethostname-tests (Files): Add tests/test-sethostname1.c, tests/test-sethostname2.c. Remove tests/test-sethostname.c. (Depends-on): Add gethostname. (Makefile.am): Compile both test-sethostname1 and test-sethostname2. Link the latter with $(GETHOSTNAME_LIB).
* sethostname tests: Fix compilation error on mingw.Bruno Haible2011-12-031-1/+0
| | | | | | * tests/test-sethostname.c: Don't include <sys/types.h>. (geteuid): Use a dummy value without uid_t. * modules/sethostname-tests (Depends-on): Remove sys_types.
* Tweak last commit.Bruno Haible2011-12-031-1/+2
| | | | | | | | | * modules/sethostname-tests (Files): Sort by decreasing importance. (configure.ac): Check for geteuid. * tests/test-sethostname.c (main): Emit error messages to stderr. Skip the test when there's nothing to test. Drop an unnecessary cast. Improve an error message. Verify that the final sethostname() call succeeds.
* Add a test suite for the sethostname module.Ben Walton2011-12-031-0/+13
Provide a module that tests the functionality of sethostname(). * modules/sethostname-tests: New file. A test program for the sethostname module. * tests/test-sethostname.c: Likewise. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>