13#include "ns3/string.h"
14#include "ns3/tcp-congestion-ops.h"
15#include "ns3/tcp-prr-recovery.h"
16#include "ns3/tcp-recovery-ops.h"
17#include "ns3/tcp-socket-base.h"
48 const std::string& name);
51 void DoRun()
override;
71 const std::string& name)
104 "There should be at least one transmission on entering recovery");
122 "Updated cwnd should be less than or equal to the existing cwnd");
129 "Updated cwnd should be greater than or equal to the existing cwnd");
166 const std::string& name);
169 void DoRun()
override;
185 const std::string& name)
206 state->m_sackEnabled =
false;
224 "cwnd does not match value computed with correct arithmetic");
246 "Prr test on cWnd when bytesInFlight is greater than ssThresh with SSRB"),
256 "Prr test on cWnd when bytesInFlight is lower than ssThresh with SSRB"),
266 "Prr test on cWnd when bytesInFlight is greater than ssThresh with CRB"),
276 "Prr test on cWnd when bytesInFlight is lower than ssThresh with CRB"),
292 "Prr proportional branch must not overflow 32-bit product"),
308 "Prr CRB branch must not wrap unsigned subtraction"),
PRR Recovery regression test for integer overflow and unsigned wrap.
uint32_t m_segmentSize
Segment size.
PrrRecoveryArithmeticTest(uint32_t segmentSize, uint32_t ssThresh, uint32_t bytesInFlight, uint32_t bytesSentInRecovery, uint32_t deliveredBytes, uint32_t expectedCWnd, const std::string &name)
Constructor.
uint32_t m_expectedCWnd
Expected cwnd after the tested ACK.
uint32_t m_bytesInFlight
Bytes in flight at recovery entry.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_deliveredBytes
Bytes delivered on the tested ACK.
uint32_t m_ssThresh
Slow Start Threshold.
uint32_t m_bytesSentInRecovery
Bytes reported sent before the tested ACK.
PRR Recovery algorithm test.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_bytesInFlight
Current bytes in flight.
uint32_t m_bytesSent
Bytes sent while in recovery phase.
PrrRecoveryTest(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t unAckDataCount, uint32_t bytesInFlight, uint32_t m_deliveredBytes, uint32_t bytesSent, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_ssThresh
Slow Start Threshold.
uint32_t m_deliveredBytes
Bytes SACKed on last acknowledgment.
uint32_t m_cWnd
Congestion window.
uint32_t m_unAckDataCount
Unacknowledged data at the start of recovery.
Smart pointer class similar to boost::intrusive_ptr.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
TestCase(const TestCase &)=delete
Caller graph was not generated because of its size.
@ UNIT
This test suite implements a Unit Test.
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_LT_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report and abort if not.
#define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg)
Test that an actual value is greater than or equal to a limit and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static PrrRecoveryTestSuite g_TcpPrrRecoveryTest
Static variable for test initialization.