[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Oct 22 17:29:02 UTC 2020


The branch, master has been updated
       via  1432d225b04 testprogs: Fix and improve upgradeprovision-oldrelease test
       via  32305d607f4 testprogs: Fix and improve dbcheck-oldrelease test
       via  28720d66df0 testprogs: Fix and improve functionalprep test
       via  d8fe4315c85 testprogs: Fix and improve dbcheck-links test
       via  a9765084f11 testprogs: Fix and improve runtime-links test
       via  e4194355f4c testprogs: Fix and improve tombstones-expunge test
       via  e58ccdaa1a1 testprogs: Fix and improve demote-saveddb test
       via  3770f28c628 testprogs: Add remove_directory to common test functions
       via  76db7961814 python: Create targetdir recursively
       via  4cd195aafef libndr: Avoid assigning duplicate versions to symbols
      from  1262b13f4db Add VFS-License-clarification.txt as discussed on the Team list.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1432d225b0426e366649cde4837eff58ee95b0c8
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 21 19:14:32 2020 +0200

    testprogs: Fix and improve upgradeprovision-oldrelease test
    
    This fixes running `make test` in a release tarball!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Oct 22 17:28:39 UTC 2020 on sn-devel-184

commit 32305d607f43a84fa862f9f97c0dc1ea51b45ab7
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 21 18:03:25 2020 +0200

    testprogs: Fix and improve dbcheck-oldrelease test
    
    This fixes running `make test` in a release tarball!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit 28720d66df017bfaadd44378dfffaaab4e30cf22
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 21 17:54:54 2020 +0200

    testprogs: Fix and improve functionalprep test
    
    This fixes running `make test` in a release tarball!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit d8fe4315c85811ef3c5a1cfa42bf416bc1c8109e
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 21 17:41:27 2020 +0200

    testprogs: Fix and improve dbcheck-links test
    
    This fixes running `make test` in a release tarball!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit a9765084f11eae991516f150d1cd1c2370854ec7
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 21 17:35:34 2020 +0200

    testprogs: Fix and improve runtime-links test
    
    This fixes running `make test` in a release tarball!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit e4194355f4c346179ceafe5086897c0c50c108d6
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 21 17:04:12 2020 +0200

    testprogs: Fix and improve tombstones-expunge test
    
    This fixes running `make test` in a release tarball!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit e58ccdaa1a1e5943aa02ecba88d1de0323777041
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Oct 20 20:47:43 2020 +0200

    testprogs: Fix and improve demote-saveddb test
    
    This fixes running `make test` in a release tarball!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit 3770f28c6289a9328b81968a4548bfaeb8bd40aa
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Oct 22 11:39:04 2020 +0200

    testprogs: Add remove_directory to common test functions
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit 76db796181419967a483bcd71fe0cca313ccaf82
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 21 07:43:08 2020 +0200

    python: Create targetdir recursively
    
    This fixes `make test` in a release tarball.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit 4cd195aafefb02b6921ea8439dd3897f8c74b012
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Oct 20 17:27:14 2020 +1100

    libndr: Avoid assigning duplicate versions to symbols
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14541
    
    Symbols _ndr_push_error and _ndr_pull_error keep getting redefined as
    they are included without wildcard in abi_match.  Apparently on linux ld
    does not complain about duplicate symbols, but on freebsd ld fails to
    link with following error:
    
      [ 918/3912] Linking bin/default/librpc/libndr.so
      ld: error: duplicate symbol '_ndr_pull_error' in version script
      ld: error: duplicate symbol '_ndr_push_error' in version script
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 librpc/wscript_build                              |   2 +-
 python/samba/netcmd/domain.py                     |   2 +-
 testprogs/blackbox/common-links.sh                |  16 +-
 testprogs/blackbox/common_test_fns.inc            |  11 +
 testprogs/blackbox/dbcheck-links.sh               | 160 +++++++-------
 testprogs/blackbox/dbcheck-oldrelease.sh          | 240 ++++++++++----------
 testprogs/blackbox/demote-saveddb.sh              |  75 ++++---
 testprogs/blackbox/functionalprep.sh              |  77 ++++---
 testprogs/blackbox/runtime-links.sh               |  65 +++---
 testprogs/blackbox/tombstones-expunge.sh          |  94 ++++----
 testprogs/blackbox/upgradeprovision-oldrelease.sh | 254 +++++++++++-----------
 11 files changed, 520 insertions(+), 476 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/wscript_build b/librpc/wscript_build
index 9da1a3c8192..398fff7167e 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -645,7 +645,7 @@ bld.SAMBA_LIBRARY('ndr',
     header_path= [('*gen_ndr*', 'gen_ndr')],
     vnum='1.0.1',
     abi_directory='ABI',
-    abi_match='!ndr_table_* ndr_* GUID_* _ndr_pull_error _ndr_push_error',
+    abi_match='!ndr_table_* ndr_* GUID_* _ndr_pull_error* _ndr_push_error*',
     )
 
 bld.SAMBA_LIBRARY('dcerpc-binding',
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 000688f4e7a..5f08ddf6007 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -445,7 +445,7 @@ class cmd_domain_provision(Command):
 
         if targetdir is not None:
             if not os.path.isdir(targetdir):
-                os.mkdir(targetdir)
+                os.makedirs(targetdir)
 
         eadb = True
 
diff --git a/testprogs/blackbox/common-links.sh b/testprogs/blackbox/common-links.sh
index ee7310b5108..363234ae11c 100644
--- a/testprogs/blackbox/common-links.sh
+++ b/testprogs/blackbox/common-links.sh
@@ -1,4 +1,4 @@
-release_dir=`dirname $0`/../../source4/selftest/provisions/$RELEASE
+release_dir=$SRCDIR_ABS/source4/selftest/provisions/$RELEASE
 
 ldbadd="ldbadd"
 if [ -x "$BINDIR/ldbadd" ]; then
@@ -25,13 +25,15 @@ if [ -x "$BINDIR/ldbrename" ]; then
     ldbrename="$BINDIR/ldbrename"
 fi
 
+samba_tdbrestore="tdbrestore"
+if [ -x "$BINDIR/tdbrestore" ]; then
+    samba_tdbrestore="$BINDIR/tdbrestore"
+fi
+
+samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
+
 undump() {
-       if test -x $BINDIR/tdbrestore;
-       then
-	`dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE $BINDIR/tdbrestore
-       else
-	`dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE
-       fi
+    $samba_undump $release_dir $PREFIX_ABS/$RELEASE $samba_tdbrestore
 }
 
 add_dangling_link() {
diff --git a/testprogs/blackbox/common_test_fns.inc b/testprogs/blackbox/common_test_fns.inc
index a5611c63fa0..7b421e9eb08 100755
--- a/testprogs/blackbox/common_test_fns.inc
+++ b/testprogs/blackbox/common_test_fns.inc
@@ -107,3 +107,14 @@ kerberos_kinit() {
 	fi
 	return $status
 }
+
+remove_directory() {
+	local xdir=${1}
+	shift
+
+	if [ "$xdir" == "/" ] || [ ! -d "$xdir" ] || [ ! $(ls -A "$xdir") ]; then
+		return
+	fi
+
+	rm -rf "$xdir"
+}
diff --git a/testprogs/blackbox/dbcheck-links.sh b/testprogs/blackbox/dbcheck-links.sh
index eb0e0b3163f..ead59d691e0 100755
--- a/testprogs/blackbox/dbcheck-links.sh
+++ b/testprogs/blackbox/dbcheck-links.sh
@@ -14,6 +14,23 @@ shift 2
 . `dirname $0`/subunit.sh
 
 . `dirname $0`/common-links.sh
+. `dirname $0`/common_test_fns.inc
+
+failed=0
+
+if [ ! -x $samba_undump ] || [ ! -d $release_dir ]; then
+    subunit_start_test $RELEASE
+    subunit_skip_test $RELEASE <<EOF
+no test provision
+EOF
+
+    subunit_start_test "tombstones_expunge"
+    subunit_skip_test "tombstones_expunge" <<EOF
+no test provision
+EOF
+
+    exit 0
+fi
 
 dbcheck() {
     tmpfile=$PREFIX_ABS/$RELEASE/expected-dbcheck-link-output${1}.txt.tmp
@@ -873,83 +890,70 @@ EOF
     fi
 }
 
-if [ -d $release_dir ]; then
-    testit $RELEASE undump
-    testit "add_two_more_users" add_two_more_users
-    testit "add_four_more_links" add_four_more_links
-    testit "remove_one_link" remove_one_link
-    testit "remove_one_user" remove_one_user
-    testit "move_one_user" move_one_user
-    testit "add_dangling_link" add_dangling_link
-    testit "add_dangling_backlink" add_dangling_backlink
-    testit "add_deleted_dangling_backlink" add_deleted_dangling_backlink
-    testit "revive_links_on_deleted_group" revive_links_on_deleted_group
-    testit "revive_backlink_on_deleted_group" revive_backlink_on_deleted_group
-    testit "add_deleted_target_link" add_deleted_target_link
-    testit "add_deleted_target_backlink" add_deleted_target_backlink
-    testit "dbcheck_dangling" dbcheck_dangling
-    testit "dbcheck_clean" dbcheck_clean
-    testit "check_expected_after_deleted_links" check_expected_after_deleted_links
-    testit "check_expected_after_links" check_expected_after_links
-    testit "check_expected_after_objects" check_expected_after_objects
-    testit "duplicate_member" duplicate_member
-    testit "dbcheck_duplicate_member" dbcheck_duplicate_member
-    testit "check_expected_after_duplicate_links" check_expected_after_duplicate_links
-    testit "duplicate_clean" dbcheck_clean
-    testit "forward_link_corruption" forward_link_corruption
-    testit "dbcheck_forward_link_corruption" dbcheck_forward_link_corruption
-    testit "check_expected_after_dbcheck_forward_link_corruption" check_expected_after_dbcheck_forward_link_corruption
-    testit "forward_link_corruption_clean" dbcheck_clean
-    testit "oneway_link_corruption" oneway_link_corruption
-    testit "dbcheck_oneway_link_corruption" dbcheck_oneway_link_corruption
-    testit "check_expected_after_dbcheck_oneway_link_corruption" check_expected_after_dbcheck_oneway_link_corruption
-    testit "oneway_link_corruption_clean" dbcheck_clean
-    testit "dangling_one_way_link" dangling_one_way_link
-    testit "dbcheck_one_way" dbcheck_one_way
-    testit "dbcheck_clean2" dbcheck_clean
-    testit "missing_link_sid_corruption" missing_link_sid_corruption
-    testit "dbcheck_missing_link_sid_corruption" dbcheck_missing_link_sid_corruption
-    testit "missing_link_sid_clean" dbcheck_clean
-    testit "add_lost_deleted_user1" add_lost_deleted_user1
-    testit "dbcheck_lost_deleted_user1" dbcheck_lost_deleted_user1
-    testit "lost_deleted_user1_clean_A" dbcheck_clean
-    testit "remove_lost_deleted_user1" remove_lost_deleted_user1
-    testit "lost_deleted_user1_clean_B" dbcheck_clean
-    testit "add_lost_deleted_user2" add_lost_deleted_user2
-    testit "dbcheck_lost_deleted_user2" dbcheck_lost_deleted_user2
-    testit "lost_deleted_user2_clean" dbcheck_clean
-    testit "add_lost_deleted_user3" add_lost_deleted_user3
-    testit "dbcheck_lost_deleted_user3" dbcheck_lost_deleted_user3
-    testit "lost_deleted_user3_clean_A" dbcheck_clean
-    testit "remove_lost_deleted_user3" remove_lost_deleted_user3
-    testit "lost_deleted_user3_clean_B" dbcheck_clean
-    testit "dangling_one_way_dn" dangling_one_way_dn
-    testit "deleted_one_way_dn" deleted_one_way_dn
-    testit "dbcheck_clean3" dbcheck_clean
-    testit "add_dangling_multi_valued" add_dangling_multi_valued
-    testit "dbcheck_dangling_multi_valued" dbcheck_dangling_multi_valued
-    testit "dangling_multi_valued_check_missing" dangling_multi_valued_check_missing
-    testit "dangling_multi_valued_check_equal_or_too_many" dangling_multi_valued_check_equal_or_too_many
-    # Currently this cannot pass
-    testit "dbcheck_dangling_multi_valued_clean" dbcheck_clean
-    testit "dangling_link_does_not_prevent_delete" dangling_link_does_not_prevent_delete
-    testit "dangling_link_to_unknown_does_not_prevent_delete" dangling_link_to_unknown_does_not_prevent_delete
-    testit "dangling_link_to_known_and_unknown_does_not_prevent_delete" dangling_link_to_known_and_unknown_does_not_prevent_delete
-
-else
-    subunit_start_test $RELEASE
-    subunit_skip_test $RELEASE <<EOF
-no test provision
-EOF
-
-    subunit_start_test "tombstones_expunge"
-    subunit_skip_test "tombstones_expunge" <<EOF
-no test provision
-EOF
-fi
-
-if [ -d $PREFIX_ABS/${RELEASE} ]; then
-    rm -fr $PREFIX_ABS/${RELEASE}
-fi
+remove_directory $PREFIX_ABS/${RELEASE}
+
+testit $RELEASE undump || failed=`expr $failed + 1`
+testit "add_two_more_users" add_two_more_users || failed=`expr $failed + 1`
+testit "add_four_more_links" add_four_more_links || failed=`expr $failed + 1`
+testit "remove_one_link" remove_one_link || failed=`expr $failed + 1`
+testit "remove_one_user" remove_one_user || failed=`expr $failed + 1`
+testit "move_one_user" move_one_user || failed=`expr $failed + 1`
+testit "add_dangling_link" add_dangling_link || failed=`expr $failed + 1`
+testit "add_dangling_backlink" add_dangling_backlink || failed=`expr $failed + 1`
+testit "add_deleted_dangling_backlink" add_deleted_dangling_backlink || failed=`expr $failed + 1`
+testit "revive_links_on_deleted_group" revive_links_on_deleted_group || failed=`expr $failed + 1`
+testit "revive_backlink_on_deleted_group" revive_backlink_on_deleted_group || failed=`expr $failed + 1`
+testit "add_deleted_target_link" add_deleted_target_link || failed=`expr $failed + 1`
+testit "add_deleted_target_backlink" add_deleted_target_backlink || failed=`expr $failed + 1`
+testit "dbcheck_dangling" dbcheck_dangling || failed=`expr $failed + 1`
+testit "dbcheck_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit "check_expected_after_deleted_links" check_expected_after_deleted_links || failed=`expr $failed + 1`
+testit "check_expected_after_links" check_expected_after_links || failed=`expr $failed + 1`
+testit "check_expected_after_objects" check_expected_after_objects || failed=`expr $failed + 1`
+testit "duplicate_member" duplicate_member || failed=`expr $failed + 1`
+testit "dbcheck_duplicate_member" dbcheck_duplicate_member || failed=`expr $failed + 1`
+testit "check_expected_after_duplicate_links" check_expected_after_duplicate_links || failed=`expr $failed + 1`
+testit "duplicate_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit "forward_link_corruption" forward_link_corruption || failed=`expr $failed + 1`
+testit "dbcheck_forward_link_corruption" dbcheck_forward_link_corruption || failed=`expr $failed + 1`
+testit "check_expected_after_dbcheck_forward_link_corruption" check_expected_after_dbcheck_forward_link_corruption || failed=`expr $failed + 1`
+testit "forward_link_corruption_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit "oneway_link_corruption" oneway_link_corruption || failed=`expr $failed + 1`
+testit "dbcheck_oneway_link_corruption" dbcheck_oneway_link_corruption || failed=`expr $failed + 1`
+testit "check_expected_after_dbcheck_oneway_link_corruption" check_expected_after_dbcheck_oneway_link_corruption || failed=`expr $failed + 1`
+testit "oneway_link_corruption_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit "dangling_one_way_link" dangling_one_way_link || failed=`expr $failed + 1`
+testit "dbcheck_one_way" dbcheck_one_way || failed=`expr $failed + 1`
+testit "dbcheck_clean2" dbcheck_clean || failed=`expr $failed + 1`
+testit "missing_link_sid_corruption" missing_link_sid_corruption || failed=`expr $failed + 1`
+testit "dbcheck_missing_link_sid_corruption" dbcheck_missing_link_sid_corruption || failed=`expr $failed + 1`
+testit "missing_link_sid_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit "add_lost_deleted_user1" add_lost_deleted_user1 || failed=`expr $failed + 1`
+testit "dbcheck_lost_deleted_user1" dbcheck_lost_deleted_user1 || failed=`expr $failed + 1`
+testit "lost_deleted_user1_clean_A" dbcheck_clean || failed=`expr $failed + 1`
+testit "remove_lost_deleted_user1" remove_lost_deleted_user1 || failed=`expr $failed + 1`
+testit "lost_deleted_user1_clean_B" dbcheck_clean || failed=`expr $failed + 1`
+testit "add_lost_deleted_user2" add_lost_deleted_user2 || failed=`expr $failed + 1`
+testit "dbcheck_lost_deleted_user2" dbcheck_lost_deleted_user2 || failed=`expr $failed + 1`
+testit "lost_deleted_user2_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit "add_lost_deleted_user3" add_lost_deleted_user3 || failed=`expr $failed + 1`
+testit "dbcheck_lost_deleted_user3" dbcheck_lost_deleted_user3 || failed=`expr $failed + 1`
+testit "lost_deleted_user3_clean_A" dbcheck_clean || failed=`expr $failed + 1`
+testit "remove_lost_deleted_user3" remove_lost_deleted_user3 || failed=`expr $failed + 1`
+testit "lost_deleted_user3_clean_B" dbcheck_clean || failed=`expr $failed + 1`
+testit "dangling_one_way_dn" dangling_one_way_dn || failed=`expr $failed + 1`
+testit "deleted_one_way_dn" deleted_one_way_dn || failed=`expr $failed + 1`
+testit "dbcheck_clean3" dbcheck_clean || failed=`expr $failed + 1`
+testit "add_dangling_multi_valued" add_dangling_multi_valued || failed=`expr $failed + 1`
+testit "dbcheck_dangling_multi_valued" dbcheck_dangling_multi_valued || failed=`expr $failed + 1`
+testit "dangling_multi_valued_check_missing" dangling_multi_valued_check_missing || failed=`expr $failed + 1`
+testit "dangling_multi_valued_check_equal_or_too_many" dangling_multi_valued_check_equal_or_too_many || failed=`expr $failed + 1`
+# Currently this cannot pass
+testit "dbcheck_dangling_multi_valued_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit "dangling_link_does_not_prevent_delete" dangling_link_does_not_prevent_delete || failed=`expr $failed + 1`
+testit "dangling_link_to_unknown_does_not_prevent_delete" dangling_link_to_unknown_does_not_prevent_delete || failed=`expr $failed + 1`
+testit "dangling_link_to_known_and_unknown_does_not_prevent_delete" dangling_link_to_known_and_unknown_does_not_prevent_delete || failed=`expr $failed + 1`
+
+remove_directory $PREFIX_ABS/${RELEASE}
 
 exit $failed
diff --git a/testprogs/blackbox/dbcheck-oldrelease.sh b/testprogs/blackbox/dbcheck-oldrelease.sh
index 41c55178d4e..9e9924654be 100755
--- a/testprogs/blackbox/dbcheck-oldrelease.sh
+++ b/testprogs/blackbox/dbcheck-oldrelease.sh
@@ -11,7 +11,10 @@ PREFIX_ABS="$1"
 RELEASE="$2"
 shift 2
 
+failed=0
+
 . `dirname $0`/subunit.sh
+. `dirname $0`/common_test_fns.inc
 
 release_dir=`dirname $0`/../../source4/selftest/provisions/$RELEASE
 
@@ -30,13 +33,94 @@ if [ -x "$BINDIR/ldbsearch" ]; then
     ldbsearch="$BINDIR/ldbsearch"
 fi
 
+samba_tdbrestore="tdbrestore"
+if [ -x "$BINDIR/tdbrestore" ]; then
+    samba_tdbrestore="$BINDIR/tdbrestore"
+fi
+
+samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
+if [ ! -x $samba_undump ] || [ ! -d $release_dir ]; then
+    subunit_start_test $RELEASE
+    subunit_skip_test $RELEASE <<EOF
+no test provision
+EOF
+
+    subunit_start_test "reindex"
+    subunit_skip_test "reindex" <<EOF
+no test provision
+EOF
+    subunit_start_test check_expected_before_values
+    subunit_skip_test check_expected_before_values<<EOF
+no test provision
+EOF
+    subunit_start_test "dbcheck"
+    subunit_skip_test "dbcheck" <<EOF
+no test provision
+EOF
+    subunit_start_test "dbcheck_clean"
+    subunit_skip_test "dbcheck_clean" <<EOF
+no test provision
+EOF
+    subunit_start_test check_expected_after_values
+    subunit_skip_test check_expected_after_values<<EOF
+no test provision
+EOF
+    subunit_start_test "dbcheck_acl_reset"
+    subunit_skip_test "dbcheck_acl_reset" <<EOF
+no test provision
+EOF
+    subunit_start_test "dbcheck_clean_acl_reset"
+    subunit_skip_test "dbcheck_clean_acl_reset" <<EOF
+no test provision
+EOF
+    subunit_start_test add_userparameters0
+    subunit_skip_test add_userparameters0<<EOF
+no test provision
+EOF
+
+    subunit_start_test add_userparameters1
+    subunit_skip_test add_userparameters1<<EOF
+no test provision
+EOF
+
+    subunit_start_test add_userparameters2
+    subunit_skip_test add_userparameters2<<EOF
+no test provision
+EOF
+
+    subunit_start_test add_userparameters3
+    subunit_skip_test add_userparameters3<<EOF
+no test provision
+EOF
+
+    subunit_start_test check_expected_before_values
+    subunit_skip_test check_expected_before_values<<EOF
+no test provision
+EOF
+
+    subunit_start_test "dbcheck2"
+    subunit_skip_test "dbcheck2" <<EOF
+no test provision
+EOF
+
+    subunit_start_test "referenceprovision"
+    subunit_skip_test "referenceprovision" <<EOF
+no test provision
+EOF
+    subunit_start_test "ldapcmp"
+    subunit_skip_test "ldapcmp" <<EOF
+no test provision
+EOF
+    subunit_start_test "ldapcmp_sd"
+    subunit_skip_test "ldapcmp_sd" <<EOF
+no test provision
+EOF
+
+    exit 0
+fi
+
 undump() {
-       if test -x $BINDIR/tdbrestore;
-       then
-	`dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE $BINDIR/tdbrestore
-       else
-	`dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE
-       fi
+    $samba_undump $release_dir $PREFIX_ABS/$RELEASE $samba_tdbrestore
 }
 
 add_userparameters0() {
@@ -398,121 +482,43 @@ ldapcmp_sd() {
     fi
 }
 
-if [ -d $release_dir ]; then
-    testit $RELEASE undump
-    testit "reindex" reindex
-    testit "current_version_mod" do_current_version_mod
-    testit "check_expected_before_values" check_expected_before_values
-    testit_expect_failure "dbcheck_objectclass" dbcheck_objectclass
-    testit_expect_failure "dbcheck" dbcheck
-    testit "check_expected_after_values" check_expected_after_values
-    testit "check_forced_duplicate_values" check_forced_duplicate_values
-    testit_expect_failure "dbcheck_after_dup" dbcheck_after_dup
-    testit "check_expected_after_dup_values" check_expected_after_dup_values
-    testit "dbcheck_clean" dbcheck_clean
-    testit_expect_failure "dbcheck_acl_reset" dbcheck_acl_reset
-    testit "dbcheck_acl_reset_clean" dbcheck_acl_reset_clean
-    testit "add_userparameters0" add_userparameters1
-    testit "add_userparameters1" add_userparameters1
-    testit "add_userparameters2" add_userparameters2
-    testit "add_userparameters3" add_userparameters3
-    testit_expect_failure "dbcheck2" dbcheck2
-    testit "dbcheck_clean2" dbcheck_clean2
-    testit "check_expected_userparameters" check_expected_userparameters
-    testit "rm_deleted_objects" rm_deleted_objects
-    # We must re-index again because rm_deleted_objects went behind
-    # the back of the main sam.ldb.
-    testit "reindex2" reindex
-    testit_expect_failure "dbcheck3" dbcheck3
-    testit "dbcheck_clean3" dbcheck_clean3
-    testit "check_expected_after_deleted_objects" check_expected_after_deleted_objects
-    testit "referenceprovision" referenceprovision
-    testit "ldapcmp" ldapcmp
-    testit "ldapcmp_sd" ldapcmp_sd
-else
-    subunit_start_test $RELEASE
-    subunit_skip_test $RELEASE <<EOF
-no test provision
-EOF
-
-    subunit_start_test "reindex"
-    subunit_skip_test "reindex" <<EOF
-no test provision
-EOF
-    subunit_start_test check_expected_before_values
-    subunit_skip_test check_expected_before_values<<EOF
-no test provision
-EOF
-    subunit_start_test "dbcheck"
-    subunit_skip_test "dbcheck" <<EOF
-no test provision
-EOF
-    subunit_start_test "dbcheck_clean"
-    subunit_skip_test "dbcheck_clean" <<EOF
-no test provision
-EOF
-    subunit_start_test check_expected_after_values
-    subunit_skip_test check_expected_after_values<<EOF
-no test provision
-EOF
-    subunit_start_test "dbcheck_acl_reset"
-    subunit_skip_test "dbcheck_acl_reset" <<EOF
-no test provision
-EOF
-    subunit_start_test "dbcheck_clean_acl_reset"
-    subunit_skip_test "dbcheck_clean_acl_reset" <<EOF
-no test provision
-EOF
-    subunit_start_test add_userparameters0
-    subunit_skip_test add_userparameters0<<EOF
-no test provision
-EOF
-
-    subunit_start_test add_userparameters1
-    subunit_skip_test add_userparameters1<<EOF
-no test provision
-EOF
-
-    subunit_start_test add_userparameters2
-    subunit_skip_test add_userparameters2<<EOF
-no test provision
-EOF
-
-    subunit_start_test add_userparameters3
-    subunit_skip_test add_userparameters3<<EOF
-no test provision
-EOF
-
-    subunit_start_test check_expected_before_values
-    subunit_skip_test check_expected_before_values<<EOF
-no test provision
-EOF
-
-    subunit_start_test "dbcheck2"
-    subunit_skip_test "dbcheck2" <<EOF
-no test provision
-EOF
-
-    subunit_start_test "referenceprovision"
-    subunit_skip_test "referenceprovision" <<EOF
-no test provision
-EOF
-    subunit_start_test "ldapcmp"
-    subunit_skip_test "ldapcmp" <<EOF
-no test provision
-EOF
-    subunit_start_test "ldapcmp_sd"
-    subunit_skip_test "ldapcmp_sd" <<EOF
-no test provision
-EOF
-fi
+remove_directory $PREFIX_ABS/${RELEASE}_reference
+
+testit $RELEASE undump || failed=`expr $failed + 1`
+testit "reindex" reindex || failed=`expr $failed + 1`
+testit "current_version_mod" do_current_version_mod || failed=`expr $failed + 1`
+testit "check_expected_before_values" check_expected_before_values || failed=`expr $failed + 1`
+testit_expect_failure "dbcheck_objectclass" dbcheck_objectclass || failed=`expr $failed + 1`
+testit_expect_failure "dbcheck" dbcheck || failed=`expr $failed + 1`
+testit "check_expected_after_values" check_expected_after_values || failed=`expr $failed + 1`
+testit "check_forced_duplicate_values" check_forced_duplicate_values || failed=`expr $failed + 1`
+testit_expect_failure "dbcheck_after_dup" dbcheck_after_dup || failed=`expr $failed + 1`
+testit "check_expected_after_dup_values" check_expected_after_dup_values || failed=`expr $failed + 1`
+testit "dbcheck_clean" dbcheck_clean || failed=`expr $failed + 1`
+testit_expect_failure "dbcheck_acl_reset" dbcheck_acl_reset || failed=`expr $failed + 1`
+testit "dbcheck_acl_reset_clean" dbcheck_acl_reset_clean || failed=`expr $failed + 1`
+testit "add_userparameters0" add_userparameters1 || failed=`expr $failed + 1`
+testit "add_userparameters1" add_userparameters1 || failed=`expr $failed + 1`
+testit "add_userparameters2" add_userparameters2 || failed=`expr $failed + 1`


-- 
Samba Shared Repository



More information about the samba-cvs mailing list