test-stat: don't allocate PATH_MAX bytes
authorEric Blake <eblake@redhat.com>
Mon, 20 Jun 2011 21:12:10 +0000 (15:12 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 20 Jun 2011 21:38:42 +0000 (15:38 -0600)
commitd80aff0ae74993962a24f205a356ffae59eab5be
tree1c3c49aa88bc01362779c479a8cfa193ecf1e6ed
parent6187bd67c9ce5258a01fb1305b4257a67daa4154
test-stat: don't allocate PATH_MAX bytes

POSIX allows systems (like Hurd) that don't define PATH_MAX, or
which define it larger than a reasonable stack allocation should
be.  The test originally used stack allocation to avoid portability
problems with getcwd, but the getcwd-lgpl module solves those.

* tests/test-stat.h (test_stat_func): Don't stack-allocate a
PATH_MAX-sized buffer.
* modules/openat-tests (Depends-on): Add getcwd-lgpl, drop pathmax.
* modules/stat-tests (Depends-on): Likewise.
* tests/test-fstatat.c (includes): Drop pathmax.h.
* tests/test-stat.c (includes): Likewise.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
modules/openat-tests
modules/stat-tests
tests/test-fstatat.c
tests/test-stat.c
tests/test-stat.h