1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
Checking FSM allocation
[0;mTest_FSM(my_id){NULL}: Allocated
[0;mTest_FSM(my_id){NULL}: Received Event EV_B
[0;mTest_FSM(my_id){NULL}: Event EV_B not permitted
[0;mTest_FSM(my_id){NULL}: Received Event EV_A
[0;mTest_FSM(my_id){NULL}: State change to ONE (no timeout)
[0;mTest_FSM(my_id){ONE}: Received Event EV_B
[0;mTest_FSM(my_id){ONE}: State change to TWO (T2342, 1s)
[0;mTest_FSM(my_id){TWO}: Timeout of T2342
[0;mTimer
[0;mTest_FSM(my_id){TWO}: Deallocated
[0;m
--- test_id_api()
Test_FSM{NULL}: Allocated
[0;m osmo_fsm_inst_name() == "Test_FSM"
osmo_fsm_inst_find_by_name("Test_FSM") == fi
osmo_fsm_inst_update_id("my_id")
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM(my_id)"
osmo_fsm_inst_find_by_name("Test_FSM(my_id)") == fi
osmo_fsm_inst_find_by_id("my_id") == fi
osmo_fsm_inst_update_id("another_id")
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM(another_id)"
osmo_fsm_inst_find_by_name("Test_FSM(another_id)") == fi
osmo_fsm_inst_find_by_id("another_id") == fi
osmo_fsm_inst_update_id(NULL)
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM"
osmo_fsm_inst_find_by_name("Test_FSM") == fi
osmo_fsm_inst_update_id(NULL)
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM"
osmo_fsm_inst_find_by_name("Test_FSM") == fi
osmo_fsm_inst_update_id("arbitrary_id")
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)"
osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi
osmo_fsm_inst_find_by_id("arbitrary_id") == fi
osmo_fsm_inst_update_id("")
Attempting to set illegal id for FSM instance of type 'Test_FSM': ""
[0;m rc == -22, ok
osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)"
osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi
osmo_fsm_inst_update_id("invalid.id")
Attempting to set illegal id for FSM instance of type 'Test_FSM': "invalid.id"
[0;m rc == -22, ok
osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)"
osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi
--- id format tests...
osmo_fsm_inst_update_id_f("format%cid", '.')
Attempting to set illegal id for FSM instance of type 'Test_FSM': "format.id"
[0;m rc == -22, ok
osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)"
osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi
osmo_fsm_inst_update_id_f("%s", "")
Attempting to set illegal id for FSM instance of type 'Test_FSM': ""
[0;m rc == -22, ok
osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)"
osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi
osmo_fsm_inst_update_id_f("format%xid%d", 0x23, 42)
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM(format23id42)"
osmo_fsm_inst_find_by_name("Test_FSM(format23id42)") == fi
osmo_fsm_inst_update_id_f(NULL, )
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM"
osmo_fsm_inst_find_by_name("Test_FSM") == fi
osmo_fsm_inst_update_id_f(NULL, )
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM"
osmo_fsm_inst_find_by_name("Test_FSM") == fi
osmo_fsm_inst_update_id_f("%s%c%s", "arbitrary", '_', "id")
rc == 0, ok
osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)"
osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi
--- test_id_api() done
Test_FSM(arbitrary_id){NULL}: Terminating (cause = OSMO_FSM_TERM_REQUEST)
[0;mTest_FSM(arbitrary_id){NULL}: Freeing instance
[0;mTest_FSM(arbitrary_id){NULL}: Deallocated
[0;m
--- test_state_chg_keep_timer()
Test_FSM{NULL}: Allocated
[0;mTest_FSM{NULL}: State change to ONE (no timeout)
[0;mTest_FSM{ONE}: State change to TWO (no timeout)
[0;mTest_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST)
[0;mTest_FSM{TWO}: Freeing instance
[0;mTest_FSM{TWO}: Deallocated
[0;mTotal time passed: 0.000000 s
Test_FSM{NULL}: Allocated
[0;mTest_FSM{NULL}: State change to ONE (T10, 10s)
[0;mTotal time passed: 2.000342 s
Test_FSM{ONE}: State change to TWO (keeping T10, 7.999s remaining)
[0;mTotal time passed: 2.000342 s
Total time passed: 9.999999 s
Total time passed: 10.000000 s
Test_FSM{TWO}: Timeout of T10
[0;mTest_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST)
[0;mTest_FSM{TWO}: Freeing instance
[0;mTest_FSM{TWO}: Deallocated
[0;m--- test_state_chg_keep_timer() done
--- test_state_chg_T()
Test_FSM{NULL}: Allocated
[0;mTest_FSM{NULL}: State change to ONE (T42, 23s)
[0;mTest_FSM{ONE}: State change to TWO (no timeout)
[0;mTest_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST)
[0;mTest_FSM{TWO}: Freeing instance
[0;mTest_FSM{TWO}: Deallocated
[0;mTest_FSM{NULL}: Allocated
[0;mTest_FSM{NULL}: State change to ONE (T42, 23s)
[0;mTest_FSM{ONE}: State change to TWO (no timeout)
[0;mTest_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST)
[0;mTest_FSM{TWO}: Freeing instance
[0;mTest_FSM{TWO}: Deallocated
[0;m--- test_state_chg_T() done
|