summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2017-02-08 15:24:14 +1300
committerAndrew Bartlett <abartlet@samba.org>2017-02-13 07:33:08 +0100
commit44ee31675afd277d429cb246525741110f8fceec (patch)
treeb8cd721b92a67beafb7cd8eb8341cf995896d6ba /testprogs
parent35bfc62a31c9ad73449594ddd48f76f50e0abade (diff)
downloadsamba-44ee31675afd277d429cb246525741110f8fceec.tar.gz
dbcheck-links: Test that dbcheck against one-way links does not error
Signed-off-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12577 Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Feb 13 07:33:08 CET 2017 on sn-devel-144
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/dbcheck-links.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/testprogs/blackbox/dbcheck-links.sh b/testprogs/blackbox/dbcheck-links.sh
index 11592f0a3a4..0799a502fe5 100755
--- a/testprogs/blackbox/dbcheck-links.sh
+++ b/testprogs/blackbox/dbcheck-links.sh
@@ -157,6 +157,14 @@ check_expected_after_objects() {
fi
}
+dangling_one_way() {
+ ldif=$release_dir/dangling-one-way-link.ldif
+ TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif
+ if [ "$?" != "0" ]; then
+ return 1
+ fi
+}
+
if [ -d $release_dir ]; then
testit $RELEASE undump
testit "add_two_more_users" add_two_more_users
@@ -169,6 +177,8 @@ if [ -d $release_dir ]; then
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 "dangling_one_way" dangling_one_way
+ testit "dbcheck_clean" dbcheck_clean
else
subunit_start_test $RELEASE
subunit_skip_test $RELEASE <<EOF