[darwinbuild-changes] [932] branches/PR-8817822/testing/darwintrace/run-tests.sh
source_changes at macosforge.org
source_changes at macosforge.org
Tue Feb 8 16:00:16 PST 2011
Revision: 932
http://trac.macosforge.org/projects/darwinbuild/changeset/932
Author: wsiegrist at apple.com
Date: 2011-02-08 16:00:16 -0800 (Tue, 08 Feb 2011)
Log Message:
-----------
Add tests for root path ignore feature
Modified Paths:
--------------
branches/PR-8817822/testing/darwintrace/run-tests.sh
Modified: branches/PR-8817822/testing/darwintrace/run-tests.sh
===================================================================
--- branches/PR-8817822/testing/darwintrace/run-tests.sh 2011-02-08 23:32:52 UTC (rev 931)
+++ branches/PR-8817822/testing/darwintrace/run-tests.sh 2011-02-09 00:00:16 UTC (rev 932)
@@ -50,9 +50,11 @@
done
set -e
+
echo "========== TEST: close() Safety =========="
$CLOSETEST
+
echo "========== TEST: open() Trace =========="
for FILE in /System/Library/LaunchDaemons/*.plist;
do
@@ -63,6 +65,7 @@
test $C -eq 1
done
+
echo "========== TEST: readlink() Trace =========="
for FILE in $(find /System/Library/Frameworks/*Foundation.framework -type l | xargs);
do
@@ -72,6 +75,33 @@
test $C -eq 1
done
+
+echo "========== TEST: ROOT Ignores =========="
+export DARWINTRACE_IGNORE_ROOTS=""
+export DSTROOT="/System/Library/LaunchAgents"
+for FILE in /var/log/*.log;
+do
+ cat $FILE >> /dev/null;
+ RP=$($REALPATH $FILE);
+ LOGPAT="cat\[[0-9]+\][[:space:]]open[[:space:]]${RP}"
+ C=$(grep -cE $LOGPAT $DARWINTRACE_LOG)
+ test $C -eq 1
+done
+
+for FILE in /System/Library/LaunchAgents/com.apple.*;
+do
+ cat $FILE >> /dev/null;
+ RP=$($REALPATH $FILE);
+ LOGPAT="cat\[[0-9]+\][[:space:]]open[[:space:]]${RP}"
+ set +e
+ C=$(grep -cE $LOGPAT $DARWINTRACE_LOG)
+ set -e
+ test $C -eq 0
+done
+unset DARWINTRACE_IGNORE_ROOTS
+unset DSTROOT
+
+
echo "========== TEST: Redirection =========="
mkdir -p $ROOT/$PREFIX
mkdir -p $ROOT/usr/lib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20110208/091a0c11/attachment-0001.html>
More information about the darwinbuild-changes
mailing list