smbd: Remove unused smb2_deferred_open_timer
[Samba/bjacke.git] / testprogs / blackbox / dbcheck-oldrelease.sh
bloba06e025c2a7534ef9e2474a758b8f13fffb9c6b4
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: dbcheck.sh PREFIX RELEASE
6 EOF
7 exit 1;
8 fi
10 PREFIX_ABS="$1"
11 RELEASE="$2"
12 shift 2
14 . `dirname $0`/subunit.sh
16 release_dir=`dirname $0`/../../source4/selftest/provisions/$RELEASE
18 undump() {
19 if test -x $BINDIR/tdbrestore;
20 then
21 `dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE $BINDIR/tdbrestore
22 else
23 `dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE
27 reindex() {
28 $PYTHON $BINDIR/samba-tool dbcheck --reindex -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
31 # This should 'fail', because it returns the number of modified records
32 dbcheck() {
33 $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
35 # But having fixed it all up, this should pass
36 dbcheck_clean() {
37 $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
40 # This should 'fail', because it returns the number of modified records
41 dbcheck_acl_reset() {
42 $PYTHON $BINDIR/samba-tool dbcheck --reset-well-known-acls --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
44 # But having fixed it all up, this should pass
45 dbcheck_acl_reset_clean() {
46 $PYTHON $BINDIR/samba-tool dbcheck --reset-well-known-acls --cross-ncs -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
49 referenceprovision() {
50 $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp --targetdir=$PREFIX_ABS/${RELEASE}_reference --use-ntvfs --host-ip=127.0.0.1 --host-ip6=::1
53 ldapcmp() {
54 if [ x$RELEASE != x"alpha13" ]; then
55 $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --skip-missing-dn --filter=dnsRecord
59 ldapcmp_sd() {
60 if [ x$RELEASE != x"alpha13" ]; then
61 $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --sd --skip-missing-dn
65 if [ -d $release_dir ]; then
66 testit $RELEASE undump
67 testit "reindex" reindex
68 testit_expect_failure "dbcheck" dbcheck
69 testit "dbcheck_clean" dbcheck_clean
70 testit_expect_failure "dbcheck_acl_reset" dbcheck_acl_reset
71 testit "dbcheck_acl_reset_clean" dbcheck_acl_reset_clean
72 testit "referenceprovision" referenceprovision
73 testit "ldapcmp" ldapcmp
74 testit "ldapcmp_sd" ldapcmp_sd
75 else
76 subunit_start_test $RELEASE
77 subunit_skip_test $RELEASE <<EOF
78 no test provision
79 EOF
81 subunit_start_test "reindex"
82 subunit_skip_test "reindex" <<EOF
83 no test provision
84 EOF
85 subunit_start_test "dbcheck"
86 subunit_skip_test "dbcheck" <<EOF
87 no test provision
88 EOF
89 subunit_start_test "dbcheck_clean"
90 subunit_skip_test "dbcheck_clean" <<EOF
91 no test provision
92 EOF
93 subunit_start_test "dbcheck_acl_reset"
94 subunit_skip_test "dbcheck_acl_reset" <<EOF
95 no test provision
96 EOF
97 subunit_start_test "dbcheck_clean_acl_reset"
98 subunit_skip_test "dbcheck_clean_acl_reset" <<EOF
99 no test provision
101 subunit_start_test "referenceprovision"
102 subunit_skip_test "referenceprovision" <<EOF
103 no test provision
105 subunit_start_test "ldapcmp"
106 subunit_skip_test "ldapcmp" <<EOF
107 no test provision
109 subunit_start_test "ldapcmp_sd"
110 subunit_skip_test "ldapcmp_sd" <<EOF
111 no test provision
115 if [ -d $PREFIX_ABS/${RELEASE} ]; then
116 rm -fr $PREFIX_ABS/${RELEASE}
119 if [ -d $PREFIX_ABS/${RELEASE}_reference ]; then
120 rm -fr $PREFIX_ABS/${RELEASE}_reference
123 exit $failed