5 Usage: dbcheck.sh PREFIX RELEASE
14 .
`dirname $0`/subunit.sh
16 release_dir
=`dirname $0`/..
/..
/source4/selftest
/provisions
/$RELEASE
19 if [ -x "$BINDIR/ldbmodify" ]; then
20 ldbmodify
="$BINDIR/ldbmodify"
24 if [ -x "$BINDIR/ldbdel" ]; then
25 ldbdel
="$BINDIR/ldbdel"
29 if [ -x "$BINDIR/ldbsearch" ]; then
30 ldbsearch
="$BINDIR/ldbsearch"
34 if test -x $BINDIR/tdbrestore
;
36 `dirname $0`/..
/..
/source4/selftest
/provisions
/undump.sh
$release_dir $PREFIX_ABS/$RELEASE $BINDIR/tdbrestore
38 `dirname $0`/..
/..
/source4/selftest
/provisions
/undump.sh
$release_dir $PREFIX_ABS/$RELEASE
42 add_userparameters0
() {
43 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
44 $ldbmodify -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
<<EOF
45 dn: cn=localdc,cn=domain controllers,dc=release-4-1-0rc3,dc=samba,dc=corp
47 replace: userParameters
48 userParameters:: IAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAC
49 AAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUAAQABoACAAB
50 AEMAdAB4AEMAZgBnAFAAcgBlAHMAZQBuAHQANTUxZTBiYjAYAAgAAQBDAHQAeABDAGYAZw
51 BGAGwAYQBnAHMAMQAwMGUwMDAxMBYACAABAEMAdAB4AEMAYQBsAGwAYgBhAGMAawAwMDAw
52 MDAwMBIACAABAEMAdAB4AFMAaABhAGQAbwB3ADAxMDAwMDAwKAAIAAEAQwB0AHgATQBhAH
53 gAQwBvAG4AbgBlAGMAdABpAG8AbgBUAGkAbQBlADAwMDAwMDAwLgAIAAEAQwB0AHgATQBh
54 AHgARABpAHMAYwBvAG4AbgBlAGMAdABpAG8AbgBUAGkAbQBlADAwMDAwMDAwHAAIAAEAQw
55 B0AHgATQBhAHgASQBkAGwAZQBUAGkAbQBlADAwMDAwMDAwIgAIAAEAQwB0AHgASwBlAHkA
56 YgBvAGEAcgBkAEwAYQB5AG8AdQB0ADAwMDAwMDAwKgACAAEAQwB0AHgATQBpAG4ARQBuAG
57 MAcgB5AHAAdABpAG8AbgBMAGUAdgBlAGwAMDAgAAIAAQBDAHQAeABXAG8AcgBrAEQAaQBy
58 AGUAYwB0AG8AcgB5ADAwIAACAAEAQwB0AHgATgBXAEwAbwBnAG8AbgBTAGUAcgB2AGUAcg
59 AwMBgAJAABAEMAdAB4AFcARgBIAG8AbQBlAEQAaQByADVjNWM3MzYxNzQ3NTcyNmU2NTVj
60 NzAyZTYyNjk2NDZmNmUwMCIABgABAEMAdAB4AFcARgBIAG8AbQBlAEQAaQByAEQAcgBpAH
61 YAZQA1MDNhMDAgADoAAQBDAHQAeABXAEYAUAByAG8AZgBpAGwAZQBQAGEAdABoADVjNWM3
62 MzYxNzQ3NTcyNmU2NTVjNzA3MjZmNjY2OTZjNjU3NDczNjU1YzcwMmU2MjY5NjQ2ZjZlMD
63 AiAAIAAQBDAHQAeABJAG4AaQB0AGkAYQBsAFAAcgBvAGcAcgBhAG0AMDAiAAIAAQBDAHQA
64 eABDAGEAbABsAGIAYQBjAGsATgB1AG0AYgBlAHIAMDA=
69 add_userparameters1
() {
70 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
71 $ldbmodify -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
<<EOF
72 dn: cn=administrator,cn=users,dc=release-4-1-0rc3,dc=samba,dc=corp
74 replace: userParameters
75 userParameters: IAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAC
76 AAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUAAQABoACAAB
77 AEMAdAB4AEMAZgBnAFAAcgBlAHMAZQBuAHQANTUxZTBiYjAYAAgAAQB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bmodify -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
<<EOF
99 dn: cn=krbtgt,cn=users,dc=release-4-1-0rc3,dc=samba,dc=corp
101 replace: userParameters
102 userParameters:: Q3R4Q2ZnUHJlc2VudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
103 CAgUAsaCAFDdHhDZmdQcmVzZW5045S15pSx5oiw44GiIAIBQ3R4V0ZQcm9maWxlUGF0aOOAsBgCAU
104 N0eFdGSG9tZURpcuOAsCICAUN0eFdGSG9tZURpckRyaXZl44CwEggBQ3R4U2hhZG9344Sw44Cw44C
105 w44CwLggBQ3R4TWF4RGlzY29ubmVjdGlvblRpbWXjgaXjjLnjkLDjgLAoCAFDdHhNYXhDb25uZWN0
106 aW9uVGltZeOAtOOct+aIseOAsBwIAUN0eE1heElkbGVUaW1l44Gj45yy46Sw44CwIAIBQ3R4V29ya
107 0RpcmVjdG9yeeOAsBgIAUN0eENmZ0ZsYWdzMeOAsOOBpuOYsuOAuCICAUN0eEluaXRpYWxQcm9ncm
114 add_userparameters3
() {
115 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
116 $ldbmodify -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
<<EOF
117 dn: cn=guest,cn=users,dc=release-4-1-0rc3,dc=samba,dc=corp
119 replace: userParameters
120 userParameters:: QwAAAHQAAAB4AAAAQwAAAGYAAABnAAAAUAAAAHIAAABlAAAAcwAAAGUAAABuA
121 AAAdAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAA
122 AgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACA
123 AAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAUAAAAAsAAAAaAAAACAAAAAEAAABDAAAAdAAA
124 AHgAAABDAAAAZgAAAGcAAABQAAAAcgAAAGUAAABzAA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AAMgA2ADgAMAAiAAAAAgAAAAEAAABDAAAAdAAAAHgAAABJAAAAbgAAAGkAAAB0AAAAaQAAAGE
139 AAABsAAAAUAAAAHIAAABvAAAAZwAAAHIAAABhAAAAbQAAADAAMAA=
146 $PYTHON $BINDIR/samba-tool dbcheck
--reindex -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
149 do_current_version_mod
() {
150 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
151 # Confirm (in combination with the ldbsearch below) that
152 # changing the attribute with current Samba fixes it, and that
153 # a fixed attriute isn't unfixed by dbcheck.
154 tmpldif
=$release_dir/sudoers2-mod.ldif
155 $ldbmodify -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
$tmpldif
160 check_expected_before_values
() {
161 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
162 tmpldif
=$PREFIX_ABS/$RELEASE/expected-replpropertymetadata-before-dbcheck.ldif.tmp
163 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=ops_run_anything
-s one
-b OU
=SUDOers
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp \
* replpropertymetadata
--sorted --show-binary > $tmpldif
164 diff $tmpldif $release_dir/expected-replpropertymetadata-before-dbcheck.ldif
165 if [ "$?" != "0" ]; then
169 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=ops_run_anything2
-s one
-b OU
=SUDOers
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp \
* replpropertymetadata
--sorted --show-binary |
grep -v originating_change_time|
grep -v whenChanged
> $tmpldif
171 # Here we remove originating_change_time and whenChanged as
172 # these are time-dependent, caused by the ldbmodify above.
174 diff $tmpldif $release_dir/expected-replpropertymetadata-before-dbcheck2.ldif
175 if [ "$?" != "0" ]; then
179 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=ops_run_anything3
-s one
-b OU
=SUDOers
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp \
* replpropertymetadata
--sorted --show-binary > $tmpldif
180 diff $tmpldif $release_dir/expected-replpropertymetadata-before-dbcheck3.ldif
181 if [ "$?" != "0" ]; then
184 elif [ x
$RELEASE = x
"release-4-5-0-pre1" ]; then
185 tmpldif
=$PREFIX_ABS/$RELEASE/rootdse-version.initial.txt.tmp
186 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
-s base
-b '' |
grep highestCommittedUSN
> $tmpldif
187 diff $tmpldif $release_dir/rootdse-version.initial.txt
188 if [ "$?" != "0" ]; then
195 # This should 'fail', because it returns the number of modified records
196 dbcheck_objectclass
() {
197 if [ x
$RELEASE = x
"release-4-1-6-partial-object" ]; then
198 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs --fix --yes -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
--attrs=objectclass $@
204 # This should 'fail', because it returns the number of modified records
206 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs --fix --yes -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
209 check_expected_after_values
() {
210 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
211 tmpldif
=$PREFIX_ABS/$RELEASE/expected-replpropertymetadata-after-dbcheck.ldif.tmp
212 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=ops_run_anything
-s one
-b OU
=SUDOers
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp \
* replpropertymetadata
--sorted --show-binary > $tmpldif
213 diff $tmpldif $release_dir/expected-replpropertymetadata-after-dbcheck.ldif
214 if [ "$?" != "0" ]; then
217 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=ops_run_anything2
-s one
-b OU
=SUDOers
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp \
* replpropertymetadata
--sorted --show-binary |
grep -v originating_change_time|
grep -v whenChanged
> $tmpldif
218 diff $tmpldif $release_dir/expected-replpropertymetadata-after-dbcheck2.ldif
219 if [ "$?" != "0" ]; then
222 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=ops_run_anything3
-s one
-b OU
=SUDOers
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp \
* replpropertymetadata
--sorted --show-binary > $tmpldif
223 diff $tmpldif $release_dir/expected-replpropertymetadata-after-dbcheck3.ldif
224 if [ "$?" != "0" ]; then
227 # Check DomainDNS partition for replica locations
228 tmpldif
=$PREFIX_ABS/$RELEASE/expected-replica-locations-after-dbcheck.ldif.tmp
229 $ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=49a69498-9a85-48af-9be4-aa0b3e0054f9
-s one
-b CN
=Partitions
,CN
=Configuration
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp msDS-NC-Replica-Locations
> $tmpldif
230 diff $tmpldif $release_dir/expected-replica-locations-after-dbcheck.ldif
231 if [ "$?" != "0" ]; then
234 # Check ForestDNS partition for replica locations
235 $ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=7d2a15af-c0d4-487c-847e-e036292bcc65
-s one
-b CN
=Partitions
,CN
=Configuration
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp msDS-NC-Replica-Locations
> $tmpldif
236 diff $tmpldif $release_dir/expected-replica-locations-after-dbcheck2.ldif
237 if [ "$?" != "0" ]; then
240 elif [ x
$RELEASE = x
"release-4-5-0-pre1" ]; then
241 echo $RELEASE checking after values
242 tmpldif
=$PREFIX_ABS/$RELEASE/expected-links-after-dbcheck.ldif.tmp
243 $BINDIR/ldbsearch
-H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
--show-recycled --show-deleted --show-deactivated-link --reveal member memberOf lastKnownParent objectCategory lastKnownParent wellKnownObjects legacyExchangeDN sAMAccountType uSNChanged
--sorted > $tmpldif
244 diff $tmpldif $release_dir/expected-links-after-dbcheck.ldif
245 if [ "$?" != "0" ]; then
249 # If in the future dbcheck has to make a change recorded in replPropertyMetadata,
250 # this test will fail and can be removed.
251 tmpversion
=$PREFIX_ABS/$RELEASE/rootdse-version.final.txt.tmp
252 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb
-s base
-b '' |
grep highestCommittedUSN
> $tmpversion
253 diff $tmpversion $release_dir/rootdse-version.final.txt
254 if [ "$?" != "0" ]; then
261 check_forced_duplicate_values
() {
262 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
263 ldif
=$release_dir/forced-duplicate-value-for-dbcheck.ldif
264 TZ
=UTC
$ldbmodify -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb.d
/DC
%3DRELEASE-4-1-0RC3
,DC
%3DSAMBA
,DC
%3DCORP.ldb
$ldif
265 if [ "$?" != "0" ]; then
273 # This should 'fail', because it returns the number of modified records
274 dbcheck_after_dup
() {
275 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
276 $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 $@
282 check_expected_after_dup_values
() {
283 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
284 tmpldif
=$PREFIX_ABS/$RELEASE/expected-otherphone-after-dbcheck.ldif.tmp
285 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=administrator
-s base
-b cn
=administrator
,cn
=users
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp otherHomePhone
--sorted --show-binary |
grep -v \
# | sort > $tmpldif
286 diff $tmpldif $release_dir/expected-otherphone-after-dbcheck.ldif
287 if [ "$?" != "0" ]; then
294 # But having fixed it all up, this should pass
296 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
299 # This should 'fail', because it returns the number of modified records.
300 # We don't need to run this against 4.1 releases
301 dbcheck_acl_reset
() {
302 if [ x
$RELEASE = x
"release-4-0-0" -o x
$RELEASE = x
"alpha13" ]; then
303 $PYTHON $BINDIR/samba-tool dbcheck
--reset-well-known-acls --cross-ncs --fix --yes -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
308 # But having fixed it all up, this should pass.
309 # We don't need to run this against 4.1.0rc3
310 dbcheck_acl_reset_clean
() {
311 if [ x
$RELEASE != x
"release-4-1-0rc3" ]; then
312 $PYTHON $BINDIR/samba-tool dbcheck
--reset-well-known-acls --cross-ncs -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
316 # This should 'fail', because it returns the number of modified records
318 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
319 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs --fix --yes -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
324 # But having fixed it all up, this should pass
326 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
327 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
331 rm_deleted_objects
() {
332 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
333 TZ
=UTC
$ldbdel -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb.d
/DC
%3DRELEASE-4-1-0RC3
,DC
%3DSAMBA
,DC
%3DCORP.ldb
'CN=Deleted Objects,DC=RELEASE-4-1-0RC3,DC=SAMBA,DC=CORP'
334 if [ "$?" != "0" ]; then
341 # This should 'fail', because it returns the number of modified records
343 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
344 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs --fix --yes -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
349 # But having fixed it all up, this should pass
351 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
352 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb $@
356 check_expected_after_deleted_objects
() {
357 if [ x
$RELEASE = x
"release-4-1-0rc3" ]; then
358 tmpldif
=$PREFIX_ABS/$RELEASE/expected-deleted_objects-after-dbcheck.ldif.tmp
359 TZ
=UTC
$ldbsearch -H tdb
://$PREFIX_ABS/${RELEASE}/private
/sam.ldb cn
=deleted\ objects
-s base
-b cn
=deleted\ objects
,DC
=release-4-1-0rc3
,DC
=samba
,DC
=corp objectClass description isDeleted isCriticalSystemObject objectGUID showInAdvancedViewOnly systemFlags
--sorted --show-binary --show-deleted |
grep -v \
# | sort > $tmpldif
360 diff $tmpldif $release_dir/expected-deleted_objects-after-dbcheck.ldif
361 if [ "$?" != "0" ]; then
368 referenceprovision
() {
369 if [ x
$RELEASE == x
"release-4-0-0" ]; then
370 $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 --function-level=2003
375 if [ x
$RELEASE == x
"release-4-0-0" ]; then
376 $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
381 if [ x
$RELEASE == x
"release-4-0-0" ]; then
382 $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
386 if [ -d $release_dir ]; then
387 testit
$RELEASE undump
388 testit
"reindex" reindex
389 testit
"current_version_mod" do_current_version_mod
390 testit
"check_expected_before_values" check_expected_before_values
391 testit_expect_failure
"dbcheck_objectclass" dbcheck_objectclass
392 testit_expect_failure
"dbcheck" dbcheck
393 testit
"check_expected_after_values" check_expected_after_values
394 testit
"check_forced_duplicate_values" check_forced_duplicate_values
395 testit_expect_failure
"dbcheck_after_dup" dbcheck_after_dup
396 testit
"check_expected_after_dup_values" check_expected_after_dup_values
397 testit
"dbcheck_clean" dbcheck_clean
398 testit_expect_failure
"dbcheck_acl_reset" dbcheck_acl_reset
399 testit
"dbcheck_acl_reset_clean" dbcheck_acl_reset_clean
400 testit
"add_userparameters0" add_userparameters1
401 testit
"add_userparameters1" add_userparameters1
402 testit
"add_userparameters2" add_userparameters2
403 testit
"add_userparameters3" add_userparameters3
404 testit_expect_failure
"dbcheck2" dbcheck2
405 testit
"dbcheck_clean2" dbcheck_clean2
406 testit
"rm_deleted_objects" rm_deleted_objects
407 testit_expect_failure
"dbcheck3" dbcheck3
408 testit
"dbcheck_clean3" dbcheck_clean3
409 testit
"check_expected_after_deleted_objects" check_expected_after_deleted_objects
410 testit
"referenceprovision" referenceprovision
411 testit
"ldapcmp" ldapcmp
412 testit
"ldapcmp_sd" ldapcmp_sd
414 subunit_start_test
$RELEASE
415 subunit_skip_test
$RELEASE <<EOF
419 subunit_start_test
"reindex"
420 subunit_skip_test
"reindex" <<EOF
423 subunit_start_test check_expected_before_values
424 subunit_skip_test check_expected_before_values
<<EOF
427 subunit_start_test
"dbcheck"
428 subunit_skip_test
"dbcheck" <<EOF
431 subunit_start_test
"dbcheck_clean"
432 subunit_skip_test
"dbcheck_clean" <<EOF
435 subunit_start_test check_expected_after_values
436 subunit_skip_test check_expected_after_values
<<EOF
439 subunit_start_test
"dbcheck_acl_reset"
440 subunit_skip_test
"dbcheck_acl_reset" <<EOF
443 subunit_start_test
"dbcheck_clean_acl_reset"
444 subunit_skip_test
"dbcheck_clean_acl_reset" <<EOF
447 subunit_start_test add_userparameters0
448 subunit_skip_test add_userparameters0
<<EOF
452 subunit_start_test add_userparameters1
453 subunit_skip_test add_userparameters1
<<EOF
457 subunit_start_test add_userparameters2
458 subunit_skip_test add_userparameters2
<<EOF
462 subunit_start_test add_userparameters3
463 subunit_skip_test add_userparameters3
<<EOF
467 subunit_start_test check_expected_before_values
468 subunit_skip_test check_expected_before_values
<<EOF
472 subunit_start_test
"dbcheck2"
473 subunit_skip_test
"dbcheck2" <<EOF
477 subunit_start_test
"referenceprovision"
478 subunit_skip_test
"referenceprovision" <<EOF
481 subunit_start_test
"ldapcmp"
482 subunit_skip_test
"ldapcmp" <<EOF
485 subunit_start_test
"ldapcmp_sd"
486 subunit_skip_test
"ldapcmp_sd" <<EOF
491 if [ -d $PREFIX_ABS/${RELEASE} ]; then
492 rm -fr $PREFIX_ABS/${RELEASE}
495 if [ -d $PREFIX_ABS/${RELEASE}_reference
]; then
496 rm -fr $PREFIX_ABS/${RELEASE}_reference