The branch, master has been updated via 8b408f781970b3f2b310389f9ae73ad0c5e42881 (commit) via 7c72853b50b14653fe3c62fde3bf653b45c755f8 (commit) via a5f9816263b67d87a62bb7e18aa10a7b0ba44794 (commit) via 388da7ca97b86aef9e344c2259d0d910dd0659d5 (commit) via e2aab39e560dc395fe8aba53ffd6fc42b025aa36 (commit) via adc9d105cdce4500d16f86b39401ae3aa3b0cacd (commit) via c3ab29265546a56377a22ddc67701871ea41262c (commit) from 63bb31e11812264aa377abdd4c256c46dde236b0 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 8b408f781970b3f2b310389f9ae73ad0c5e42881 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 3 16:23:13 2009 +0100 s4:selftest: avoid hardcoded pathes in blackbox tests metze commit 7c72853b50b14653fe3c62fde3bf653b45c755f8 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 3 16:21:54 2009 +0100 s4:selftest: don't use hardcoded pathes metze commit a5f9816263b67d87a62bb7e18aa10a7b0ba44794 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 3 16:20:24 2009 +0100 selftest: don't use hardcoded path to nmblookup in Samba4.pm metze commit 388da7ca97b86aef9e344c2259d0d910dd0659d5 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 3 16:19:46 2009 +0100 selftest: export BUILDDIR, BUILDDIR_ABS and EXEEXT metze commit e2aab39e560dc395fe8aba53ffd6fc42b025aa36 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 3 16:16:17 2009 +0100 s4:lib/ldb: call ldb utils always via $VALGRIND ldbfoo$EXEEXT in the tests metze commit adc9d105cdce4500d16f86b39401ae3aa3b0cacd Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 3 16:10:52 2009 +0100 merged-build: link in LIBREPLACE into samba4 code as in the native build metze commit c3ab29265546a56377a22ddc67701871ea41262c Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 3 02:32:57 2009 +0100 merged-build: force non-shared build for samba4 This should fix 'make test4'. metze ----------------------------------------------------------------------- Summary of changes: nsswitch/tests/test_wbinfo.sh | 4 +- selftest/selftest.pl | 4 ++ selftest/target/Samba4.pm | 25 +++++----- source3/configure.in | 3 + source3/samba4-templates.mk | 8 ++-- source3/samba4.m4 | 18 +++++++ source4/client/tests/test_cifsdd.sh | 4 +- source4/client/tests/test_smbclient.sh | 4 +- source4/lib/ldb/tests/test-extended.sh | 6 +- source4/lib/ldb/tests/test-generic.sh | 68 ++++++++++++++-------------- source4/lib/ldb/tests/test-tdb-features.sh | 34 +++++++------- source4/lib/ldb/tests/test-tdb.sh | 4 +- source4/librpc/tests/test_ndrdump.sh | 4 +- source4/selftest/tests.sh | 36 +++++++------- source4/torture/tests/test_gentest.sh | 4 +- source4/torture/tests/test_locktest.sh | 4 +- source4/torture/tests/test_masktest.sh | 4 +- source4/utils/tests/test_net.sh | 7 ++- source4/utils/tests/test_nmblookup.sh | 15 ++++--- testprogs/blackbox/test_kinit.sh | 22 +++++---- testprogs/blackbox/test_ldb.sh | 45 ++++++++++--------- 21 files changed, 179 insertions(+), 144 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh index 84876e3..2e94c24 100755 --- a/nsswitch/tests/test_wbinfo.sh +++ b/nsswitch/tests/test_wbinfo.sh @@ -14,8 +14,8 @@ TARGET=$4 shift 4 failed=0 -samba4bindir=`dirname $0`/../../source4/bin -wbinfo=$samba4bindir/wbinfo +samba4bindir="$BUILDDIR/bin" +wbinfo="$samba4bindir/wbinfo$EXEEXT" . `dirname $0`/../../testprogs/blackbox/subunit.sh diff --git a/selftest/selftest.pl b/selftest/selftest.pl index f6561cc..0be2e78 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -394,6 +394,7 @@ mkdir($prefix, 0777) unless -d $prefix; my $prefix_abs = abs_path($prefix); my $srcdir_abs = abs_path($srcdir); +my $builddir_abs = abs_path($builddir); die("using an empty absolute prefix isn't allowed") unless $prefix_abs ne ""; die("using '/' as absolute prefix isn't allowed") unless $prefix_abs ne "/"; @@ -403,6 +404,9 @@ $ENV{KRB5CCNAME} = "$prefix/krb5ticket"; $ENV{PREFIX_ABS} = $prefix_abs; $ENV{SRCDIR} = $srcdir; $ENV{SRCDIR_ABS} = $srcdir_abs; +$ENV{BUILDDIR} = $builddir; +$ENV{BUILDDIR_ABS} = $builddir_abs; +$ENV{EXEEXT} = $exeext; if (defined($ENV{RUN_FROM_BUILD_FARM}) and ($ENV{RUN_FROM_BUILD_FARM} eq "yes")) { diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 5ca1a6a..0f7d317 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -159,18 +159,19 @@ sub wait_for_start($$) # This will return quickly when things are up, but be slow if we # need to wait for (eg) SSL init - system("bin/nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{SERVER}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{SERVER}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSNAME}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSNAME}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSALIAS}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSALIAS}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{SERVER}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{SERVER}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSNAME}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSNAME}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSALIAS}"); - system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSALIAS}"); + my $nmblookup = $self->bindir_path("nmblookup"); + system("$nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{SERVER}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{SERVER}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSNAME}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSNAME}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSALIAS}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSALIAS}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{SERVER}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{SERVER}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSNAME}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSNAME}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} $testenv_vars->{NETBIOSALIAS}"); + system("$nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSALIAS}"); print $self->getlog_env($testenv_vars); } diff --git a/source3/configure.in b/source3/configure.in index 615ab9e..1a25de8 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -6537,7 +6537,10 @@ fi if test x$enable_merged_build = xyes; then MERGED_BUILD=1 + saved_USESHARED="$USESHARED" + USESHARED="false" m4_include(samba4.m4) + USESHARED="$saved_USESHARED" fi AC_SUBST(ZLIB_LIBS) diff --git a/source3/samba4-templates.mk b/source3/samba4-templates.mk index ecebce6..0024a75 100644 --- a/source3/samba4-templates.mk +++ b/source3/samba4-templates.mk @@ -19,9 +19,9 @@ endef # Link a binary # Arguments: target file, depends, flags define binary_link_template -$(1)4: $(2) $(LIBREPLACE_OBJ) ; +$(1)4: $(2) ; @echo Linking $$@ - @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) $$(LIBS) $$(LIBREPLACE_OBJ) + @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) $$(LIBS) clean:: @rm -f $(1) @@ -32,9 +32,9 @@ endef # Link a host-machine binary # Arguments: target file, depends, flags define host_binary_link_template -$(1)4: $(2) $(LIBREPLACE_OBJ) ; +$(1)4: $(2) ; @echo Linking $$@ - @$$(HOSTLD) $$(HOSTLD_FLAGS) -L$${builddir}/bin/static -o $$@ $$(INSTALL_LINK_FLAGS) $(3) $$(LIBREPLACE_OBJ) + @$$(HOSTLD) $$(HOSTLD_FLAGS) -L$${builddir}/bin/static -o $$@ $$(INSTALL_LINK_FLAGS) $(3) clean:: rm -f $(1) diff --git a/source3/samba4.m4 b/source3/samba4.m4 index e2c754b..8107f81 100644 --- a/source3/samba4.m4 +++ b/source3/samba4.m4 @@ -19,6 +19,24 @@ AC_MSG_RESULT($pythondir) AC_SUBST(pythondir) +SMB_EXT_LIB(LIBREPLACE_EXT, [${LIBDL} ${CRYPT_LIBS}]) +SMB_ENABLE(LIBREPLACE_EXT) + +SMB_EXT_LIB(LIBREPLACE_NETWORK, [${LIBREPLACE_NETWORK_LIBS}]) +SMB_ENABLE(LIBREPLACE_NETWORK) + +SMB_SUBSYSTEM(LIBREPLACE, + [${LIBREPLACE_OBJS}], + [LIBREPLACE_EXT LIBREPLACE_NETWORK], + [-I../lib/replace]) + +LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'` + +SMB_SUBSYSTEM(LIBREPLACE_HOSTCC, + [${LIBREPLACE_HOSTCC_OBJS}], + [], + [-I../lib/replace]) + m4_include(lib/smbreadline/readline.m4) m4_include(heimdal_build/internal.m4) m4_include(../lib/util/fault.m4) diff --git a/source4/client/tests/test_cifsdd.sh b/source4/client/tests/test_cifsdd.sh index 08bfb25..2268b6a 100755 --- a/source4/client/tests/test_cifsdd.sh +++ b/source4/client/tests/test_cifsdd.sh @@ -16,8 +16,8 @@ DOMAIN=$4 . `dirname $0`/../../../testprogs/blackbox/subunit.sh -samba4bindir=`dirname $0`/../../bin -DD=$samba4bindir/cifsdd +samba4bindir="$BUILDDIR/bin" +DD="$samba4bindir/cifsdd$EXEEXT" SHARE=tmp DEBUGLEVEL=1 diff --git a/source4/client/tests/test_smbclient.sh b/source4/client/tests/test_smbclient.sh index 7ff03ba..7775422 100755 --- a/source4/client/tests/test_smbclient.sh +++ b/source4/client/tests/test_smbclient.sh @@ -18,8 +18,8 @@ PREFIX=$5 shift 5 failed=0 -samba4bindir=`dirname $0`/../../bin -smbclient=$samba4bindir/smbclient +samba4bindir="$BUILDDIR/bin" +smbclient="$samba4bindir/smbclient$EXEEXT" . `dirname $0`/../../../testprogs/blackbox/subunit.sh diff --git a/source4/lib/ldb/tests/test-extended.sh b/source4/lib/ldb/tests/test-extended.sh index a84e3b7..14b988e 100755 --- a/source4/lib/ldb/tests/test-extended.sh +++ b/source4/lib/ldb/tests/test-extended.sh @@ -4,7 +4,7 @@ echo "Running extended search tests" mv $LDB_URL $LDB_URL.1 -cat <<EOF | bin/ldbadd || exit 1 +cat <<EOF | $VALGRIND ldbadd$EXEEXT || exit 1 dn: cn=testrec1,cn=TEST i1: 1 i2: 0 @@ -38,10 +38,10 @@ EOF checkcount() { count=$1 expression="$2" - n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l` + n=`$VALGRIND ldbsearch$EXEEXT "$expression" | grep '^dn' | wc -l` if [ $n != $count ]; then echo "Got $n but expected $count for $expression" - bin/ldbsearch "$expression" + $VALGRIND ldbsearch$EXEEXT "$expression" exit 1 fi echo "OK: $count $expression" diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh index 50b5ff9..fec4b5b 100755 --- a/source4/lib/ldb/tests/test-generic.sh +++ b/source4/lib/ldb/tests/test-generic.sh @@ -8,73 +8,73 @@ fi echo "LDB_URL: $LDB_URL" echo "Adding base elements" -$VALGRIND ldbadd $LDBDIR/tests/test.ldif || exit 1 +$VALGRIND ldbadd$EXEEXT $LDBDIR/tests/test.ldif || exit 1 echo "Adding again - should fail" -ldbadd $LDBDIR/tests/test.ldif 2> /dev/null && { +$VALGRIND ldbadd$EXEEXT $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 +$VALGRIND ldbmodify$EXEEXT $LDBDIR/tests/test-modify.ldif || exit 1 echo "Showing modified record" -$VALGRIND ldbsearch '(uid=uham)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(uid=uham)' || exit 1 echo "Rename entry" OLDDN="cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST" NEWDN="cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST" -$VALGRIND ldbrename "$OLDDN" "$NEWDN" || exit 1 +$VALGRIND ldbrename$EXEEXT "$OLDDN" "$NEWDN" || exit 1 echo "Showing renamed record" -$VALGRIND ldbsearch '(uid=uham)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(uid=uham)' || exit 1 echo "Starting ldbtest" -$VALGRIND ldbtest --num-records 100 --num-searches 10 || exit 1 +$VALGRIND ldbtest$EXEEXT --num-records 100 --num-searches 10 || exit 1 if [ $LDB_SPECIALS = 1 ]; then echo "Adding index" - $VALGRIND ldbadd $LDBDIR/tests/test-index.ldif || exit 1 + $VALGRIND ldbadd$EXEEXT $LDBDIR/tests/test-index.ldif || exit 1 fi echo "Adding bad attributes - should fail" -$VALGRIND ldbadd $LDBDIR/tests/test-wrong_attributes.ldif && { +$VALGRIND ldbadd$EXEEXT $LDBDIR/tests/test-wrong_attributes.ldif && { echo "Should fhave failed - gave $?" exit 1 } echo "testing indexed search" -$VALGRIND ldbsearch '(uid=uham)' || exit 1 -$VALGRIND ldbsearch '(&(objectclass=person)(objectclass=person)(objectclass=top))' || exit 1 -$VALGRIND ldbsearch '(&(uid=uham)(uid=uham))' || exit 1 -$VALGRIND ldbsearch '(|(uid=uham)(uid=uham))' || exit 1 -$VALGRIND ldbsearch '(|(uid=uham)(uid=uham)(objectclass=OpenLDAPperson))' || exit 1 -$VALGRIND ldbsearch '(&(uid=uham)(uid=uham)(!(objectclass=xxx)))' || exit 1 -$VALGRIND ldbsearch '(&(objectclass=person)(uid=uham)(!(uid=uhamxx)))' uid \* \+ dn || exit 1 -$VALGRIND ldbsearch '(&(uid=uham)(uid=uha*)(title=*))' uid || exit 1 +$VALGRIND ldbsearch$EXEEXT '(uid=uham)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(&(objectclass=person)(objectclass=person)(objectclass=top))' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(&(uid=uham)(uid=uham))' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(|(uid=uham)(uid=uham))' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(|(uid=uham)(uid=uham)(objectclass=OpenLDAPperson))' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(&(uid=uham)(uid=uham)(!(objectclass=xxx)))' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(&(objectclass=person)(uid=uham)(!(uid=uhamxx)))' uid \* \+ dn || exit 1 +$VALGRIND ldbsearch$EXEEXT '(&(uid=uham)(uid=uha*)(title=*))' uid || exit 1 # note that the "((" is treated as an attribute not an expression # this matches the openldap ldapsearch behaviour of looking for a '=' # to see if the first argument is an expression or not -$VALGRIND ldbsearch '((' uid || exit 1 -$VALGRIND ldbsearch '(objectclass=)' uid || exit 1 -$VALGRIND ldbsearch -b 'cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST' -s base "" sn || exit 1 +$VALGRIND ldbsearch$EXEEXT '((' uid || exit 1 +$VALGRIND ldbsearch$EXEEXT '(objectclass=)' uid || exit 1 +$VALGRIND ldbsearch$EXEEXT -b 'cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST' -s base "" sn || exit 1 echo "Test wildcard match" -$VALGRIND ldbadd $LDBDIR/tests/test-wildcard.ldif || exit 1 -$VALGRIND ldbsearch '(cn=test*multi)' || exit 1 -$VALGRIND ldbsearch '(cn=*test*multi*)' || exit 1 -$VALGRIND ldbsearch '(cn=*test_multi)' || exit 1 -$VALGRIND ldbsearch '(cn=test_multi*)' || exit 1 -$VALGRIND ldbsearch '(cn=test*multi*test*multi)' || exit 1 -$VALGRIND ldbsearch '(cn=test*multi*test*multi*multi_*)' || exit 1 +$VALGRIND ldbadd$EXEEXT $LDBDIR/tests/test-wildcard.ldif || exit 1 +$VALGRIND ldbsearch$EXEEXT '(cn=test*multi)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(cn=*test*multi*)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(cn=*test_multi)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(cn=test_multi*)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(cn=test*multi*test*multi)' || exit 1 +$VALGRIND ldbsearch$EXEEXT '(cn=test*multi*test*multi*multi_*)' || exit 1 echo "Starting ldbtest indexed" -$VALGRIND ldbtest --num-records 100 --num-searches 500 || exit 1 +$VALGRIND ldbtest$EXEEXT --num-records 100 --num-searches 500 || exit 1 echo "Testing one level search" -count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' -s one 'objectclass=*' none |grep '^dn' | wc -l` +count=`$VALGRIND ldbsearch$EXEEXT -b 'ou=Groups,o=University of Michigan,c=TEST' -s one 'objectclass=*' none |grep '^dn' | wc -l` if [ $count != 3 ]; then echo returned $count records - expected 3 exit 1 @@ -83,8 +83,8 @@ fi 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=Hampster Ursula)' jpegPhoto | grep '^dn' | wc -l` +$VALGRIND ldbmodify$EXEEXT $LDBDIR/tests/photo.ldif || exit 1 +count=`$VALGRIND ldbsearch$EXEEXT '(cn=Hampster Ursula)' jpegPhoto | grep '^dn' | wc -l` if [ $count != 1 ]; then echo returned $count records - expected 1 exit 1 @@ -94,13 +94,13 @@ rm -f tests/tmp/samba4.png echo "*TODO* Testing UTF8 upper lower case searches !!" echo "Testing compare" -count=`$VALGRIND ldbsearch '(cn>=t)' cn | grep '^dn' | wc -l` +count=`$VALGRIND ldbsearch$EXEEXT '(cn>=t)' cn | grep '^dn' | wc -l` if [ $count != 2 ]; then echo returned $count records - expected 2 echo "this fails on openLdap ..." fi -count=`$VALGRIND ldbsearch '(cn<=t)' cn | grep '^dn' | wc -l` +count=`$VALGRIND ldbsearch$EXEEXT '(cn<=t)' cn | grep '^dn' | wc -l` if [ $count != 13 ]; then echo returned $count records - expected 13 echo "this fails on openLdap ..." @@ -111,7 +111,7 @@ checkcount() { scope=$2 basedn=$3 expression="$4" - n=`bin/ldbsearch -s "$scope" -b "$basedn" "$expression" | grep '^dn' | wc -l` + n=`$VALGRIND ldbsearch$EXEEXT -s "$scope" -b "$basedn" "$expression" | grep '^dn' | wc -l` if [ $n != $count ]; then echo "Got $n but expected $count for $expression" bin/ldbsearch "$expression" diff --git a/source4/lib/ldb/tests/test-tdb-features.sh b/source4/lib/ldb/tests/test-tdb-features.sh index fc0959c..d424836 100644 --- a/source4/lib/ldb/tests/test-tdb-features.sh +++ b/source4/lib/ldb/tests/test-tdb-features.sh @@ -7,17 +7,17 @@ mv $LDB_URL $LDB_URL.2 checkcount() { count=$1 expression="$2" - n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l` + n=`$VALGRIND ldbsearch$EXEEXT "$expression" | grep '^dn' | wc -l` if [ $n != $count ]; then echo "Got $n but expected $count for $expression" - $VALGRIND bin/ldbsearch "$expression" + $VALGRIND ldbsearch$EXEEXT "$expression" exit 1 fi echo "OK: $count $expression" } echo "Testing case sensitive search" -cat <<EOF | $VALGRIND bin/ldbadd || exit 1 +cat <<EOF | $VALGRIND ldbadd$EXEEXT || exit 1 dn: cn=t1,cn=TEST objectClass: testclass test: foo @@ -27,20 +27,20 @@ checkcount 0 '(test=FOO)' checkcount 0 '(test=FO*)' echo "Making case insensitive" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: @ATTRIBUTES changetype: add add: test test: CASE_INSENSITIVE EOF -echo $ldif | $VALGRIND bin/ldbmodify || exit 1 +echo $ldif | $VALGRIND ldbmodify$EXEEXT || exit 1 checkcount 1 '(test=foo)' checkcount 1 '(test=FOO)' checkcount 1 '(test=fo*)' echo "adding i" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: cn=t1,cn=TEST changetype: modify add: i @@ -50,7 +50,7 @@ checkcount 1 '(i=0x100)' checkcount 0 '(i=256)' echo "marking i as INTEGER" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: @ATTRIBUTES changetype: modify add: i @@ -60,7 +60,7 @@ checkcount 1 '(i=0x100)' checkcount 1 '(i=256)' echo "adding j" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: cn=t1,cn=TEST changetype: modify add: j @@ -70,7 +70,7 @@ checkcount 1 '(j=0x100)' checkcount 0 '(j=256)' echo "Adding wildcard attribute" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: @ATTRIBUTES changetype: modify add: * @@ -84,7 +84,7 @@ checkcount 0 '(objectClass=otherclass)' checkcount 1 '(objectClass=testclass)' echo "Adding index" -cat <<EOF | $VALGRIND bin/ldbadd || exit 1 +cat <<EOF | $VALGRIND ldbadd$EXEEXT || exit 1 dn: @INDEXLIST @IDXATTR: i @IDXATTR: test @@ -97,7 +97,7 @@ checkcount 1 '(test=FOO)' checkcount 1 '(test=*f*o)' echo "making test case sensitive" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: @ATTRIBUTES changetype: modify replace: test @@ -111,17 +111,17 @@ checkone() { count=$1 base="$2" expression="$3" - n=`bin/ldbsearch -s one -b "$base" "$expression" | grep '^dn' | wc -l` + n=`$VALGRIND ldbsearch$EXEEXT -s one -b "$base" "$expression" | grep '^dn' | wc -l` if [ $n != $count ]; then echo "Got $n but expected $count for $expression" - $VALGRIND bin/ldbsearch -s one -b "$base" "$expression" + $VALGRIND ldbsearch$EXEEXT -s one -b "$base" "$expression" exit 1 fi echo "OK: $count $expression" } echo "Removing wildcard attribute" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: @ATTRIBUTES changetype: modify delete: * @@ -129,7 +129,7 @@ delete: * EOF echo "Adding one level indexes" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 +cat <<EOF | $VALGRIND ldbmodify$EXEEXT || exit 1 dn: @INDEXLIST changetype: modify add: @IDXONE @@ -137,14 +137,14 @@ add: @IDXONE EOF echo "Testing one level indexed search" -cat <<EOF | $VALGRIND bin/ldbadd || exit 1 +cat <<EOF | $VALGRIND ldbadd$EXEEXT || exit 1 dn: cn=one,cn=t1,cn=TEST objectClass: oneclass cn: one test: one EOF checkone 1 "cn=t1,cn=TEST" '(test=one)' -cat <<EOF | $VALGRIND bin/ldbadd || exit 1 +cat <<EOF | $VALGRIND ldbadd$EXEEXT || exit 1 dn: cn=two,cn=t1,cn=TEST objectClass: oneclass cn: two diff --git a/source4/lib/ldb/tests/test-tdb.sh b/source4/lib/ldb/tests/test-tdb.sh index 7c4f520..1c35451 100755 --- a/source4/lib/ldb/tests/test-tdb.sh +++ b/source4/lib/ldb/tests/test-tdb.sh @@ -17,12 +17,12 @@ if [ -z "$LDBDIR" ]; then export LDBDIR fi -cat <<EOF | $VALGRIND ldbadd || exit 1 +cat <<EOF | $VALGRIND ldbadd$EXEEXT || exit 1 dn: @MODULES @LIST: rdn_name EOF -$VALGRIND ldbadd $LDBDIR/tests/init.ldif || exit 1 -- Samba Shared Repository