wifi: Fix valgrind issues with tests

This commit is contained in:
Stefano Avallone
2020-02-01 13:01:58 +01:00
parent e906cde580
commit 78251108a1
2 changed files with 4 additions and 9 deletions

View File

@@ -290,7 +290,9 @@ OriginatorBlockAckWindowTest::DoRun (void)
}
// Notify the acknowledgment of 5 packets
Ptr<WifiMacQueueItem> mpdu = Create<WifiMacQueueItem> (Create<Packet> (), WifiMacHeader ());
WifiMacHeader hdr;
hdr.SetType (WIFI_MAC_QOSDATA);
Ptr<WifiMacQueueItem> mpdu = Create<WifiMacQueueItem> (Create<Packet> (), hdr);
uint16_t seqNumber = startingSeq;
mpdu->GetHeader ().SetSequenceNumber (seqNumber);
agreement.NotifyAckedMpdu (mpdu);

View File

@@ -531,18 +531,11 @@ ChannelAccessManagerTest<TxopType>::EndTest (void)
NS_TEST_EXPECT_MSG_EQ (state->m_expectedGrants.empty (), true, "Have no expected grants");
NS_TEST_EXPECT_MSG_EQ (state->m_expectedInternalCollision.empty (), true, "Have no internal collisions");
NS_TEST_EXPECT_MSG_EQ (state->m_expectedBackoff.empty (), true, "Have no expected backoffs");
state->Dispose ();
state = 0;
}
m_txop.clear ();
for (typename TxopTests::const_iterator i = m_txop.begin (); i != m_txop.end (); i++)
{
Ptr<TxopTest<TxopType>> txop = *i;
txop->Dispose ();
txop = 0;
}
m_txop.clear ();
m_ChannelAccessManager = 0;
m_low = 0;
}