diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-05-20 12:02:26 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-05-20 12:02:26 +0000 |
commit | bfd84604f6e31c3244248916139f7c34b1e52deb (patch) | |
tree | 0c343f12ade68fe9f7b0ab9e8a3b8a20f08ae8fc /Build/source/texk/kpathsea/kpseaccess.test | |
parent | 0457b178a2e50ed24680b52e0bbb6412d6df0799 (diff) |
kpathsea: fix "make check" problems
git-svn-id: svn://tug.org/texlive/trunk@18372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/kpseaccess.test')
-rwxr-xr-x | Build/source/texk/kpathsea/kpseaccess.test | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/Build/source/texk/kpathsea/kpseaccess.test b/Build/source/texk/kpathsea/kpseaccess.test index ffe2b56f312..5006bcf1afa 100755 --- a/Build/source/texk/kpathsea/kpseaccess.test +++ b/Build/source/texk/kpathsea/kpseaccess.test @@ -3,6 +3,18 @@ # Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +ret=0 + +pass () { + echo "***** unexpected success of './kpseaccess $@'" + ret=77 +} + +fail () { + echo "***** unexpected failure of './kpseaccess $@'" + ret=77 +} + ./kpseaccess '' nonesuch && exit 1 ./kpseaccess - nonesuch && exit 1 ./kpseaccess r nonesuch && exit 1 @@ -12,12 +24,21 @@ ./kpseaccess '' access.o || exit 1 ./kpseaccess - access.o || exit 1 ./kpseaccess rw access.o || exit 1 -./kpseaccess x access.o && exit 1 +# From the access(3p) POSIX manpage: +# If the process has appropriate privileges, an implementation may indicate +# success for X_OK even if none of the execute file permission bits are set. +./kpseaccess x access.o && pass x access.o -./kpseaccess rwx kpseaccess || exit 1 +# Testing write access to kpseaccess itself might fail with ETXTBSY. +./kpseaccess rwx kpsewhich || { + fail rwx kpsewhich + ./kpseaccess r kpsewhich || fail r kpsewhich + ./kpseaccess w kpsewhich || fail w kpsewhich + ./kpseaccess x kpsewhich || fail x kpsewhich +} ./kpseaccess r $srcdir/access.c || exit 1 -./kpseaccess x $srcdir/access.c && exit 1 +./kpseaccess x $srcdir/access.c && pass x $srcdir/access.c if ./kpseaccess w $srcdir/access.c; then echo 'file "$srcdir/access.c" is writable' @@ -25,3 +46,5 @@ else echo 'file "$srcdir/access.c" is not writable' fi +exit $ret + |