summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-12-13 22:04:41 +0000
committerwtc%netscape.com <devnull@localhost>2002-12-13 22:04:41 +0000
commit8703ea0ca7d05542047e4fc5e4743c30a86e7b89 (patch)
tree93c900ab0a3365bcf683697a417fa4c017e71b32
parent5838826b187db45f06bc9cd7752787c2cbeff3e5 (diff)
downloadnss-hg-8703ea0ca7d05542047e4fc5e4743c30a86e7b89.tar.gz
Bug 185074: open the files we just did a "chmod -w" on once to work around
a Mac OS X NFS bug. Subsequent opens will see the file is readonly with no delay. Tag: NSS_3_7_BRANCH
-rwxr-xr-xsecurity/nss/tests/dbtests/dbtests.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/security/nss/tests/dbtests/dbtests.sh b/security/nss/tests/dbtests/dbtests.sh
index 5ae5f6269..ae498f780 100755
--- a/security/nss/tests/dbtests/dbtests.sh
+++ b/security/nss/tests/dbtests/dbtests.sh
@@ -177,6 +177,15 @@ dbtest_main()
cp -r ${CLIENTDIR}/* $RONLY_DIR
chmod -w $RONLY_DIR $RONLY_DIR/*
+ # On Mac OS X 10.1, if we do a "chmod -w" on files in an
+ # NFS-mounted directory, it takes several seconds for the
+ # first open to see the files are readonly, but subsequent
+ # opens immediately see the files are readonly. As a
+ # workaround we open the files once first. (Bug 185074)
+ if [ "${OS_ARCH}" = "Darwin" ]; then
+ cat $RONLY_DIR/* > /dev/null
+ fi
+
dbtest -d $RONLY_DIR
ret=$?
if [ $ret -ne 46 ]; then