modules/sethostname-tests


Log

Author Commit Date CI Message
Paul Eggert 652baf7d 2012-06-26T16:46:25 root-uid: new module 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.
Bruno Haible 99e8c6b0 2011-12-03T15:57:00 sethostname tests: Fix link error on mingw. * 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).
Bruno Haible 91c85981 2011-12-03T15:28:47 sethostname tests: Fix compilation error on mingw. * 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.
Bruno Haible 97aaf15f 2011-12-03T14:50:45 Tweak last commit. * 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.
Ben Walton 146ac55d 2011-12-02T23:04:19 Add a test suite for the sethostname module. 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>