s3:smbd: call apply_new_nt_acl() already in mkdir_internals()
[samba4-gss.git] / testprogs / blackbox / runtime-links.sh
blob9cb49e4e645388c1b58c8657b47a747db02f1642
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: runtime-links.sh PREFIX RELEASE
6 EOF
7 exit 1
8 fi
10 PREFIX_ABS="$1"
11 RELEASE="$2"
12 shift 2
14 failed=0
16 . $(dirname $0)/subunit.sh
18 . $(dirname $0)/common_test_fns.inc
19 . $(dirname $0)/common-links.sh
22 if [ ! -x $samba_undump ] || [ ! -d $release_dir ]; then
23 subunit_start_test $RELEASE
24 subunit_skip_test $RELEASE <<EOF
25 no test provision
26 EOF
28 subunit_start_test "tombstones_expunge"
29 subunit_skip_test "tombstones_expunge" <<EOF
30 no test provision
31 EOF
33 exit 0
36 delete_member_of_deleted_group()
38 TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 'CN=User1 UT. Tester,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp'
39 if [ "$?" != "0" ]; then
40 return 1
44 delete_backlink_memberof_deleted_group()
46 TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 'CN=User UT. Tester,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp'
47 if [ "$?" != "0" ]; then
48 return 1
52 delete_dangling_backlink_memberof_group()
54 TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 'CN=dangling-back,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp'
55 if [ "$?" != "0" ]; then
56 return 1
60 remove_directory $PREFIX_ABS/${RELEASE}
62 testit $RELEASE undump || failed=$(expr $failed + 1)
63 testit "add_dangling_link" add_dangling_link || failed=$(expr $failed + 1)
64 testit "add_dangling_backlink" add_dangling_backlink || failed=$(expr $failed + 1)
65 testit "add_deleted_dangling_backlink" add_deleted_dangling_backlink || failed=$(expr $failed + 1)
66 testit "revive_links_on_deleted_group" revive_links_on_deleted_group || failed=$(expr $failed + 1)
67 testit "revive_backlink_on_deleted_group" revive_backlink_on_deleted_group || failed=$(expr $failed + 1)
68 testit "add_deleted_target_link" add_deleted_target_link || failed=$(expr $failed + 1)
69 testit "add_deleted_target_backlink" add_deleted_target_backlink || failed=$(expr $failed + 1)
70 testit "dangling_one_way_link" dangling_one_way_link || failed=$(expr $failed + 1)
71 testit "dangling_one_way_dn" dangling_one_way_dn || failed=$(expr $failed + 1)
72 testit "deleted_one_way_dn" deleted_one_way_dn || failed=$(expr $failed + 1)
73 testit "add_dangling_multi_valued" add_dangling_multi_valued || failed=$(expr $failed + 1)
75 #Now things are set up, work with the DB
76 testit "delete_member_of_deleted_group" delete_member_of_deleted_group || failed=$(expr $failed + 1)
77 testit "delete_backlink_memberof_deleted_group" delete_backlink_memberof_deleted_group || failed=$(expr $failed + 1)
78 testit "delete_dangling_backlink_memberof_group" delete_dangling_backlink_memberof_group || failed=$(expr $failed + 1)
80 remove_directory $PREFIX_ABS/${RELEASE}
82 exit $failed