diff --git a/tests/scripts/test001-ldif2ldbm b/tests/scripts/test001-ldif2ldbm
index ab92db145518c2f68b8cfe6ddf3ef223efbb5ea5..a93b1d8f55e9b9da69ca6e2983d3cb2c875eadb7 100755
--- a/tests/scripts/test001-ldif2ldbm
+++ b/tests/scripts/test001-ldif2ldbm
@@ -49,8 +49,13 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
-echo "Comparing retrieved entries to LDIF file used to create database"
-cmp $SEARCHOUT $LDIF
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "comparison failed - database was not created correctly"
 	exit 1
diff --git a/tests/scripts/test001-slapadd b/tests/scripts/test001-slapadd
index ab92db145518c2f68b8cfe6ddf3ef223efbb5ea5..a93b1d8f55e9b9da69ca6e2983d3cb2c875eadb7 100755
--- a/tests/scripts/test001-slapadd
+++ b/tests/scripts/test001-slapadd
@@ -49,8 +49,13 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
-echo "Comparing retrieved entries to LDIF file used to create database"
-cmp $SEARCHOUT $LDIF
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "comparison failed - database was not created correctly"
 	exit 1
diff --git a/tests/scripts/test002-populate b/tests/scripts/test002-populate
index 6de48d2df33f8ac61750ffc7788bda2462e43cb7..641a3d5c65bb980f57bd55ec1a59d374bca965c2 100755
--- a/tests/scripts/test002-populate
+++ b/tests/scripts/test002-populate
@@ -43,8 +43,7 @@ fi
 
 echo "Using ldapsearch to read all the entries..."
 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
-	'objectclass=*' | egrep -iv '^creatorsname:|^createtimestamp:' > \
-	$SEARCHOUT 2>&1
+	'objectclass=*' > $SEARCHOUT 2>&1
 
 kill -HUP $PID
 
diff --git a/tests/scripts/test003-search b/tests/scripts/test003-search
index 952133bd081e4606ec85adb333cd3f018492c7c7..03179910f6be4b5ce667c27868a1c666533e490e 100755
--- a/tests/scripts/test003-search
+++ b/tests/scripts/test003-search
@@ -45,11 +45,11 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
-cat /dev/null > $TESTOUT
+cat /dev/null > $SEARCHOUT
 
 echo "Testing exact searching..."
 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
-	'sn=jensen' >> $TESTOUT 2>&1
+	'sn=jensen' >> $SEARCHOUT 2>&1
 if test $RC != 0 ; then
 	echo "ldapsearch failed!"
 	kill -HUP $PID
@@ -58,7 +58,7 @@ fi
 
 echo "Testing OR searching..."
 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
-	'(|(objectclass=rfc822mailgroup)(sn=jones))' >> $TESTOUT 2>&1
+	'(|(objectclass=rfc822mailgroup)(sn=jones))' >> $SEARCHOUT 2>&1
 if test $RC != 0 ; then
 	echo "ldapsearch failed!"
 	kill -HUP $PID
@@ -67,7 +67,7 @@ fi
 
 echo "Testing AND matching and ends-with searching..."
 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
-	'(&(objectclass=rfc822mailgroup)(cn=A*))' >> $TESTOUT 2>&1
+	'(&(objectclass=rfc822mailgroup)(cn=A*))' >> $SEARCHOUT 2>&1
 if test $RC != 0 ; then
 	echo "ldapsearch failed!"
 	kill -HUP $PID
@@ -76,8 +76,7 @@ fi
 
 echo "Testing NOT searching..."
 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
-	'(!(objectclass=person))' | grep -v "^modifytimestamp:" \
-	>> $TESTOUT 2>&1
+	'(!(objectclass=person))' >> $SEARCHOUT 2>&1
 if test $RC != 0 ; then
 	echo "ldapsearch failed!"
 	kill -HUP $PID
@@ -86,8 +85,16 @@ fi
 
 kill -HUP $PID
 
