From 748b7843464938323102c8c62bd8b5d97503ba40 Mon Sep 17 00:00:00 2001 From: Aniket Singh Date: Wed, 18 Sep 2024 11:25:05 +0530 Subject: [PATCH] tcp: Update ns3-tcp-cubic-test and tcp-validation example validations --- examples/tcp/tcp-validation.cc | 4 ++-- src/test/ns3tcp/ns3tcp-cubic-test-suite.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/tcp/tcp-validation.cc b/examples/tcp/tcp-validation.cc index c2e98f043..cc383dd8d 100644 --- a/examples/tcp/tcp-validation.cc +++ b/examples/tcp/tcp-validation.cc @@ -231,10 +231,10 @@ TraceFirstDctcp(std::ofstream* ofStream, uint32_t bytesMarked, uint32_t bytesAck NS_LOG_WARN("now " << Now().As(Time::S) << " alpha " << alpha << " (expected <= 0.1)"); g_validationFailed = true; } - if ((now > 7) && ((alpha > 0.09) || (alpha < 0.055))) + if ((now > 7) && ((alpha > 0.09) || (alpha < 0.049))) { NS_LOG_WARN("now " << Now().As(Time::S) << " alpha " << alpha - << " (expected 0.09 <= alpha <= 0.055)"); + << " (expected 0.09 <= alpha <= 0.049)"); g_validationFailed = true; } } diff --git a/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc b/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc index 8013a40a6..876bcfb54 100644 --- a/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc @@ -348,7 +348,7 @@ Ns3TcpCubicTestCase::DoRun() if (m_prefix == "ns3-tcp-cubic-no-heuristic") { // Check overall min and max - NS_TEST_ASSERT_MSG_EQ(CheckValues(Seconds(1), Seconds(19), 50, 90), + NS_TEST_ASSERT_MSG_EQ(CheckValues(Seconds(1), Seconds(19), 60, 98), true, "cwnd outside range"); // Time just before a reduction does not have much variation @@ -359,7 +359,7 @@ Ns3TcpCubicTestCase::DoRun() else if (m_prefix == "ns3-tcp-cubic-fast-conv") { // Check overall min and max - NS_TEST_ASSERT_MSG_EQ(CheckValues(Seconds(1), Seconds(19), 50, 90), + NS_TEST_ASSERT_MSG_EQ(CheckValues(Seconds(1), Seconds(19), 60, 98), true, "cwnd outside range"); // Initial convex region does not have much variation @@ -375,7 +375,7 @@ Ns3TcpCubicTestCase::DoRun() true, "cwnd outside range"); // After time 17.5, cwnd should have grown much higher - NS_TEST_ASSERT_MSG_EQ(CheckValues(Seconds(17.5), Seconds(18.5), 170, 215), + NS_TEST_ASSERT_MSG_EQ(CheckValues(Seconds(17.5), Seconds(18.5), 169, 215), true, "cwnd outside range"); }