FW Profile - C1 Implementation
FwTestSuite.c
Go to the documentation of this file.
1 
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include "FwSmConstants.h"
28 #include "FwPrConstants.h"
29 #include "FwRtConstants.h"
30 #include "FwSmTestCases.h"
31 #include "FwPrTestCases.h"
32 #include "FwRtTestCases.h"
33 
35 #define N_OF_SM_TESTS 67
36 
37 #define N_OF_PR_TESTS 37
38 
39 #define N_OF_RT_TESTS 13
40 
49 int main() {
50  int i;
51  FwSmTestOutcome_t smOutcome;
52  FwPrTestOutcome_t prOutcome;
53  FwRtTestOutcome_t rtOutcome;
54  char* smTestNames[N_OF_SM_TESTS];
55  char* prTestNames[N_OF_PR_TESTS];
56  char* rtTestNames[N_OF_RT_TESTS];
57  typedef FwSmTestOutcome_t (*SmTestCase_t)();
58  typedef FwPrTestOutcome_t (*PrTestCase_t)();
59  typedef FwRtTestOutcome_t (*RtTestCase_t)();
60  SmTestCase_t smTestCases[N_OF_SM_TESTS]; /* array of pointers to SM test case functions */
61  PrTestCase_t prTestCases[N_OF_PR_TESTS]; /* array of pointers to PR test case functions */
62  RtTestCase_t rtTestCases[N_OF_RT_TESTS]; /* array of pointers to RT test case functions */
63  int skipRtTest = 0;
64 
65  /* Set the names of the SM tests and the functions executing the tests */
66  smTestNames[0] = "FwSm_Start1";
67  smTestCases[0] = &FwSmTestCaseStart1;
68  smTestNames[1] = "FwSm_Start2";
69  smTestCases[1] = &FwSmTestCaseStart2;
70  smTestNames[2] = "FwSm_Start3";
71  smTestCases[2] = &FwSmTestCaseStart3;
72  smTestNames[3] = "FwSm_Stop1";
73  smTestCases[3] = &FwSmTestCaseStop1;
74  smTestNames[4] = "FwSm_Stop2";
75  smTestCases[4] = &FwSmTestCaseStop2;
76  smTestNames[5] = "FwSm_Stop3";
77  smTestCases[5] = &FwSmTestCaseStop3;
78  smTestNames[6] = "FwSm_Execute1";
79  smTestCases[6] = &FwSmTestCaseExecute1;
80  smTestNames[7] = "FwSm_Execute2";
81  smTestCases[7] = &FwSmTestCaseExecute2;
82  smTestNames[8] = "FwSm_Execute3";
83  smTestCases[8] = &FwSmTestCaseExecute3;
84  smTestNames[9] = "FwSm_SelfTrans1";
85  smTestCases[9] = &FwSmTestCaseSelfTrans1;
86  smTestNames[10] = "FwSm_Trans1";
87  smTestCases[10] = &FwSmTestCaseTrans1;
88  smTestNames[11] = "FwSm_Trans2";
89  smTestCases[11] = &FwSmTestCaseTrans2;
90  smTestNames[12] = "FwSm_Trans3";
91  smTestCases[12] = &FwSmTestCaseTrans3;
92  smTestNames[13] = "FwSm_Execute4";
93  smTestCases[13] = &FwSmTestCaseExecute4;
94  smTestNames[14] = "FwSm_Trans4";
95  smTestCases[14] = &FwSmTestCaseTrans4;
96  smTestNames[15] = "FwSm_DescStatic1";
97  smTestCases[15] = &FwSmTestCaseDescDir1;
98  smTestNames[16] = "FwSm_ConfigErr1";
99  smTestCases[16] = &FwSmTestCaseConfigErr1;
100  smTestNames[17] = "FwSm_ConfigCheck1";
101  smTestCases[17] = &FwSmTestCaseCheck1;
102  smTestNames[18] = "FwSm_ConfigCheck2";
103  smTestCases[18] = &FwSmTestCaseCheck2;
104  smTestNames[19] = "FwSm_ConfigCheck3";
105  smTestCases[19] = &FwSmTestCaseCheck3;
106  smTestNames[20] = "FwSm_ConfigCheck4";
107  smTestCases[20] = &FwSmTestCaseCheck4;
108  smTestNames[21] = "FwSm_ConfigCheck5";
109  smTestCases[21] = &FwSmTestCaseCheck5;
110  smTestNames[22] = "FwSm_ConfigCheck6";
111  smTestCases[22] = &FwSmTestCaseCheck6;
112  smTestNames[23] = "FwSm_ConfigCheck7";
113  smTestCases[23] = &FwSmTestCaseCheck7;
114  smTestNames[24] = "FwSm_ConfigCheck8";
115  smTestCases[24] = &FwSmTestCaseCheck8;
116  smTestNames[25] = "FwSm_ConfigCheck9";
117  smTestCases[25] = &FwSmTestCaseCheck9;
118  smTestNames[26] = "FwSm_ConfigCheck10";
119  smTestCases[26] = &FwSmTestCaseCheck10;
120  smTestNames[27] = "FwSm_Trans5";
121  smTestCases[27] = &FwSmTestCaseTrans5;
122  smTestNames[28] = "FwSm_DummySM1";
123  smTestCases[28] = &FwSmTestCaseDummySM1;
124  smTestNames[29] = "FwSm_DummySM9";
125  smTestCases[29] = &FwSmTestCaseDummySM9;
126  smTestNames[30] = "FwSm_ConfigCheck11";
127  smTestCases[30] = &FwSmTestCaseCheck11;
128  smTestNames[31] = "FwSm_ConfigCheck12";
129  smTestCases[31] = &FwSmTestCaseCheck12;
130  smTestNames[32] = "FwSm_Trans6";
131  smTestCases[32] = &FwSmTestCaseTrans6;
132  smTestNames[33] = "FwSm_ConfigCheck14";
133  smTestCases[33] = &FwSmTestCaseCheck14;
134  smTestNames[34] = "FwSm_ConfigCheck15";
135  smTestCases[34] = &FwSmTestCaseCheck15;
136  smTestNames[35] = "FwSm_ConfigTransErr1";
137  smTestCases[35] = &FwSmTestCaseTransErr1;
138  smTestNames[36] = "FwSm_DummySM3";
139  smTestCases[36] = &FwSmTestCaseDummySM3;
140  smTestNames[37] = "FwSm_TransErr2";
141  smTestCases[37] = &FwSmTestCaseTransErr2;
142  smTestNames[38] = "FwSm_ConfigCheck16";
143  smTestCases[38] = &FwSmTestCaseCheck16;
144  smTestNames[39] = "FwSm_DescStatic2";
145  smTestCases[39] = &FwSmTestCaseDescStatic2;
146  smTestNames[40] = "FwSm_DummySM9Static";
147  smTestCases[40] = &FwSmTestCaseDummySM9Static;
148  smTestNames[41] = "FwSm_ConfigCheck17";
149  smTestCases[41] = &FwSmTestCaseCheck17;
150  smTestNames[42] = "FwSm_ConfigCheck18";
151  smTestCases[42] = &FwSmTestCaseCheck18;
152  smTestNames[43] = "FwSm_ConfigCheck19";
153  smTestCases[43] = &FwSmTestCaseCheck19;
154  smTestNames[44] = "FwSm_ConfigCheck20";
155  smTestCases[44] = &FwSmTestCaseCheck20;
156  smTestNames[45] = "FwSm_DescStatic3";
157  smTestCases[45] = &FwSmTestCaseDescStatic3;
158  smTestNames[46] = "FwSm_Print1";
159  smTestCases[46] = &FwSmTestCasePrint1;
160  smTestNames[47] = "FwSm_Print2";
161  smTestCases[47] = &FwSmTestCasePrint2;
162  smTestNames[48] = "FwSm_Execute5";
163  smTestCases[48] = &FwSmTestCaseExecute5;
164  smTestNames[49] = "FwSm_Derived1";
165  smTestCases[49] = &FwSmTestCaseDer1;
166  smTestNames[50] = "FwSm_Derived2";
167  smTestCases[50] = &FwSmTestCaseDer2;
168  smTestNames[51] = "FwSm_DerivedConfigErr1";
169  smTestCases[51] = &FwSmTestCaseDerConfigErr1;
170  smTestNames[52] = "FwSm_DerivedEmbed1";
171  smTestCases[52] = &FwSmTestCaseDerEmbed1;
172  smTestNames[53] = "FwSm_Junction1";
173  smTestCases[53] = &FwSmTestCaseJunction1;
174  smTestNames[54] = "FwSm_Derived3";
175  smTestCases[54] = &FwSmTestCaseDer3;
176  smTestNames[55] = "FwSm_Derived4";
177  smTestCases[55] = &FwSmTestCaseDer4;
178  smTestNames[56] = "FwSm_DerivedErr1";
179  smTestCases[56] = &FwSmTestCaseDerErr1;
180  smTestNames[57] = "FwSm_Derived5";
181  smTestCases[57] = &FwSmTestCaseDer5;
182  smTestNames[58] = "FwSm_ConfigErr2";
183  smTestCases[58] = &FwSmTestCaseConfigErr2;
184  smTestNames[59] = "FwSm_DerConfig1";
185  smTestCases[59] = &FwSmTestCaseDerConfig1;
186  smTestNames[60] = "FwSm_DerConfig2";
187  smTestCases[60] = &FwSmTestCaseDerConfig2;
188  smTestNames[61] = "FwSm_ExecCnt1";
189  smTestCases[61] = &FwSmTestCaseExecCnt1;
190  smTestNames[62] = "FwSm_Derived6";
191  smTestCases[62] = &FwSmTestCaseDer6;
192  smTestNames[63] = "FwSm_Trans7";
193  smTestCases[63] = &FwSmTestCaseTrans7;
194  smTestNames[64] = "FwSm_Trans8";
195  smTestCases[64] = &FwSmTestCaseTrans8;
196  smTestNames[65] = "FwSm_Check21";
197  smTestCases[65] = &FwSmTestCaseCheck21;
198  smTestNames[66] = "FwSm_Check22";
199  smTestCases[66] = &FwSmTestCaseCheck22;
200 
201  /* Set the names of the PR tests and the functions executing the tests */
202  prTestNames[0] = "FwPr_Start1";
203  prTestCases[0] = &FwPrTestCaseStart1;
204  prTestNames[1] = "FwPr_Stop1";
205  prTestCases[1] = &FwPrTestCaseStop1;
206  prTestNames[2] = "FwPr_Execute1";
207  prTestCases[2] = &FwPrTestCaseExecute1;
208  prTestNames[3] = "FwPr_Execute2";
209  prTestCases[3] = &FwPrTestCaseExecute2;
210  prTestNames[4] = "FwPr_Execute3";
211  prTestCases[4] = &FwPrTestCaseExecute3;
212  prTestNames[5] = "FwPr_Execute4";
213  prTestCases[5] = &FwPrTestCaseExecute4;
214  prTestNames[6] = "FwPr_Execute5";
215  prTestCases[6] = &FwPrTestCaseExecute5;
216  prTestNames[7] = "FwPr_Check1";
217  prTestCases[7] = &FwPrTestCaseCheck1;
218  prTestNames[8] = "FwPr_Execute5Static";
219  prTestCases[8] = &FwPrTestCaseExecute5Static;
220  prTestNames[9] = "FwPr_Execute4Static";
221  prTestCases[9] = &FwPrTestCaseExecute4Static;
222  prTestNames[10] = "FwPr_Check2";
223  prTestCases[10] = &FwPrTestCaseCheck2;
224  prTestNames[11] = "FwPr_Execute6";
225  prTestCases[11] = &FwPrTestCaseExecute6;
226  prTestNames[12] = "FwPr_Check3";
227  prTestCases[12] = &FwPrTestCaseCheck3;
228  prTestNames[13] = "FwPr_Execute7";
229  prTestCases[13] = &FwPrTestCaseExecute7;
230  prTestNames[14] = "FwPr_Check4";
231  prTestCases[14] = &FwPrTestCaseCheck4;
232  prTestNames[15] = "FwPr_Check5";
233  prTestCases[15] = &FwPrTestCaseCheck5;
234  prTestNames[16] = "FwPr_Check6";
235  prTestCases[16] = &FwPrTestCaseCheck6;
236  prTestNames[17] = "FwPr_Check7";
237  prTestCases[17] = &FwPrTestCaseCheck7;
238  prTestNames[18] = "FwPr_Check8";
239  prTestCases[18] = &FwPrTestCaseCheck8;
240  prTestNames[19] = "FwPr_Check9";
241  prTestCases[19] = &FwPrTestCaseCheck9;
242  prTestNames[20] = "FwPr_Check10";
243  prTestCases[20] = &FwPrTestCaseCheck10;
244  prTestNames[21] = "FwPr_Check11";
245  prTestCases[21] = &FwPrTestCaseCheck11;
246  prTestNames[22] = "FwPr_Check12";
247  prTestCases[22] = &FwPrTestCaseCheck12;
248  prTestNames[23] = "FwPr_Run1";
249  prTestCases[23] = &FwPrTestCaseRun1;
250  prTestNames[24] = "FwPr_Der1";
251  prTestCases[24] = &FwPrTestCaseDer1;
252  prTestNames[25] = "FwPr_DerCheck1";
253  prTestCases[25] = &FwPrTestCaseDerCheck1;
254  prTestNames[26] = "FwPr_DerCheck2";
255  prTestCases[26] = &FwPrTestCaseDerCheck2;
256  prTestNames[27] = "FwPr_Der2";
257  prTestCases[27] = &FwPrTestCaseDer2;
258  prTestNames[28] = "FwPr_DerCheck3";
259  prTestCases[28] = &FwPrTestCaseDerCheck3;
260  prTestNames[29] = "FwPr_Execute4Dir";
261  prTestCases[29] = &FwPrTestCaseExecute4Dir;
262  prTestNames[30] = "FwPr_DerCheck4";
263  prTestCases[30] = &FwPrTestCaseDerCheck4;
264  prTestNames[31] = "FwPr_Execute8";
265  prTestCases[31] = &FwPrTestCaseExecute8;
266  prTestNames[32] = "FwPr_DerCheck5";
267  prTestCases[32] = &FwPrTestCaseDerCheck5;
268  prTestNames[33] = "FwPr_Der3";
269  prTestCases[33] = &FwPrTestCaseDer3;
270  prTestNames[34] = "FwPr_Exec9";
271  prTestCases[34] = &FwPrTestCaseExecute9;
272  prTestNames[35] = "FwPr_Check13";
273  prTestCases[35] = &FwPrTestCaseCheck13;
274  prTestNames[36] = "FwPr_Check14";
275  prTestCases[36] = &FwPrTestCaseCheck14;
276 
277  /* Set the names of the RT tests and the functions executing the tests */
278  rtTestNames[0] = "FwRt_SetAttr1";
279  rtTestCases[0] = &FwRtTestCaseSetAttr1;
280  rtTestNames[1] = "FwRt_RunDefault1";
281  rtTestCases[1] = &FwRtTestCaseRunDefault1;
282  rtTestNames[2] = "FwRt_Run1";
283  rtTestCases[2] = &FwRtTestCaseRun1;
284  rtTestNames[3] = "FwRt_Run2";
285  rtTestCases[3] = &FwRtTestCaseRun2;
286  rtTestNames[4] = "FwRt_Run3";
287  rtTestCases[4] = &FwRtTestCaseRun3;
288  rtTestNames[5] = "FwRt_StressRun1";
289  rtTestCases[5] = &FwRtTestCaseStressRun1;
290  rtTestNames[6] = "FwRt_StressRun2";
291  rtTestCases[6] = &FwRtTestCaseStressRun2;
292  rtTestNames[7] = "FwRt_StressRun3";
293  rtTestCases[7] = &FwRtTestCaseStressRun3;
294  rtTestNames[8] = "FwRt_RunNonNullAttr1";
295  rtTestCases[8] = &FwRtTestCaseRunNonNullAttr1;
296  rtTestNames[9] = "FwRt_StressRun4";
297  rtTestCases[9] = &FwRtTestCaseStressRun4;
298  rtTestNames[10] = "FwRt_StressRun5";
299  rtTestCases[10] = &FwRtTestCaseStressRun5;
300  rtTestNames[11] = "FwRt_StressRun6";
301  rtTestCases[11] = &FwRtTestCaseStressRun6;
302  rtTestNames[12] = "FwRtTestCaseSetAction1";
303  rtTestCases[12] = &FwRtTestCaseSetAction1;
304 
305  /* Run state machine test cases in sequence */
306  for (i=0; i<N_OF_SM_TESTS; i++) {
307  smOutcome = smTestCases[i]();
308  if (smOutcome == smTestCaseSuccess)
309  printf("Test case %s ran successfully ...\n", smTestNames[i]);
310  else
311  printf("Test case %s failed with failure code %i\n", smTestNames[i], smOutcome);
312  }
313 
314  /* Run procedure test cases in sequence */
315  for (i=0; i<N_OF_PR_TESTS; i++) {
316  prOutcome = prTestCases[i]();
317  if (prOutcome == prTestCaseSuccess)
318  printf("Test case %s ran successfully ...\n", prTestNames[i]);
319  else
320  printf("Test case %s failed with failure code %i\n", prTestNames[i], prOutcome);
321  }
322 
323  printf("\nThe next set of test cases cover the RT Container.\n");
324  printf("These test cases require an implementation of the POSIX library\n");
325  printf("and may fail depending on this implementation or on the \n");
326  printf("characteristics of the OS of the host platform.\n");
327  printf("Some of these tests take several seconds to complete.\n");
328  printf("The tests may be skipped by setting flag skipRtTest to 1 in the\n");
329  printf("main program of the Test Suite application.\n\n");
330 
331  /* Check whether the RT Container tests should be skipped */
332  if (skipRtTest == 1)
333  return EXIT_SUCCESS;
334 
335  /* Run RT Container test cases in sequence */
336  for (i=0; i<N_OF_RT_TESTS; i++) {
337  rtOutcome = rtTestCases[i]();
338  if (rtOutcome == rtTestCaseSuccess)
339  printf("Test case %s ran successfully ...\n", rtTestNames[i]);
340  else
341  printf("Test case %s failed with failure code %i\n", rtTestNames[i], rtOutcome);
342  }
343 
344  /* Useful code to print out the size of types used by the C1 Implementation */
345  /* printf("Size of pthread_t: %i\n",sizeof(pthread_t)); */
346  /* printf("Size of pthread_mutex_t: %i\n",sizeof(pthread_mutex_t)); */
347  /* printf("Size of pthread_cond_t: %i\n",sizeof(pthread_cond_t)); */
348  /* printf("Size of FwRtAction_t: %i\n",sizeof(FwRtAction_t)); */
349  /* printf("Size of struct FwRtDesc: %i\n",sizeof(struct FwRtDesc)); */
350 
351  return EXIT_SUCCESS;
352 }
353 
FwPrTestOutcome_t FwPrTestCaseDerCheck1()
Verify that a derived procedure is, at the time it is created, a structural clone of its base procedu...
FwPrTestOutcome_t FwPrTestCaseCheck5()
Test the ability of the functions which add a control flow to a procedure to detect and report a conf...
Declaration of test cases for the FW State Machine Module.
Declaration of the test cases for the RT Container Module.
FwPrTestOutcome_t FwPrTestCaseCheck2()
Test the ability of the FwPrCreate function to catch configuration errors.
FwSmTestOutcome_t FwSmTestCaseDummySM3()
Verify the behaviour of a degenerate state machine which consists of a single direct transition from ...
FwSmTestOutcome_t FwSmTestCaseDer4()
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5) and then verify t...
FwSmTestOutcome_t FwSmTestCaseCheck21()
Configure a state machine to have a state which is not reachable and check that FwSmCheck detects and...
FwSmTestOutcome_t FwSmTestCaseTrans1()
Test a direct transition between two simple states (states S1 and S2 of SM5).
FwRtTestOutcome_t FwRtTestCaseRun3()
Verify the logic to handle a container stop request while notifications are pending.
FwPrTestOutcome_t FwPrTestCaseCheck13()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unrea...
FwPrTestOutcome_t FwPrTestCaseDer2()
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2) and by overriding one...
FwSmTestOutcome_t FwSmTestCasePrint1()
Verify the ability of the FwSmPrintConfig function to write to a file the configuration of a state ma...
FwPrTestOutcome_t FwPrTestCaseRun1()
Verify the Run command on a procedure.
FwSmTestOutcome_t FwSmTestCaseCheck15()
Verify the ability of the state machine creation function FwSmCreate to detect illegal values of its ...
FwSmTestOutcome_t FwSmTestCaseCheck17()
Configure a state to exceed the maximum number of actions and check that an error is reported...
FwPrTestOutcome_t FwPrTestCaseExecute6()
Test a procedure which has one single action node and no guards.
FwRtTestOutcome_t FwRtTestCaseSetAction1()
Verify the action setting interface of a RT Container.
Header file to define all constants and types for the RT Container Module of the FW Profile...
FwPrTestOutcome_t FwPrTestCaseCheck6()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an uncon...
FwSmTestOutcome_t FwSmTestCaseDescStatic3()
Create state machine SM1 statically and then check that it behaves correctly.
FwSmTestOutcome_t FwSmTestCaseJunction1()
Verify the use of a choice pseudo-state acting as a "junction" to join two branches from two differen...
FwPrTestOutcome_t FwPrTestCaseExecute1()
Test the Execute command on a procedure which is stopped.
FwPrTestOutcome_t FwPrTestCaseCheck9()
Verify the ability of the FwPrCheck function to detect and report a situation where there is a contro...
FwPrTestOutcome_t FwPrTestCaseDerCheck3()
Verify the correctness of the initial state of a derived procedure.
#define N_OF_SM_TESTS
The number of state machine tests in the test suite.
Definition: FwTestSuite.c:35
FwPrTestOutcome_t FwPrTestCaseExecute2()
Test the Execute command on control flows from the initial nodes and between action nodes...
FwSmTestOutcome_t FwSmTestCaseDer5()
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine.
FwRtTestOutcome_t FwRtTestCaseRunNonNullAttr1()
Verify a nominal run of the RT Container with non-NULL values for the attributes of the POSIX objects...
FwSmTestOutcome_t FwSmTestCaseExecute2()
Test the Execute command in a configuration where the command only causes the do-action of a state wi...
Header file to define all constants and types for the procedure module of the FW Profile.
FwSmTestOutcome_t FwSmTestCaseCheck12()
Verify the ability of FwSmCheck to detect and report the configuration error due a transition having ...
FwSmTestOutcome_t FwSmTestCaseDummySM9Static()
Verify the behaviour of a degenerate state machine which has no transitions other than the transition...
FwSmTestOutcome_t FwSmTestCaseCheck20()
Configure a state machine to have too few actions and check that FwSmCheck detects and reports this s...
FwRtTestOutcome_t FwRtTestCaseStressRun3()
Verify the RT Container logic in a stress test where two different threads send random sequences of n...
#define N_OF_RT_TESTS
The number of RT Container tests in the test suite.
Definition: FwTestSuite.c:39
FwSmTestOutcome_t FwSmTestCaseDummySM9()
Verify the behaviour of a degenerate state machine which has no transitions other than the transition...
FwSmTestOutcome_t FwSmTestCaseConfigErr1()
Test an application which attempts to perform illegal configuration operations on a State Machine Des...
FwSmTestOutcome_t FwSmTestCaseCheck9()
Verify the ability of the configuration check to detect and report a configuration error in an embedd...
FwSmTestOutcome_t FwSmTestCaseTrans8()
Verify the order of evaluation of guards on transitions out of a choice pseudo-state.
Test case success.
Definition: FwRtTestCases.h:25
FwSmTestOutcome_t FwSmTestCaseCheck5()
Verify the ability of FwSmCheck to detect and report the configuration error due an out-going transit...
FwPrTestOutcome_t FwPrTestCaseCheck1()
Test the ability of the FwPrCheck function to detect configuration errors.
FwRtTestOutcome_t FwRtTestCaseRunDefault1()
Verify a nominal run of the RT Container with default configuration.
FwSmTestOutcome_t FwSmTestCaseCheck4()
Verify the ability of FwSmCheck to detect and report the configuration error due to initial pseudo-st...
FwSmTestOutcome_t FwSmTestCaseExecute4()
Test propagation of execution command to an ESM.
FwRtTestOutcome_t FwRtTestCaseStressRun5()
Verify the RT Container logic in a stress test where two threads send random sequences of notificatio...
FwSmTestOutcome_t FwSmTestCaseConfigErr2()
Configure a state machine and then try to re-configure it and check that the reconfiguration attempt ...
FwSmTestOutcome_t FwSmTestCaseExecCnt1()
Verify the functioning of the execution counters.
FwSmTestOutcome_t FwSmTestCaseDer1()
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5) and then verify t...
FwPrTestOutcome_t FwPrTestCaseDerCheck2()
Verify the ability of the functions which override an action or a guard in a derived procedure to det...
FwSmTestOutcome_t FwSmTestCaseStart2()
Test the Start command on a state machine where the initial pseudo-state is connected to a choice pse...
FwSmTestOutcome_t FwSmTestCaseTrans5()
Test a transition from a state to the final pseudo-state passing through a choice pseudo-state...
FwPrTestOutcome_t FwPrTestCaseExecute5Static()
Test the behaviour of a procedure created statically.
FwSmTestOutcome_t FwSmTestCaseDerErr1()
Instantiate a derived state machine and try to initialize it with a base state machine with the wrong...
FwSmTestOutcome_t FwSmTestCaseStart3()
Test the Start command on a simple state machine where the initial pseudo-state is directly connected...
FwPrTestOutcome_t FwPrTestCaseCheck8()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an uncon...
FwPrTestOutcome_t FwPrTestCaseStart1()
Test the Start command for the test procedure PR2.
FwSmTestOutcome_t FwSmTestCaseExecute3()
Test the Execute command in a configuration where the command triggers a transition between two prope...
FwSmTestOutcome_t FwSmTestCaseCheck10()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwSmTestOutcome_t FwSmTestCaseTrans3()
Test propagation of a transition command from an SM to its ESM in a situation where the command has n...
Header file to define all constants and types for the state machine module of the FW Profile...
FwSmTestOutcome_t FwSmTestCaseStop2()
Test the Stop command for a state machine with an embedded state machine.
FwSmTestOutcome_t FwSmTestCaseDerConfigErr1()
Verify the ability of the configuration operation on a derived state machine to detect and report err...
FwSmTestOutcome_t FwSmTestCaseTrans2()
Test a transition through a choice pseudo-state between two simple states (states S1 and S2 of SM5)...
FwSmTestOutcome_t FwSmTestCaseTransErr1()
Test a transition which goes through a choice pseudo-state without any out-going transition with a tr...
FwSmTestOutcome_t FwSmTestCaseDer6()
Create a derived state machine by extending state machine SM11 (see FwSmMakeTestSM11), and then verify the correct behaviour of the derived state machine.
FwPrTestOutcome_t FwPrTestCaseDer3()
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2) and by overriding one...
FwPrTestOutcome_t FwPrTestCaseExecute5()
Test a sequence of Execute command which triggers the execution of a linear sequence of actions nodes...
FwRtTestOutcome_t FwRtTestCaseStressRun2()
Verify the RT Container logic in a stress test with a long sequences of notifications and start/stop ...
FwSmTestOutcome_t FwSmTestCaseCheck7()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwPrTestOutcome_t FwPrTestCaseExecute4()
Test an Execute command which triggers the execution of a loop in the procedure.
FwSmTestOutcome_t FwSmTestCaseCheck2()
Verify the ability of FwSmCheck to detect and report the configuration error due to a choice pseudo-s...
FwPrTestOutcome_t FwPrTestCaseExecute8()
Verify the functionalities associated to the Procedure Execution Counter and to the Node Execution Co...
FwSmTestOutcome_t FwSmTestCaseCheck1()
Verify the ability of FwSmCheck to detect and report the configuration error due to a state in a stat...
int main()
Main program for the test suite.
Definition: FwTestSuite.c:49
FwRtTestOutcome_t FwRtTestCaseRun2()
Verify the logic to handle bursts of notifications.
FwSmTestOutcome_t
Outcome of a state machine test case.
Definition: FwSmTestCases.h:23
FwPrTestOutcome_t FwPrTestCaseCheck10()
Verify the ability of the FwPrCheck function to detect and report a situation where there is a contro...
FwSmTestOutcome_t FwSmTestCaseCheck22()
Configure a state machine to have a choice pseudo-state which is not reachable and check that FwSmChe...
FwSmTestOutcome_t FwSmTestCaseDerEmbed1()
Verify the ability of the configuration functions of a derived state machines to detect and report er...
FwSmTestOutcome_t FwSmTestCaseDerConfig1()
Create a derived state machine dynamically and then check the configuration of the newly created stat...
FwSmTestOutcome_t FwSmTestCaseStop1()
Test the Stop command on a state machine without embedded state machines.
FwRtTestOutcome_t FwRtTestCaseStressRun4()
Verify the RT Container logic in a stress test where two threads send random sequences of notificatio...
FwPrTestOutcome_t FwPrTestCaseExecute7()
Test a procedure which has one decision node directly connected to the initial node.
FwPrTestOutcome_t FwPrTestCaseStop1()
Test the Stop command for the test procedure PR2.
FwSmTestOutcome_t FwSmTestCaseTrans6()
Test a transition from one state to another state with an embedded state machine. ...
FwRtTestOutcome_t FwRtTestCaseSetAttr1()
Verify the attribute setting interface of a RT Container.
FwPrTestOutcome_t FwPrTestCaseCheck14()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unrea...
FwSmTestOutcome_t FwSmTestCaseTrans7()
Verify the order of evaluation of guards on transitions out of a proper state.
FwPrTestOutcome_t FwPrTestCaseExecute9()
Verify the order of evaluation of the control flow guards.
FwSmTestOutcome_t FwSmTestCaseSelfTrans1()
Test a self-transition on a simple state (state S2 of SM4).
FwSmTestOutcome_t FwSmTestCaseCheck6()
Verify the ability of FwSmCheck to detect and report the configuration error due an out-going transit...
FwPrTestOutcome_t FwPrTestCaseCheck4()
Test the response to a situation where all flows out of a decision node have a false guard...
FwSmTestOutcome_t FwSmTestCaseTrans4()
Test a transition command which triggers a transition in both the embedding and in the embedded state...
FwSmTestOutcome_t FwSmTestCaseDer2()
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine.
FwPrTestOutcome_t FwPrTestCaseCheck3()
Test the ability of the FwPrAddActionNode and FwPrAddDecisionNode to catch configuration errors...
FwSmTestOutcome_t FwSmTestCaseCheck19()
Configure a state machine to have too few actions and check that FwSmCheck detects and reports this s...
FwSmTestOutcome_t FwSmTestCaseDerConfig2()
Create a derived state machine statically and then check the configuration of the newly created state...
FwSmTestOutcome_t FwSmTestCaseCheck16()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwSmTestOutcome_t FwSmTestCaseCheck14()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwSmTestOutcome_t FwSmTestCaseExecute1()
Test the Execute command in a configuration where the command only causes the do-action of a simple s...
FwPrTestOutcome_t FwPrTestCaseDerCheck4()
Verify the ability of function FwPrInitDer to detect and report errors.
FwPrTestOutcome_t FwPrTestCaseExecute3()
Test an Execute command which triggers the traversal of several nodes.
FwSmTestOutcome_t FwSmTestCaseCheck3()
Verify the ability of FwSmCheck to detect and report the configuration error due to a transition in a...
#define N_OF_PR_TESTS
The number of procedure tests in the test suite.
Definition: FwTestSuite.c:37
FwSmTestOutcome_t FwSmTestCasePrint2()
Verify the ability of the FwSmPrintConfig function to write to a file the configuration of a state ma...
FwSmTestOutcome_t FwSmTestCaseStart1()
Test the Start command on a simple state machine where the initial pseudo-state is directly connected...
FwSmTestOutcome_t FwSmTestCaseTransErr2()
Test a transition which has a choice pseudo-state as both source and destination. ...
FwSmTestOutcome_t FwSmTestCaseStop3()
Test the Stop command for a state machine with an embedded state machine.
FwPrTestOutcome_t FwPrTestCaseCheck12()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an undef...
FwSmTestOutcome_t FwSmTestCaseDescStatic2()
Verify the correct behaviour of a state machine descriptor which was created statically using the ser...
Test case success.
Definition: FwPrTestCases.h:27
FwSmTestOutcome_t FwSmTestCaseDer3()
Create a derived state machine by extending state machine SM6 (see FwSmMakeTestSM6) and then verify t...
Declaration of the test cases for the FW Procedure Module.
FwSmTestOutcome_t FwSmTestCaseDescDir1()
Verify the correct behaviour of a state machine descriptor which was created by directly instantiatin...
FwPrTestOutcome_t FwPrTestCaseDer1()
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2) and then verify that ...
FwPrTestOutcome_t
Outcome of a procedure test case.
Definition: FwPrTestCases.h:23
FwPrTestOutcome_t FwPrTestCaseCheck7()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an uncon...
FwPrTestOutcome_t FwPrTestCaseCheck11()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an undef...
FwSmTestOutcome_t FwSmTestCaseCheck8()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwSmTestOutcome_t FwSmTestCaseCheck11()
Verify the ability of the state machine configuration functions to detect and report illegal configur...
FwSmTestOutcome_t FwSmTestCaseCheck18()
Configure a transitions to exceed the maximum number of actions and the maximum number of guards and ...
FwPrTestOutcome_t FwPrTestCaseExecute4Dir()
Test the behaviour of a procedure created by directly instantiating and configuring its data structur...
FwPrTestOutcome_t FwPrTestCaseDerCheck5()
Verify the correctness of the initial state of a derived procedure.
FwSmTestOutcome_t FwSmTestCaseDummySM1()
Verify the behaviour of a degenerate state machine which has no states.
FwRtTestOutcome_t
Outcome of a procedure test case.
Definition: FwRtTestCases.h:23
FwPrTestOutcome_t FwPrTestCaseExecute4Static()
Test the behaviour of a procedure created statically.
FwRtTestOutcome_t FwRtTestCaseStressRun1()
Verify the RT Container logic in a stress test with a long sequences of notifications and random outc...
Test case success.
Definition: FwSmTestCases.h:27
FwRtTestOutcome_t FwRtTestCaseStressRun6()
Verify the RT Container logic in a stress test where two threads send random sequences of notificatio...
FwRtTestOutcome_t FwRtTestCaseRun1()
Verify the logic to skip a notification in the Notification Procedure.
FwSmTestOutcome_t FwSmTestCaseExecute5()
Verify the &#39;Execute&#39; command when it triggers a transition from a state to a choice pseudo-state and ...
P&P Software GmbH, Copyright 2011, All Rights Reserved