1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

blackbox/dbcheck*.sh: pass --selftest-check-expired-tombstones to dbcheck

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)
This commit is contained in:
Stefan Metzmacher 2019-03-12 11:04:33 +01:00 committed by Karolin Seeger
parent 02f3d0a1a2
commit 543fc3e9c0
2 changed files with 16 additions and 16 deletions

View File

@ -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

View File

@ -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
}