summaryrefslogtreecommitdiff
path: root/cesar/bsu/test/utest/src
diff options
context:
space:
mode:
authorlaranjeiro2010-06-04 07:46:32 +0000
committerlaranjeiro2010-06-04 07:46:32 +0000
commitcc25b773870176a18a841de98223c0f89dde5adf (patch)
treed30281be8da1f2acc4aa1b95ceeb30827e691afc /cesar/bsu/test/utest/src
parentb820b3d7437b1d0d0149877a683a85ea03b3f442 (diff)
cesar/bsu: does not provide crc false beacons to upper layers
When bsu process a beacon, if the crc is false, the beacon is released. So if the beacon is provided to upper layer, it will work on a freed block git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7161 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/bsu/test/utest/src')
-rw-r--r--cesar/bsu/test/utest/src/interface.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cesar/bsu/test/utest/src/interface.c b/cesar/bsu/test/utest/src/interface.c
index b718426948..f050ad83eb 100644
--- a/cesar/bsu/test/utest/src/interface.c
+++ b/cesar/bsu/test/utest/src/interface.c
@@ -85,7 +85,7 @@ void
test_case_bsu_interface_rx (test_t t)
{
test_case_begin (t, "Beacon Reception");
- test_begin (t, "Receive")
+ test_begin (t, "Receive CRC Ok, CRC False")
{
bsu_test_t test;
pb_beacon_t *beacon;
@@ -112,8 +112,12 @@ test_case_bsu_interface_rx (test_t t)
BSU_NTB_FIXED_POINT));
test_fail_unless (test.ul.bparams->ntb_offset_tck
== test.bsu->avlns[0].sync.ntb_offset_tck);
+ memset (&test.ul, 0, sizeof (bsu_test_ul_t));
+ beacon->phy_pb.pb_rx.pb_measurement.crc_error = true;
+ bsu_beacon_recv (test.bsu, beacon, &rx_params);
+ test_fail_unless (test.ul.beacon == NULL);
+ test_fail_unless (test.ul.bparams == NULL);
bsu_test_uninit (&test);
- blk_release_desc ((blk_t*) beacon);
}
test_end;
}