3
# Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net>
5
# This program is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU General Public
7
# License as published by the Free Software Foundation; either
8
# version 2.1 of the License, or (at your option) any later version.
10
# This software is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# General Public License for more details.
15
# You should have received a copy of the GNU General Public
16
# License along with this library; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
if [ -x /usr/bin/valgrind ]; then
20
export G_SLICE=always-malloc
21
VALGRIND_CMD="valgrind -q --show-reachable=no --leak-check=full --trace-children=no --time-stamp=yes --num-callers=20 --suppressions=./ptest.supp"
28
echo Generating test outputs for these tests...
33
echo Performing the following tests...
37
do_test simple1 "Offline "
38
do_test simple2 "Start "
39
do_test simple3 "Start 2 "
40
do_test simple4 "Start Failed"
41
do_test simple6 "Stop Start "
42
do_test simple7 "Shutdown "
43
#do_test simple8 "Stonith "
44
#do_test simple9 "Lower version"
45
#do_test simple10 "Higher version"
46
do_test simple11 "Priority (ne)"
47
do_test simple12 "Priority (eq)"
48
do_test simple8 "Stickiness"
51
do_test params-0 "Params: No change"
52
do_test params-1 "Params: Changed"
53
do_test params-2 "Params: Resource definition"
54
do_test params-4 "Params: Reload"
55
do_test novell-251689 "Resource definition change + target_role=stopped"
58
do_test orphan-0 "Orphan ignore"
59
do_test orphan-1 "Orphan stop"
62
do_test target-0 "Target Role : baseline"
63
do_test target-1 "Target Role : test"
66
do_test date-1 "Dates" -d "2005-020"
67
do_test date-2 "Date Spec - Pass" -d "2005-020T12:30"
68
do_test date-3 "Date Spec - Fail" -d "2005-020T11:30"
69
do_test probe-0 "Probe (anon clone)"
70
do_test probe-1 "Pending Probe"
71
do_test standby "Standby"
72
do_test comments "Comments"
75
do_test rsc_dep1 "Must not "
76
do_test rsc_dep3 "Must "
77
do_test rsc_dep5 "Must not 3 "
78
do_test rsc_dep7 "Must 3 "
79
do_test rsc_dep10 "Must (but cant)"
80
do_test rsc_dep2 "Must (running) "
81
do_test rsc_dep8 "Must (running : alt) "
82
do_test rsc_dep4 "Must (running + move)"
83
do_test asymmetric "Asymmetric - require explicit location constraints"
86
do_test order1 "Order start 1 "
87
do_test order2 "Order start 2 "
88
do_test order3 "Order stop "
89
do_test order4 "Order (multiple) "
90
do_test order5 "Order (move) "
91
do_test order6 "Order (move w/ restart) "
92
do_test order7 "Order (manditory) "
93
do_test order-optional "Order (score=0) "
94
do_test order-required "Order (score=INFINITY) "
97
do_test coloc-loop "Colocation - loop"
98
do_test coloc-many-one "Colocation - many-to-one"
99
do_test coloc-list "Colocation - many-to-one with list"
100
do_test coloc-group "Colocation - groups"
101
do_test coloc-slave-anti "Anti-colocation with slave shouldn't prevent master colocation"
104
#do_test agent1 "version: lt (empty)"
105
#do_test agent2 "version: eq "
106
#do_test agent3 "version: gt "
109
do_test attrs1 "string: eq (and) "
110
do_test attrs2 "string: lt / gt (and)"
111
do_test attrs3 "string: ne (or) "
112
do_test attrs4 "string: exists "
113
do_test attrs5 "string: not_exists "
114
do_test attrs6 "is_dc: true "
115
do_test attrs7 "is_dc: false "
116
do_test attrs8 "score_attribute "
119
do_test mon-rsc-1 "Schedule Monitor - start"
120
do_test mon-rsc-2 "Schedule Monitor - move "
121
do_test mon-rsc-3 "Schedule Monitor - pending start "
122
do_test mon-rsc-4 "Schedule Monitor - move/pending start"
125
do_test rec-rsc-0 "Resource Recover - no start "
126
do_test rec-rsc-1 "Resource Recover - start "
127
do_test rec-rsc-2 "Resource Recover - monitor "
128
do_test rec-rsc-3 "Resource Recover - stop - ignore"
129
do_test rec-rsc-4 "Resource Recover - stop - block "
130
do_test rec-rsc-5 "Resource Recover - stop - fence "
131
do_test rec-rsc-6 "Resource Recover - multiple - restart"
132
do_test rec-rsc-7 "Resource Recover - multiple - stop "
133
do_test rec-rsc-8 "Resource Recover - multiple - block "
134
do_test rec-rsc-9 "Resource Recover - group/group"
137
do_test quorum-1 "No quorum - ignore"
138
do_test quorum-2 "No quorum - freeze"
139
do_test quorum-3 "No quorum - stop "
140
do_test quorum-4 "No quorum - start anyway"
141
do_test quorum-5 "No quorum - start anyway (group)"
142
do_test quorum-6 "No quorum - start anyway (clone)"
145
do_test rec-node-1 "Node Recover - Startup - no fence"
146
do_test rec-node-2 "Node Recover - Startup - fence "
147
do_test rec-node-3 "Node Recover - HA down - no fence"
148
do_test rec-node-4 "Node Recover - HA down - fence "
149
do_test rec-node-5 "Node Recover - CRM down - no fence"
150
do_test rec-node-6 "Node Recover - CRM down - fence "
151
do_test rec-node-7 "Node Recover - no quorum - ignore "
152
do_test rec-node-8 "Node Recover - no quorum - freeze "
153
do_test rec-node-9 "Node Recover - no quorum - stop "
154
do_test rec-node-10 "Node Recover - no quorum - stop w/fence"
155
do_test rec-node-11 "Node Recover - CRM down w/ group - fence "
156
do_test rec-node-12 "Node Recover - nothing active - fence "
157
do_test rec-node-13 "Node Recover - failed resource + shutdown - fence "
158
do_test rec-node-15 "Node Recover - unknown lrm section"
159
do_test rec-node-14 "Serialize all stonith's"
162
do_test multi1 "Multiple Active (stop/start)"
165
do_test migrate-1 "Migrate (migrate)"
166
do_test migrate-2 "Migrate (stable)"
167
do_test migrate-3 "Migrate (failed migrate_to)"
168
do_test migrate-4 "Migrate (failed migrate_from)"
169
do_test novell-252693 "Migration in a stopping stack"
170
do_test novell-252693-2 "Migration in a starting stack"
171
do_test novell-252693-3 "Non-Migration in a starting and stopping stack"
172
do_test bug-1820 "Migration in a group"
173
do_test bug-1820-1 "Non-migration in a group"
176
#do_test complex1 "Complex "
179
do_test group1 "Group "
180
do_test group2 "Group + Native "
181
do_test group3 "Group + Group "
182
do_test group4 "Group + Native (nothing)"
183
do_test group5 "Group + Native (move) "
184
do_test group6 "Group + Group (move) "
185
do_test group7 "Group colocation"
186
do_test group13 "Group colocation (cant run)"
187
do_test group8 "Group anti-colocation"
188
do_test group9 "Group recovery"
189
do_test group10 "Group partial recovery"
190
do_test group11 "Group target_role"
191
do_test group14 "Group stop (graph terminated)"
192
do_test group15 "-ve group colocation"
193
do_test bug-1573 "Partial stop of a group with two children"
194
do_test bug-1718 "Mandatory group ordering - Stop group_FUN"
197
do_test clone-anon-probe-1 "Probe the correct (anonymous) clone instance for each node"
198
do_test clone-anon-probe-2 "Avoid needless re-probing of anonymous clones"
199
do_test inc0 "Incarnation start"
200
do_test inc1 "Incarnation start order"
201
do_test inc2 "Incarnation silent restart, stop, move"
202
do_test inc3 "Inter-incarnation ordering, silent restart, stop, move"
203
do_test inc4 "Inter-incarnation ordering, silent restart, stop, move (ordered)"
204
do_test inc5 "Inter-incarnation ordering, silent restart, stop, move (restart 1)"
205
do_test inc6 "Inter-incarnation ordering, silent restart, stop, move (restart 2)"
206
do_test inc7 "Clone colocation"
207
do_test inc8 "Clone anti-colocation"
208
#do_test inc9 "Non-unique clone"
209
do_test inc10 "Non-unique clone (stop)"
210
do_test inc11 "Primitive colocation with clones"
211
do_test inc12 "Clone shutdown"
212
do_test cloned-group "Make sure only the correct number of cloned groups are started"
213
do_test clone-no-shuffle "Dont prioritize allocation of instances that must be moved"
216
do_test master-0 "Stopped -> Slave"
217
do_test master-1 "Stopped -> Promote"
218
do_test master-2 "Stopped -> Promote : notify"
219
do_test master-3 "Stopped -> Promote : master location"
220
do_test master-4 "Started -> Promote : master location"
221
do_test master-5 "Promoted -> Promoted"
222
do_test master-6 "Promoted -> Promoted (2)"
223
do_test master-7 "Promoted -> Fenced"
224
do_test master-8 "Promoted -> Fenced -> Moved"
225
do_test master-9 "Stopped + Promotable + No quorum"
226
do_test master-10 "Stopped -> Promotable : notify with monitor"
227
do_test master-11 "Stopped -> Promote : colocation"
228
do_test novell-239082 "Demote/Promote ordering"
229
do_test novell-239087 "Stable master placement"
230
do_test master-12 "Promotion based solely on rsc_location constraints"
231
do_test master-13 "Include preferences of colocated resources when placing master"
232
do_test master-demote "Ordering when actions depends on demoting a slave resource"
233
do_test master-ordering "Prevent resources from starting that need a master"
234
do_test bug-1765 "Master-Master Colocation (dont stop the slaves)"
235
do_test master-group "Promotion of cloned groups"
236
do_test bug-lf-1852 "Don't shuffle master/slave instances unnecessarily"
237
do_test master-failed-demote "Dont retry failed demote actions"
238
do_test master-failed-demote-2 "Dont retry failed demote actions (notify=false)"
239
do_test master-depend "Ensure resources that depend on the master don't get allocated until the master does"
242
do_test managed-0 "Managed (reference)"
243
do_test managed-1 "Not managed - down "
244
do_test managed-2 "Not managed - up "
247
do_test interleave-0 "Interleave (reference)"
248
do_test interleave-1 "coloc - not interleaved"
249
do_test interleave-2 "coloc - interleaved "
250
do_test interleave-3 "coloc - interleaved (2)"
251
do_test interleave-pseudo-stop "Interleaved clone during stonith"
252
do_test interleave-stop "Interleaved clone during stop"
253
do_test interleave-restart "Interleaved clone during dependancy restart"
256
do_test notify-0 "Notify reference"
257
do_test notify-1 "Notify simple"
258
do_test notify-2 "Notify simple, confirm"
259
do_test notify-3 "Notify move, confirm"
260
do_test novell-239079 "Notification priority"
261
#do_test notify-2 "Notify - 764"
264
do_test 594 "OSDL #594"
265
do_test 662 "OSDL #662"
266
do_test 696 "OSDL #696"
267
do_test 726 "OSDL #726"
268
do_test 735 "OSDL #735"
269
do_test 764 "OSDL #764"
270
do_test 797 "OSDL #797"
271
do_test 829 "OSDL #829"
272
do_test 994 "OSDL #994"
273
do_test 994-2 "OSDL #994 - with a dependant resource"
274
do_test 1360 "OSDL #1360 - Clone stickiness"
275
do_test 1484 "OSDL #1484 - on_fail=stop"
276
do_test 1494 "OSDL #1494 - Clone stability"
277
do_test unrunnable-1 "Unrunnable"
278
do_test stonith-0 "Stonith loop - 1"
279
do_test stonith-1 "Stonith loop - 2"
280
do_test stonith-2 "Stonith loop - 3"
281
do_test bug-1572-1 "Recovery of groups depending on master/slave"
282
do_test bug-1572-2 "Recovery of groups depending on master/slave when the master is never re-promoted"
283
do_test bug-1685 "Depends-on-master ordering"
284
do_test bug-1822 "Dont promote partially active groups"
285
do_test bug-pm-11 "New resource added to a m/s group"
286
do_test bug-pm-12 "Recover only the failed portion of a cloned group"
287
do_test bug-n-387749 "Don't shuffle clone instances"
288
do_test bug-n-385265 "Don't ignore the failure stickiness of group children - resource_idvscommon should stay stopped"
289
do_test bug-n-385265-2 "Ensure groups are migrated instead of remaining partially active on the current node"
290
do_test bug-lf-1920 "Correctly handle probes that find active resources"