Skip to content
Permalink
Browse files

Add tests for root path ignore feature

git-svn-id: https://svn.macosforge.org/repository/darwinbuild/branches/PR-8817822@932 10a61168-4876-4dac-953b-31e694342555
  • Loading branch information
wsiegrist@apple.com
wsiegrist@apple.com committed Feb 9, 2011
1 parent a05c41e commit cef40e3c368368a6e65f4b45736b8624ee6e06da
Showing with 30 additions and 0 deletions.
  1. +30 −0 testing/darwintrace/run-tests.sh
@@ -50,9 +50,11 @@ do
done
set -e


echo "========== TEST: close() Safety =========="
$CLOSETEST


echo "========== TEST: open() Trace =========="
for FILE in /System/Library/LaunchDaemons/*.plist;
do
@@ -63,6 +65,7 @@ do
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 @@ do
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

0 comments on commit cef40e3

Please sign in to comment.
You can’t perform that action at this time.