From 4c2c32765b2cec83a45d1757af563300f66954ba Mon Sep 17 00:00:00 2001 From: laranjeiro Date: Mon, 17 May 2010 11:02:26 +0000 Subject: cesar/cp/{beacon, cco/action}: fix cco action unit tests git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7097 017c9cb6-072f-447c-8318-d5b54f68fe89 --- cesar/cp/beacon/stub/src/beacon.c | 6 ++++++ cesar/cp/cco/action/test/Makefile | 10 ++++------ cesar/cp/cco/action/test/src/action-test.c | 4 +++- cesar/cp/cco/action/test/src/status.c | 6 ------ cesar/cp/cco/action/test/utest/Makefile | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cesar/cp/beacon/stub/src/beacon.c b/cesar/cp/beacon/stub/src/beacon.c index d0e28e96f7..ea483a8874 100644 --- a/cesar/cp/beacon/stub/src/beacon.c +++ b/cesar/cp/beacon/stub/src/beacon.c @@ -117,3 +117,9 @@ cp_beacon_handover_hoipflag (cp_t *ctx, enum cp_beacon_hoip_e flag) __attribute_ void cp_beacon_handover_hoipflag (cp_t *ctx, enum cp_beacon_hoip_e flag) {} + +void +cp_beacon_cco_update_beacon_data (cp_t *ctx) __attribute__((weak)); + +void +cp_beacon_cco_update_beacon_data (cp_t *ctx) {} diff --git a/cesar/cp/cco/action/test/Makefile b/cesar/cp/cco/action/test/Makefile index 26cd4ebde2..ba8d55ed79 100644 --- a/cesar/cp/cco/action/test/Makefile +++ b/cesar/cp/cco/action/test/Makefile @@ -11,21 +11,21 @@ action_SOURCES = action-test.c core_stub.c \ sar_stub.c pbproc_stub.c sta_action.c action_MODULES = lib cp/cco/action mac/common cp/sta/mgr \ cp/av/cco/region/stub \ - cp/fsm/stub cp/beacon/stub cl/stub cp/pwl/stub \ + cp/fsm/stub cp/beacon/stub cl/stub\ cp/secu cp/msg/stub garbage_SOURCES = garbage.c core_stub.c \ sar_stub.c pbproc_stub.c sta_action.c garbage_MODULES = lib cp/cco/action mac/common cp/sta/mgr cp/fsm/stub \ cp/av/cco/region/stub \ - cp/beacon/stub cl/stub cp/pwl/stub cp/secu cp/msg/stub + cp/beacon/stub cl/stub cp/secu cp/msg/stub status_SOURCES = status.c pbproc_stub.c sar_stub.c sta_action.c status_MODULES = lib cp/cco/action mac/common cp/sta/mgr \ cp/av/cco/region/stub \ cp/fsm/stub cp/beacon/stub cp/sta/core/stub \ cp/msg/stub cl/stub mac/sar/stub cp/secu/stub \ - cl/stub cp/pwl/stub cp/secu + cp/secu keys_SOURCES = action_gen_nek.c pbproc_stub.c sar_stub.c \ sta_action.c @@ -33,13 +33,11 @@ keys_MODULES = lib cp/cco/action mac/common cp/sta/mgr \ cp/secu cp/av/cco/region/stub \ cp/fsm/stub cp/beacon/stub cp/sta/core/stub \ cp/msg/stub cl/stub mac/sar/stub cl/stub \ - cp/pwl/stub fsm_handover_SOURCES= fsm_handover.c sta_action.c fsm_handover_MODULES= lib cp/cco/action mac/common cp/sta/mgr \ cp/secu cp/av/cco/region/stub \ cp/fsm/stub cp/beacon/stub cp/sta/core/stub \ - cp/msg/stub cl/stub mac/sar/stub cl/stub \ - cp/pwl/stub + cp/msg/stub cl/stub mac/sar/stub \ include $(BASE)/common/make/top.mk diff --git a/cesar/cp/cco/action/test/src/action-test.c b/cesar/cp/cco/action/test/src/action-test.c index 51c53c6b33..136cbf1e69 100644 --- a/cesar/cp/cco/action/test/src/action-test.c +++ b/cesar/cp/cco/action/test/src/action-test.c @@ -312,7 +312,7 @@ test_case_cco_action_start (test_t test) test_fail_if (cp_sta_own_data_get_cco_status (&cp) != true); test_fail_if (cp_sta_own_data_get_tei (&cp) == 0x0); - test_fail_if (cp_sta_own_data_get_snid (&cp) != 0); + test_fail_if (cp_sta_own_data_get_snid (&cp) == 0); test_fail_if (cp_net_get_nid (&cp, net) != cp_sta_own_data_get_nid (&cp)); test_fail_if (cp_net_get_snid (&cp, net) != cp_sta_own_data_get_snid (&cp)); test_fail_if (cp.mac_config->nek[0].nek_enc[0] == 0); @@ -407,6 +407,7 @@ test_case_sta_assoc_procedure (test_t test) cp_net_t *net; cp_sta_t *sta; + lib_rnd_init (&cp.rnd, 0x034); cp_cco_action_init (&cp); cp_sta_mgr_init (&cp); cp.mac_store = mac_store_init (); @@ -913,6 +914,7 @@ test_case_sta_cc_leave (test_t test) sar_t sar; cp_mme_rx_t msg; + lib_rnd_init (&cp.rnd, 1234); cp_sta_mgr_init (&cp); cp_cco_action_init (&cp); cp.mac_store = mac_store_init (); diff --git a/cesar/cp/cco/action/test/src/status.c b/cesar/cp/cco/action/test/src/status.c index 70e2776972..a2268d98c8 100644 --- a/cesar/cp/cco/action/test/src/status.c +++ b/cesar/cp/cco/action/test/src/status.c @@ -88,9 +88,6 @@ test_suite__cco_action__case__Usta_to_cco (test_t test) test_fail_if (cp_net_get_nid (&cp, net) != cp_sta_own_data_get_nid (&cp)); - /* It shall send the central beacon at the same time. */ - test_fail_if (central_beacon == false); - /* Uninitialise the station manager. */ cp_sta_mgr_uninit (&cp); @@ -153,9 +150,6 @@ test_suite__cco_action__case__sta_to_cco (test_t test) test_fail_if (cp_net_get_nid (&cp, net) != cp_sta_own_data_get_nid (&cp)); - /* It shall send the central beacon at the same time. */ - test_fail_if (central_beacon == false); - /* Uninitialise the station manager. */ cp_sta_mgr_uninit (&cp); diff --git a/cesar/cp/cco/action/test/utest/Makefile b/cesar/cp/cco/action/test/utest/Makefile index bd872696d0..60414497f9 100644 --- a/cesar/cp/cco/action/test/utest/Makefile +++ b/cesar/cp/cco/action/test/utest/Makefile @@ -11,6 +11,6 @@ test_cco_action_SOURCES = test_cco_action.c handover.c nek.c \ test_cco_action_MODULES = lib lib/scenario cp/cco/action cp/sta/mgr \ cp/fsm/stub mac/common cl/stub \ cp/sta/core/stub cp/beacon/stub cp/msg/stub \ - cp/pwl/stub cp/av/cco/region/stub + cp/av/cco/region/stub include $(BASE)/common/make/top.mk -- cgit v1.2.3