Mercurial > hg > octave-shane > gnulib-hg
view tests/test-freadahead.sh @ 12258:150adbe92b27
stat: detect FreeBSD bug
Like Solaris 9, FreeBSD 7.2 mistakenly allows stat("link-to-file/").
Unlike Solaris, it correctly forbids stat("file/"). A number of
interfaces are affected (such as utimes), but replacing stat is
enough to catch several by reusing the Solaris 9 fixes.
* m4/stat.m4 (gl_FUNC_STAT): Also detect FreeBSD bug with slash on
symlink.
* doc/posix-functions/stat.texi (stat): Document the bug.
* tests/test-stat.h (test_stat_func): Add argument.
* tests/test-stat.c (main): Adjust caller.
* tests/test-fstatat.c (main): Likewise.
* modules/stat-tests (Depends-on): Add stdbool, symlink.
Reported by Jim Meyering.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sat, 07 Nov 2009 16:59:11 -0700 |
parents | e21121c06cf2 |
children |
line wrap: on
line source
#!/bin/sh ./test-freadahead${EXEEXT} 0 < "$srcdir/test-freadahead.sh" || exit 1 ./test-freadahead${EXEEXT} 5 < "$srcdir/test-freadahead.sh" || exit 1 exit 0