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)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Mar 2019 02:12:21 +0000 (02:12 +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>
testprogs/blackbox/dbcheck-links.sh
testprogs/blackbox/dbcheck-oldrelease.sh

index e14b176..24724b9 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 67fd6a4..3d0ee2c 100755 (executable)
@@ -207,7 +207,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
@@ -215,7 +215,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() {
@@ -285,7 +285,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
@@ -328,7 +328,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
@@ -336,7 +336,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
 }
 
@@ -353,7 +353,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
@@ -361,7 +361,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
 }