diff options
author | Eric Blake <eblake@redhat.com> | 2011-04-26 14:51:24 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-04-27 11:58:00 -0600 |
commit | 02923aada23a2fa2122b415f313730f2e5e266ec (patch) | |
tree | fb419a124d615ec5085e4f1a4c47a43cdbf8381b /modules | |
parent | 043be67acb94a724f96e3b18c3a09aefffd463af (diff) | |
download | gnulib-02923aada23a2fa2122b415f313730f2e5e266ec.tar.gz |
getcwd: enhance tests
The existing getcwd was weak, and only tested things guaranteed
by the new getcwd-lgpl. Move those tests into a new file and
strengthen them slightly (such as guaranteeing the ERANGE error
for a non-zero but too-small size). Then copy the m4 tests
for PATH_MAX failures into the GPL getcwd tests, to prove that
our replacement really is fixing the things that cause us to
reject the system getcwd as non-robust.
* tests/test-getcwd-lgpl.c: New file, taken from...
* tests/test-getcwd.c: ...old contents. Rewrite this file to
repeat long path stress tests from m4 probe.
* modules/getcwd-lgpl-tests: New module.
* modules/getcwd-tests (Depends-on): Depend on lgpl tests.
* m4/getcwd-abort-bug.m4: Update comment.
* m4/getcwd-path-max.m4: Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/getcwd-lgpl-tests | 12 | ||||
-rw-r--r-- | modules/getcwd-tests | 6 |
2 files changed, 16 insertions, 2 deletions
diff --git a/modules/getcwd-lgpl-tests b/modules/getcwd-lgpl-tests new file mode 100644 index 0000000000..07fdf73d5c --- /dev/null +++ b/modules/getcwd-lgpl-tests @@ -0,0 +1,12 @@ +Files: +tests/test-getcwd-lgpl.c +tests/signature.h +tests/macros.h + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-getcwd-lgpl +check_PROGRAMS += test-getcwd-lgpl diff --git a/modules/getcwd-tests b/modules/getcwd-tests index 016961fc71..2187acc75f 100644 --- a/modules/getcwd-tests +++ b/modules/getcwd-tests @@ -1,9 +1,11 @@ Files: tests/test-getcwd.c -tests/signature.h -tests/macros.h Depends-on: +errno +fcntl-h +getcwd-lgpl +sys_stat configure.ac: |