update mesh tests to account for wifi random variables
This commit is contained in:
@@ -118,12 +118,12 @@ HwmpProactiveRegressionTest::CreateDevices ()
|
||||
mesh.SetMacType ("RandomStart", TimeValue (Seconds (0.1)));
|
||||
mesh.SetNumberOfInterfaces (1);
|
||||
NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes);
|
||||
// Five devices, 4 streams per device
|
||||
// Five devices, 9 streams per device
|
||||
streamsUsed += mesh.AssignStreams (meshDevices, streamsUsed);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream mismatch");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream mismatch");
|
||||
// No streams used here, by default
|
||||
streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream mismatch");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream mismatch");
|
||||
|
||||
// 3. setup TCP/IP
|
||||
InternetStackHelper internetStack;
|
||||
|
||||
@@ -118,9 +118,9 @@ HwmpReactiveRegressionTest::CreateDevices ()
|
||||
NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes);
|
||||
// Six devices, 4 streams per device
|
||||
streamsUsed += mesh.AssignStreams (meshDevices, streamsUsed);
|
||||
NS_TEST_EXPECT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch");
|
||||
NS_TEST_EXPECT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream assignment mismatch");
|
||||
streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed);
|
||||
NS_TEST_EXPECT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch");
|
||||
NS_TEST_EXPECT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream assignment mismatch");
|
||||
|
||||
// 3. setup TCP/IP
|
||||
InternetStackHelper internetStack;
|
||||
|
||||
@@ -127,11 +127,11 @@ HwmpSimplestRegressionTest::CreateDevices ()
|
||||
mesh.SetMacType ("RandomStart", TimeValue (Seconds (0.1)));
|
||||
mesh.SetNumberOfInterfaces (1);
|
||||
NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes);
|
||||
// Two devices, four streams per mesh device
|
||||
// Two devices, nine streams per mesh device
|
||||
streamsUsed += mesh.AssignStreams (meshDevices, streamsUsed);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream assignment mismatch");
|
||||
streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream assignment mismatch");
|
||||
|
||||
// 3. setup TCP/IP
|
||||
InternetStackHelper internetStack;
|
||||
|
||||
@@ -134,11 +134,11 @@ HwmpDoRfRegressionTest::CreateDevices ()
|
||||
mesh.SetMacType ("RandomStart", TimeValue (Seconds (0.1)));
|
||||
mesh.SetNumberOfInterfaces (1);
|
||||
NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes);
|
||||
// Four devices, four streams per mac
|
||||
// Four devices, nine streams per mac
|
||||
streamsUsed += mesh.AssignStreams (meshDevices, streamsUsed);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream assignment mismatch");
|
||||
streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream assignment mismatch");
|
||||
|
||||
// 3. setup TCP/IP
|
||||
InternetStackHelper internetStack;
|
||||
|
||||
@@ -99,11 +99,11 @@ PeerManagementProtocolRegressionTest::CreateDevices ()
|
||||
mesh.SetMacType ("RandomStart", TimeValue (Seconds (0.1)));
|
||||
mesh.SetNumberOfInterfaces (1);
|
||||
NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes);
|
||||
// Two devices, four streams per device (one for mac, one for phy,
|
||||
// two for plugins)
|
||||
// Two devices, nine streams per device (one for mac, one for phy,
|
||||
// two for plugins, five for regular mac wifi DCF)
|
||||
streamsUsed += mesh.AssignStreams (meshDevices, 0);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch");
|
||||
wifiChannel.AssignStreams (chan, streamsUsed);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 9), "Stream assignment mismatch");
|
||||
streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed);
|
||||
// 3. write PCAP if needed
|
||||
wifiPhy.EnablePcapAll (CreateTempDirFilename (PREFIX));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user