summaryrefslogtreecommitdiff
path: root/source3/lib/ldb/tests/test-generic.sh
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-10-21 00:10:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:35 -0500
commit7a390a0dabcdadb30196662b6cdec512bf81dcb4 (patch)
tree8ed126e072e4446ad47d25f277059af5ccd556cc /source3/lib/ldb/tests/test-generic.sh
parentaa3ca346d82da2501406cc1f482643b20905e467 (diff)
downloadsamba-7a390a0dabcdadb30196662b6cdec512bf81dcb4.tar.gz
samba-7a390a0dabcdadb30196662b6cdec512bf81dcb4.tar.bz2
samba-7a390a0dabcdadb30196662b6cdec512bf81dcb4.zip
r19430: merge recent ldb changes from Samba4. This includes memory leak fixes
and significant speedups (This used to be commit bb5c205fef90aa8b89ba400fb9f2f37a111676a8)
Diffstat (limited to 'source3/lib/ldb/tests/test-generic.sh')
-rwxr-xr-xsource3/lib/ldb/tests/test-generic.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/lib/ldb/tests/test-generic.sh b/source3/lib/ldb/tests/test-generic.sh
index e4085c6d65..14337cc135 100755
--- a/source3/lib/ldb/tests/test-generic.sh
+++ b/source3/lib/ldb/tests/test-generic.sh
@@ -10,6 +10,12 @@ echo "LDB_URL: $LDB_URL"
echo "Adding base elements"
$VALGRIND ldbadd $LDBDIR/tests/test.ldif || exit 1
+echo "Adding again - should fail"
+ldbadd $LDBDIR/tests/test.ldif 2> /dev/null && {
+ echo "Should have failed to add again - gave $?"
+ exit 1
+}
+
echo "Modifying elements"
$VALGRIND ldbmodify $LDBDIR/tests/test-modify.ldif || exit 1
@@ -32,8 +38,11 @@ if [ $LDB_SPECIALS = 1 ]; then
$VALGRIND ldbadd $LDBDIR/tests/test-index.ldif || exit 1
fi
-echo "Adding attributes"
-$VALGRIND ldbadd $LDBDIR/tests/test-wrong_attributes.ldif || exit 1
+echo "Adding bad attributes - should fail"
+$VALGRIND ldbadd $LDBDIR/tests/test-wrong_attributes.ldif && {
+ echo "Should fhave failed - gave $?"
+ exit 1
+}
echo "testing indexed search"
$VALGRIND ldbsearch '(uid=uham)' || exit 1
@@ -75,7 +84,7 @@ echo "Testing binary file attribute value"
mkdir -p tests/tmp
cp $LDBDIR/tests/samba4.png tests/tmp/samba4.png
$VALGRIND ldbmodify $LDBDIR/tests/photo.ldif || exit 1
-count=`$VALGRIND ldbsearch '(cn=Ursula Hampster)' jpegPhoto | grep '^dn' | wc -l`
+count=`$VALGRIND ldbsearch '(cn=Hampster Ursula)' jpegPhoto | grep '^dn' | wc -l`
if [ $count != 1 ]; then
echo returned $count records - expected 1
exit 1
@@ -88,7 +97,7 @@ echo "Testing compare"
count=`$VALGRIND ldbsearch '(cn>=t)' cn | grep '^dn' | wc -l`
if [ $count != 2 ]; then
echo returned $count records - expected 2
- echo "this fails on opsnLdap ..."
+ echo "this fails on openLdap ..."
fi
count=`$VALGRIND ldbsearch '(cn<=t)' cn | grep '^dn' | wc -l`