summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2020-12-11 15:37:04 +1300
committerAndrew Bartlett <abartlet@samba.org>2021-02-03 04:19:36 +0000
commit1ec1c35a3ae422720df491f5555c9bc787c9944c (patch)
treea20a1e859d4ef91122d5912d240cceff1d2c3d45 /testprogs
parent144b32ae01fb388865737d6c92fd77fe0cecad81 (diff)
downloadsamba-1ec1c35a3ae422720df491f5555c9bc787c9944c.tar.gz
selftest: Confirm that we fix any errors on the Deleted Objects container itself
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14593 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/dbcheck-oldrelease.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/testprogs/blackbox/dbcheck-oldrelease.sh b/testprogs/blackbox/dbcheck-oldrelease.sh
index 9e9924654be..64c08c57981 100755
--- a/testprogs/blackbox/dbcheck-oldrelease.sh
+++ b/testprogs/blackbox/dbcheck-oldrelease.sh
@@ -297,6 +297,17 @@ dbcheck_objectclass() {
fi
}
+# This should 'fail', because it returns the number of wrong records, which it must if we did not skip the deleted objects
+dbcheck_deleted_objects() {
+ if [ x$RELEASE = x"alpha13" ]; then
+ basedn=$($ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb -s base -b "" defaultNamingContext| grep -i defaultNamingContext| cut -d\ -f 2)
+
+ $PYTHON $BINDIR/samba-tool dbcheck -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb "cn=deleted objects,$basedn" --scope base $@
+ else
+ return 1
+ fi
+}
+
# This should 'fail', because it returns the number of modified records
dbcheck() {
$PYTHON $BINDIR/samba-tool dbcheck --selftest-check-expired-tombstones --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
@@ -488,6 +499,7 @@ 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_deleted_objects" dbcheck_deleted_objects || 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`