From d212358f7868204b8d8925aeb60666e2fbf37c23 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Fri, 13 Dec 2002 02:06:34 +0000 Subject: [PATCH] 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. --- security/nss/tests/dbtests/dbtests.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/security/nss/tests/dbtests/dbtests.sh b/security/nss/tests/dbtests/dbtests.sh index 5ae5f6269f00..ae498f780d5a 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