blackbox/dbcheck*.sh: pass --selftest-check-expired-tombstones to dbcheck
authorStefan Metzmacher <metze@samba.org>
Tue, 12 Mar 2019 10:04:33 +0000 (11:04 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 28 Mar 2019 12:19:13 +0000 (12:19 +0000)
These tests operate on provision dumps created long ago, they still
want to run tests on deleted objects, when the next commits remove
processing expired tombstone objects in dbcheck.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 5fccc4e9044d2e57be33471f5e6b9be7cc37ac3a)

testprogs/blackbox/dbcheck-links.sh
testprogs/blackbox/dbcheck-oldrelease.sh

index 161cdd6bf5ed23a9f26890a0bcd6d0cce6aff2b5..acb800d33fdbdfefae5bdd24f7cd822f77c61a4a 100755 (executable)
@@ -42,12 +42,12 @@ dbcheck() {
 }
 
 dbcheck_dangling() {
-    dbcheck "" "1" ""
+    dbcheck "" "1" "--selftest-check-expired-tombstones"
     return $?
 }
 
 dbcheck_one_way() {
-    dbcheck "_one_way" "0" "CN=Configuration,DC=release-4-5-0-pre1,DC=samba,DC=corp"
+    dbcheck "_one_way" "0" "CN=Configuration,DC=release-4-5-0-pre1,DC=samba,DC=corp --selftest-check-expired-tombstones"
     return $?
 }
 
@@ -118,7 +118,7 @@ duplicate_member() {
 }
 
 dbcheck_duplicate_member() {
-    dbcheck "_duplicate_member" "1" ""
+    dbcheck "_duplicate_member" "1" "--selftest-check-expired-tombstones"
     return $?
 }
 
@@ -234,7 +234,7 @@ EOF
 }
 
 dbcheck_missing_link_sid_corruption() {
-    dbcheck "-missing-link-sid-corruption" "1" ""
+    dbcheck "-missing-link-sid-corruption" "1" "--selftest-check-expired-tombstones"
     return $?
 }
 
@@ -332,7 +332,7 @@ EOF
 }
 
 dbcheck_lost_deleted_user1() {
-    dbcheck "-lost-deleted-user1" "1" ""
+    dbcheck "-lost-deleted-user1" "1" "--selftest-check-expired-tombstones"
     return $?
 }
 
@@ -439,7 +439,7 @@ EOF
 }
 
 dbcheck_lost_deleted_user2() {
-    dbcheck "-lost-deleted-user2" "1" ""
+    dbcheck "-lost-deleted-user2" "1" "--selftest-check-expired-tombstones"
     return $?
 }
 
@@ -504,7 +504,7 @@ EOF
 }
 
 dbcheck_forward_link_corruption() {
-    dbcheck "-forward-link-corruption" "1" ""
+    dbcheck "-forward-link-corruption" "1" "--selftest-check-expired-tombstones"
     return $?
 }
 
@@ -565,7 +565,7 @@ EOF
 }
 
 dbcheck_oneway_link_corruption() {
-    dbcheck "-oneway-link-corruption" "0" ""
+    dbcheck "-oneway-link-corruption" "0" "--selftest-check-expired-tombstones"
     return $?
 }
 
@@ -580,7 +580,7 @@ check_expected_after_dbcheck_oneway_link_corruption() {
 
 dbcheck_dangling_multi_valued() {
 
-    $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --fix --yes
+    $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --selftest-check-expired-tombstones --fix --yes
     if [ "$?" != "1" ]; then
        return 1
     fi
index a525f547bc930f385a8cff6bb3e25622fc91a373..6e0725709f696acf3da7e061705f1917644ec02f 100755 (executable)
@@ -195,7 +195,7 @@ check_expected_before_values() {
 # This should 'fail', because it returns the number of modified records
 dbcheck_objectclass() {
     if [ x$RELEASE = x"release-4-1-6-partial-object" ]; then
-       $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --attrs=objectclass $@
+       $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --attrs=objectclass $@
     else
        return 1
     fi
@@ -203,7 +203,7 @@ dbcheck_objectclass() {
 
 # This should 'fail', because it returns the number of modified records
 dbcheck() {
-       $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
+       $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
 }
 
 check_expected_after_values() {
@@ -273,7 +273,7 @@ check_forced_duplicate_values() {
 # This should 'fail', because it returns the number of modified records
 dbcheck_after_dup() {
     if [ x$RELEASE = x"release-4-1-0rc3" ]; then
-       $PYTHON $BINDIR/samba-tool dbcheck --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=administrator,cn=users,DC=release-4-1-0rc3,DC=samba,DC=corp $@
+       $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=administrator,cn=users,DC=release-4-1-0rc3,DC=samba,DC=corp $@
     else
        return 1
     fi
@@ -316,7 +316,7 @@ dbcheck_acl_reset_clean() {
 # This should 'fail', because it returns the number of modified records
 dbcheck2() {
     if [ x$RELEASE = x"release-4-1-0rc3" ]; then
-       $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
+       $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
     else
        exit 1
     fi
@@ -324,7 +324,7 @@ dbcheck2() {
 # But having fixed it all up, this should pass
 dbcheck_clean2() {
     if [ x$RELEASE = x"release-4-1-0rc3" ]; then
-       $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
+       $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
     fi
 }
 
@@ -341,7 +341,7 @@ rm_deleted_objects() {
 # This should 'fail', because it returns the number of modified records
 dbcheck3() {
     if [ x$RELEASE = x"release-4-1-0rc3" ]; then
-       $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
+       $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
     else
        exit 1
     fi
@@ -349,7 +349,7 @@ dbcheck3() {
 # But having fixed it all up, this should pass
 dbcheck_clean3() {
     if [ x$RELEASE = x"release-4-1-0rc3" ]; then
-       $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
+       $PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
     fi
 }