Harald Welte | 136e737 | 2016-05-29 10:53:17 +0900 | [diff] [blame] | 1 | Checking FSM allocation |
Harald Welte | 31c0fef | 2017-04-16 17:26:30 +0200 | [diff] [blame] | 2 | [0;mTest_FSM(my_id){NULL}: Allocated |
Stefan Sperling | 888dc7d | 2018-02-26 19:17:02 +0100 | [diff] [blame] | 3 | [0;mTest_FSM(my_id){NULL}: Received Event EV_B |
| 4 | [0;mTest_FSM(my_id){NULL}: Event EV_B not permitted |
| 5 | [0;mTest_FSM(my_id){NULL}: Received Event EV_A |
Harald Welte | 31c0fef | 2017-04-16 17:26:30 +0200 | [diff] [blame] | 6 | [0;mTest_FSM(my_id){NULL}: state_chg to ONE |
Stefan Sperling | 888dc7d | 2018-02-26 19:17:02 +0100 | [diff] [blame] | 7 | [0;mTest_FSM(my_id){ONE}: Received Event EV_B |
Harald Welte | 31c0fef | 2017-04-16 17:26:30 +0200 | [diff] [blame] | 8 | [0;mTest_FSM(my_id){ONE}: state_chg to TWO |
| 9 | [0;mTest_FSM(my_id){TWO}: Timeout of T2342 |
Harald Welte | 136e737 | 2016-05-29 10:53:17 +0900 | [diff] [blame] | 10 | [0;mTimer |
Neels Hofmeyr | d8f175c | 2018-04-09 00:42:22 +0200 | [diff] [blame] | 11 | [0;mTest_FSM(my_id){TWO}: Deallocated |
Neels Hofmeyr | 975ee6b | 2018-04-09 00:42:12 +0200 | [diff] [blame^] | 12 | [0;m |
| 13 | --- test_id_api() |
| 14 | Test_FSM{NULL}: Allocated |
| 15 | [0;m osmo_fsm_inst_name() == "Test_FSM" |
| 16 | osmo_fsm_inst_find_by_name("Test_FSM") == NULL |
| 17 | osmo_fsm_inst_update_id("my_id") |
| 18 | rc == 0, ok |
| 19 | osmo_fsm_inst_name() == "Test_FSM(my_id)" |
| 20 | osmo_fsm_inst_find_by_name("Test_FSM(my_id)") == fi |
| 21 | osmo_fsm_inst_find_by_id("my_id") == fi |
| 22 | osmo_fsm_inst_update_id("another_id") |
| 23 | rc == 0, ok |
| 24 | osmo_fsm_inst_name() == "Test_FSM(another_id)" |
| 25 | osmo_fsm_inst_find_by_name("Test_FSM(another_id)") == fi |
| 26 | osmo_fsm_inst_find_by_id("another_id") == fi |
| 27 | osmo_fsm_inst_update_id(NULL) |
| 28 | rc == 0, ok |
| 29 | osmo_fsm_inst_name() == "Test_FSM" |
| 30 | osmo_fsm_inst_find_by_name("Test_FSM") == 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("arbitrary_id") |
| 36 | rc == 0, ok |
| 37 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 38 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
| 39 | osmo_fsm_inst_find_by_id("arbitrary_id") == fi |
| 40 | osmo_fsm_inst_update_id("") |
| 41 | Attempting to allocate FSM instance of type 'Test_FSM' with illegal identifier '' |
| 42 | [0;m rc == -22, ok |
| 43 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 44 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
| 45 | osmo_fsm_inst_update_id("invalid.id") |
| 46 | Attempting to allocate FSM instance of type 'Test_FSM' with illegal identifier 'invalid.id' |
| 47 | [0;m rc == -22, ok |
| 48 | osmo_fsm_inst_name() == "Test_FSM(arbitrary_id)" |
| 49 | osmo_fsm_inst_find_by_name("Test_FSM(arbitrary_id)") == fi |
| 50 | |
| 51 | --- test_id_api() done |
| 52 | |
| 53 | Test_FSM(arbitrary_id){NULL}: Terminating (cause = OSMO_FSM_TERM_REQUEST) |
| 54 | [0;mTest_FSM(arbitrary_id){NULL}: Freeing instance |
| 55 | [0;mTest_FSM(arbitrary_id){NULL}: Deallocated |
Harald Welte | 136e737 | 2016-05-29 10:53:17 +0900 | [diff] [blame] | 56 | [0;m |