Harald Welte | 136e737 | 2016-05-29 10:53:17 +0900 | [diff] [blame] | 1 | Checking FSM allocation |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 2 | Test_FSM(my_id){NULL}: Allocated |
| 3 | Test_FSM(my_id){NULL}: Received Event EV_B |
| 4 | Test_FSM(my_id){NULL}: Event EV_B not permitted |
| 5 | Test_FSM(my_id){NULL}: Received Event EV_A |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 6 | Test_FSM(my_id){NULL}: test_fsm_onleave() next_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 7 | Test_FSM(my_id){NULL}: State change to ONE (no timeout) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 8 | Test_FSM(my_id){ONE}: test_fsm_onenter() prev_state=NULL |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 9 | Test_FSM(my_id){ONE}: Received Event EV_B |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 10 | Test_FSM(my_id){ONE}: test_fsm_onleave() next_state=TWO |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 11 | Test_FSM(my_id){ONE}: State change to TWO (T2342, 1s) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 12 | Test_FSM(my_id){TWO}: test_fsm_onenter() prev_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 13 | Test_FSM(my_id){TWO}: Timeout of T2342 |
| 14 | Timer |
| 15 | Test_FSM(my_id){TWO}: Deallocated |
| 16 | |
Neels Hofmeyr | 975ee6b | 2018-04-09 00:42:12 +0200 | [diff] [blame] | 17 | --- test_id_api() |
| 18 | Test_FSM{NULL}: Allocated |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 19 | osmo_fsm_inst_name() == "Test_FSM" |
Neels Hofmeyr | 71f76a1 | 2018-03-31 16:30:25 +0200 | [diff] [blame] | 20 | osmo_fsm_inst_find_by_name("Test_FSM") == fi |
Neels Hofmeyr | 975ee6b | 2018-04-09 00:42:12 +0200 | [diff] [blame] | 21 | osmo_fsm_inst_update_id("my_id") |
| 22 | rc == 0, ok |
| 23 | osmo_fsm_inst_name() == "Test_FSM(my_id)" |
| 24 | osmo_fsm_inst_find_by_name("Test_FSM(my_id)") == fi |
| 25 | osmo_fsm_inst_find_by_id("my_id") == fi |
| 26 | osmo_fsm_inst_update_id("another_id") |
| 27 | rc == 0, ok |
| 28 | osmo_fsm_inst_name() == "Test_FSM(another_id)" |
| 29 | osmo_fsm_inst_find_by_name("Test_FSM(another_id)") == fi |
| 30 | osmo_fsm_inst_find_by_id("another_id") == fi |
| 31 | osmo_fsm_inst_update_id(NULL) |
| 32 | rc == 0, ok |
| 33 | osmo_fsm_inst_name() == "Test_FSM" |
| 34 | osmo_fsm_inst_find_by_name("Test_FSM") == fi |
| 35 | osmo_fsm_inst_update_id(NULL) |
| 36 | rc == 0, ok |
| 37 | osmo_fsm_inst_name() == "Test_FSM" |
| 38 | osmo_fsm_inst_find_by_name("Test_FSM") == fi |
| 39 | osmo_fsm_inst_update_id("arbitrary_id") |
| 40 | rc == 0, ok |
| 41 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 42 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
| 43 | osmo_fsm_inst_find_by_id("arbitrary_id") == fi |
| 44 | osmo_fsm_inst_update_id("") |
Neels Hofmeyr | 6e8c088 | 2018-04-09 02:28:34 +0200 | [diff] [blame] | 45 | Attempting to set illegal id for FSM instance of type 'Test_FSM': "" |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 46 | rc == -22, ok |
Neels Hofmeyr | 975ee6b | 2018-04-09 00:42:12 +0200 | [diff] [blame] | 47 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 48 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
| 49 | osmo_fsm_inst_update_id("invalid.id") |
Neels Hofmeyr | 6e8c088 | 2018-04-09 02:28:34 +0200 | [diff] [blame] | 50 | Attempting to set illegal id for FSM instance of type 'Test_FSM': "invalid.id" |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 51 | rc == -22, ok |
Neels Hofmeyr | 975ee6b | 2018-04-09 00:42:12 +0200 | [diff] [blame] | 52 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 53 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
Neels Hofmeyr | a64c45a | 2018-03-31 16:34:49 +0200 | [diff] [blame] | 54 | --- id format tests... |
| 55 | osmo_fsm_inst_update_id_f("format%cid", '.') |
| 56 | Attempting to set illegal id for FSM instance of type 'Test_FSM': "format.id" |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 57 | rc == -22, ok |
Neels Hofmeyr | a64c45a | 2018-03-31 16:34:49 +0200 | [diff] [blame] | 58 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 59 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
| 60 | osmo_fsm_inst_update_id_f("%s", "") |
| 61 | Attempting to set illegal id for FSM instance of type 'Test_FSM': "" |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 62 | rc == -22, ok |
Neels Hofmeyr | a64c45a | 2018-03-31 16:34:49 +0200 | [diff] [blame] | 63 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 64 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
| 65 | osmo_fsm_inst_update_id_f("format%xid%d", 0x23, 42) |
| 66 | rc == 0, ok |
| 67 | osmo_fsm_inst_name() == "Test_FSM(format23id42)" |
| 68 | osmo_fsm_inst_find_by_name("Test_FSM(format23id42)") == fi |
| 69 | osmo_fsm_inst_update_id_f(NULL, ) |
| 70 | rc == 0, ok |
| 71 | osmo_fsm_inst_name() == "Test_FSM" |
| 72 | osmo_fsm_inst_find_by_name("Test_FSM") == fi |
| 73 | osmo_fsm_inst_update_id_f(NULL, ) |
| 74 | rc == 0, ok |
| 75 | osmo_fsm_inst_name() == "Test_FSM" |
| 76 | osmo_fsm_inst_find_by_name("Test_FSM") == fi |
| 77 | osmo_fsm_inst_update_id_f("%s%c%s", "arbitrary", '_', "id") |
| 78 | rc == 0, ok |
| 79 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 80 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
Neels Hofmeyr | 975ee6b | 2018-04-09 00:42:12 +0200 | [diff] [blame] | 81 | |
| 82 | --- test_id_api() done |
| 83 | |
| 84 | Test_FSM(arbitrary_id){NULL}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 85 | Test_FSM(arbitrary_id){NULL}: Freeing instance |
| 86 | Test_FSM(arbitrary_id){NULL}: Deallocated |
| 87 | |
Neels Hofmeyr | 407df02 | 2018-05-25 18:20:06 +0200 | [diff] [blame] | 88 | --- test_state_chg_keep_timer() |
| 89 | Test_FSM{NULL}: Allocated |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 90 | Test_FSM{NULL}: test_fsm_onleave() next_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 91 | Test_FSM{NULL}: State change to ONE (no timeout) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 92 | Test_FSM{ONE}: test_fsm_onenter() prev_state=NULL |
| 93 | Test_FSM{ONE}: test_fsm_onleave() next_state=TWO |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 94 | Test_FSM{ONE}: State change to TWO (no timeout) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 95 | Test_FSM{TWO}: test_fsm_onenter() prev_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 96 | Test_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
| 97 | Test_FSM{TWO}: Freeing instance |
| 98 | Test_FSM{TWO}: Deallocated |
| 99 | Total time passed: 0.000000 s |
Neels Hofmeyr | 407df02 | 2018-05-25 18:20:06 +0200 | [diff] [blame] | 100 | Test_FSM{NULL}: Allocated |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 101 | Test_FSM{NULL}: test_fsm_onleave() next_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 102 | Test_FSM{NULL}: State change to ONE (T10, 10s) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 103 | Test_FSM{ONE}: test_fsm_onenter() prev_state=NULL |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 104 | Total time passed: 2.000342 s |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 105 | Test_FSM{ONE}: test_fsm_onleave() next_state=TWO |
Neels Hofmeyr | 050f2d3 | 2018-05-31 15:30:15 +0200 | [diff] [blame] | 106 | Test_FSM{ONE}: State change to TWO (keeping T10, 7.999s remaining) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 107 | Test_FSM{TWO}: test_fsm_onenter() prev_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 108 | Total time passed: 2.000342 s |
Neels Hofmeyr | 407df02 | 2018-05-25 18:20:06 +0200 | [diff] [blame] | 109 | Total time passed: 9.999999 s |
| 110 | Total time passed: 10.000000 s |
| 111 | Test_FSM{TWO}: Timeout of T10 |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 112 | Test_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
| 113 | Test_FSM{TWO}: Freeing instance |
| 114 | Test_FSM{TWO}: Deallocated |
| 115 | --- test_state_chg_keep_timer() done |
Neels Hofmeyr | bd5a1dc | 2019-01-28 15:38:09 +0100 | [diff] [blame] | 116 | |
| 117 | --- test_state_chg_T() |
| 118 | Test_FSM{NULL}: Allocated |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 119 | Test_FSM{NULL}: test_fsm_onleave() next_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 120 | Test_FSM{NULL}: State change to ONE (T42, 23s) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 121 | Test_FSM{ONE}: test_fsm_onenter() prev_state=NULL |
| 122 | Test_FSM{ONE}: test_fsm_onleave() next_state=TWO |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 123 | Test_FSM{ONE}: State change to TWO (no timeout) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 124 | Test_FSM{TWO}: test_fsm_onenter() prev_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 125 | Test_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
| 126 | Test_FSM{TWO}: Freeing instance |
| 127 | Test_FSM{TWO}: Deallocated |
| 128 | Test_FSM{NULL}: Allocated |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 129 | Test_FSM{NULL}: test_fsm_onleave() next_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 130 | Test_FSM{NULL}: State change to ONE (T42, 23s) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 131 | Test_FSM{ONE}: test_fsm_onenter() prev_state=NULL |
| 132 | Test_FSM{ONE}: test_fsm_onleave() next_state=TWO |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 133 | Test_FSM{ONE}: State change to TWO (no timeout) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 134 | Test_FSM{TWO}: test_fsm_onenter() prev_state=ONE |
Pau Espin Pedrol | eb028fa | 2020-07-20 16:46:54 +0200 | [diff] [blame] | 135 | Test_FSM{TWO}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
| 136 | Test_FSM{TWO}: Freeing instance |
| 137 | Test_FSM{TWO}: Deallocated |
| 138 | --- test_state_chg_T() done |
Vadim Yanitskiy | d2964a9 | 2022-07-19 06:08:42 +0700 | [diff] [blame] | 139 | |
| 140 | --- test_state_chg_Ts() |
| 141 | Total time passed: 0.000000 s |
| 142 | Test_FSM{NULL}: Allocated |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 143 | Test_FSM{NULL}: test_fsm_onleave() next_state=ONE |
Vadim Yanitskiy | d2964a9 | 2022-07-19 06:08:42 +0700 | [diff] [blame] | 144 | Test_FSM{NULL}: State change to ONE (T4242, 8s) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 145 | Test_FSM{ONE}: test_fsm_onenter() prev_state=NULL |
Vadim Yanitskiy | d2964a9 | 2022-07-19 06:08:42 +0700 | [diff] [blame] | 146 | Total time passed: 3.000000 s |
| 147 | Total time passed: 5.500000 s |
| 148 | Total time passed: 8.000000 s |
| 149 | Test_FSM{ONE}: Timeout of T4242 |
| 150 | Test_FSM{ONE}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
| 151 | Test_FSM{ONE}: Freeing instance |
| 152 | Test_FSM{ONE}: Deallocated |
| 153 | --- test_state_chg_Ts() done |
| 154 | |
| 155 | --- test_state_chg_Tms() |
| 156 | Total time passed: 0.000000 s |
| 157 | Test_FSM{NULL}: Allocated |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 158 | Test_FSM{NULL}: test_fsm_onleave() next_state=ONE |
Vadim Yanitskiy | d2964a9 | 2022-07-19 06:08:42 +0700 | [diff] [blame] | 159 | Test_FSM{NULL}: State change to ONE (T4242, 1337ms) |
Vadim Yanitskiy | 477d99f | 2023-12-27 04:46:51 +0700 | [diff] [blame] | 160 | Test_FSM{ONE}: test_fsm_onenter() prev_state=NULL |
Vadim Yanitskiy | d2964a9 | 2022-07-19 06:08:42 +0700 | [diff] [blame] | 161 | Total time passed: 0.500000 s |
| 162 | Total time passed: 0.750000 s |
| 163 | Total time passed: 1.100000 s |
Vadim Yanitskiy | d2964a9 | 2022-07-19 06:08:42 +0700 | [diff] [blame] | 164 | Total time passed: 1.300000 s |
| 165 | Total time passed: 1.337000 s |
Vadim Yanitskiy | 76bdbd4 | 2022-07-19 06:20:55 +0700 | [diff] [blame] | 166 | Test_FSM{ONE}: Timeout of T4242 |
Vadim Yanitskiy | d2964a9 | 2022-07-19 06:08:42 +0700 | [diff] [blame] | 167 | Test_FSM{ONE}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
| 168 | Test_FSM{ONE}: Freeing instance |
| 169 | Test_FSM{ONE}: Deallocated |
| 170 | --- test_state_chg_Tms() done |