-echo "Comparing results"
-cmp $TESTOUT $SEARCHOUTMASTER
+TESTOUT=$SEARCHOUT
+LDIF=$SEARCHOUTMASTER
+
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "Comparison failed"
 	exit 1
diff --git a/tests/scripts/test004-modify b/tests/scripts/test004-modify
index cb1fdbdfa85cafd2e64f1a3bfde0985d1cb2cbf7..fa3bc019851a5302226fa44b0d63a00676f49d58 100755
--- a/tests/scripts/test004-modify
+++ b/tests/scripts/test004-modify
@@ -114,8 +114,7 @@ fi
 
 echo "Using ldapsearch to retrieve all the entries..."
 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
-	    'objectClass=*' | egrep -iv '^createtimestamp:|^modifytimestamp:' \
-	    > $SEARCHOUT 2>&1
+	    'objectClass=*' > $SEARCHOUT 2>&1
 RC=$?
 kill -HUP $PID
 if test $RC != 0 ; then
@@ -123,8 +122,15 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
-echo "Comparing database to reference file"
-cmp $SEARCHOUT $MODIFYOUTMASTER
+LDIF=$MODIFYOUTMASTER
+
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "comparison failed - modify operations did not complete correctly"
 	exit 1
diff --git a/tests/scripts/test005-modrdn b/tests/scripts/test005-modrdn
index 5e3ad6d29634f2f6816c019f92850a2145dc80c4..70392336cfc477ad416116c7c4f3c228a18a8691 100755
--- a/tests/scripts/test005-modrdn
+++ b/tests/scripts/test005-modrdn
@@ -75,8 +75,7 @@ fi
 
 echo "Using ldapsearch to retrieve all the entries..."
 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
-	    'objectClass=*' | egrep -iv '^createtimestamp:|^modifytimestamp:' \
-	    > $SEARCHOUT 2>&1
+	    'objectClass=*' > $SEARCHOUT 2>&1
 RC=$?
 kill -HUP $PID
 if test $RC != 0 ; then
@@ -84,8 +83,15 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
-echo "Comparing database to reference file"
-cmp $SEARCHOUT $MODRDNOUTMASTER
+LDIF=$MODRDNOUTMASTER
+
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "comparison failed - modrdn operations did not complete correctly"
 	exit 1
diff --git a/tests/scripts/test006-acls b/tests/scripts/test006-acls
index eddf1f5e2c112007184c7544382813e45f00232c..58d12154074923e69fd9a3a2e8135243cb724661 100755
--- a/tests/scripts/test006-acls
+++ b/tests/scripts/test006-acls
@@ -114,8 +114,15 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
-echo "Comparing database to reference file"
-cmp $SEARCHOUT $ACLOUTMASTER
+LDIF=$ACLOUTMASTER
+
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "comparison failed - modify operations did not complete correctly"
 	exit 1
diff --git a/tests/scripts/test007-replication b/tests/scripts/test007-replication
index da7ab0946d0ee8219c369338781944012c06d366..b3d71c295c046c1cd925c6b66e5e9014b348be7d 100755
--- a/tests/scripts/test007-replication
+++ b/tests/scripts/test007-replication
@@ -164,8 +164,17 @@ fi
 
 kill -HUP $PID $SLAVEPID $SLURPPID
 
+SEARCHOUT=$MASTEROUT
+LDIF=$SLAVEOUT
+
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+
 echo "Comparing retrieved entries from master and slave..."
-cmp $MASTEROUT $SLAVEOUT
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "test failed - master and slave databases differ"
 	exit 1
diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency
index 9ca8486ce85de4ce8d910fe0223c54e45929f2ff..658c0d91032d62e5c52b7838eab3f0ec5dd98ad7 100755
--- a/tests/scripts/test008-concurrency
+++ b/tests/scripts/test008-concurrency
@@ -58,8 +58,13 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
-echo "Comparing retrieved entries to LDIF file used to create database"
-cmp $SEARCHOUT $LDIF
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if test $? != 0 ; then
 	echo "comparison failed - database was not created correctly"
 	exit 1