From 46f30dc0ad8c042ade5855e701b895c08c7d6765 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Wed, 2 Feb 2011 11:40:30 +0100 Subject: cesar/bsu: avoid valgrind error, refs #2256 --- cesar/bsu/test/utest/src/bsut.c | 4 ++++ cesar/bsu/test/utest/src/schedules.c | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'cesar/bsu/test') diff --git a/cesar/bsu/test/utest/src/bsut.c b/cesar/bsu/test/utest/src/bsut.c index 3f5e0991f4..190a776aff 100644 --- a/cesar/bsu/test/utest/src/bsut.c +++ b/cesar/bsu/test/utest/src/bsut.c @@ -152,6 +152,7 @@ test_case_bsu_process (test_t test) brx.snid = 0x2; b = bsu_beacon_write (&beacon, BSU_BEACON_TYPE_CENTRAL, &t.mac_config, &btx); + b->phy_pb.pb_rx.pb_measurement.crc_error = false; t.bsu->sta_avln->beacon.beacon_period_start_date = phy_date () - BSU_ACLF_BP_50HZ_TCK - 1000; bsu_beacon_t *bbeacon = bsu_beacon_process (t.bsu, b, &brx); @@ -195,6 +196,7 @@ test_case_bsu_process (test_t test) brx.snid = 0x3; b = bsu_beacon_write (&beacon, BSU_BEACON_TYPE_DISCOVER, &t.mac_config, &btx); + b->phy_pb.pb_rx.pb_measurement.crc_error = false; t.bsu->sta_avln->beacon.beacon_period_start_date = phy_date () - BSU_ACLF_BP_50HZ_TCK - 1000; bsu_beacon_t *bprocessed = bsu_beacon_process (t.bsu, b, &brx); @@ -205,6 +207,7 @@ test_case_bsu_process (test_t test) blk_release (bprocessed); b = bsu_beacon_write (&beacon, BSU_BEACON_TYPE_CENTRAL, &t.mac_config, &btx); + b->phy_pb.pb_rx.pb_measurement.crc_error = false; bprocessed = bsu_beacon_process (t.bsu, b, &brx); test_fail_unless (bprocessed); avln = bsu_avln_get (t.bsu, beacon.vf.nid, brx.snid); @@ -271,6 +274,7 @@ test_case_bsu_process_sta_is_cco (test_t test) brx.snid = 0x2; b = bsu_beacon_write (&beacon, BSU_BEACON_TYPE_CENTRAL, &t.mac_config, &btx); + b->phy_pb.pb_rx.pb_measurement.crc_error = false; bsu_beacon_t *bbeacon = bsu_beacon_process (t.bsu, b, &brx); test_fail_unless (t.bsu->beacon_nb_recv [BSU_BEACON_TYPE_CENTRAL] == 1); diff --git a/cesar/bsu/test/utest/src/schedules.c b/cesar/bsu/test/utest/src/schedules.c index 7a9da78ac9..3436936b25 100644 --- a/cesar/bsu/test/utest/src/schedules.c +++ b/cesar/bsu/test/utest/src/schedules.c @@ -205,11 +205,18 @@ test_case_bsu_schedules_countdowns (test_t t) { beacon.bmis.bpsto.bpsto = 0; pb_beacon_t *b = bsu_beacon_write ( - &beacon, BSU_BEACON_TYPE_CENTRAL, &ctx.mac_config, &bparams); + &beacon, BSU_BEACON_TYPE_CENTRAL, &ctx.mac_config, + &bparams); ((pb_t *) b)->phy_pb.pb_rx.pb_measurement.crc_error = false; + bparamsrx.access = HPAV_ACCESS_IN_HOME; + bparamsrx.snid = ctx.bsu->sta_avln->snid; bparamsrx.preamble_date = bparamsrx.bts = ctx.bsu->aclf->bpsd[1]; bparamsrx.preamble_sysdate = phy_sysdate (); + for (j = 0; j < COUNT (bparamsrx.bto); j++) + bparamsrx.bto[j] = 0; + ctx.bsu->sta_avln->sync.bts = bparamsrx.bts - + BSU_ACLF_BP_50HZ_TCK; /* On beacon reception only schedules are read and CA is * programmed with the current data. */ bsu_beacon_recv (ctx.bsu, b, &bparamsrx); -- cgit v1.2.3