summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-05-20 12:02:26 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-05-20 12:02:26 +0000
commitbfd84604f6e31c3244248916139f7c34b1e52deb (patch)
tree0c343f12ade68fe9f7b0ab9e8a3b8a20f08ae8fc /Build/source
parent0457b178a2e50ed24680b52e0bbb6412d6df0799 (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')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog4
-rwxr-xr-xBuild/source/texk/kpathsea/kpseaccess.test29
2 files changed, 30 insertions, 3 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index d7fcb074502..ecc546ef3ce 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpseaccess.test: Allow for unexpected test results.
+
2010-05-18 Karl Berry <karl@tug.org>
* texmf.cnf (shell_escape): set to p. Trying restricted shells again.
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
+