The TcpRateLinuxWithBufferTest tests rate sample functionality with arbitrary SACK scenario. More...
Public Member Functions | |
TcpRateLinuxWithBufferTest (uint32_t segmentSize, std::string desc) | |
Constructor. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
void | DoTeardown () override |
Implementation to do any local setup required for this TestCase. More... | |
virtual void | RateSampleUpdatedTrace (const TcpRateLinux::TcpRateSample &sample) |
Track the rate sample value of TcpRateLinux. More... | |
virtual void | RateUpdatedTrace (const TcpRateLinux::TcpRateConnection &rate) |
Track the rate value of TcpRateLinux. More... | |
void | TestWithSackBlocks () |
Test with arbitrary SACK scenario. More... | |
void | TestWithStraightAcks () |
Test with acks without drop. More... | |
Private Attributes | |
uint32_t | m_expectedAckedSacked {0} |
Amount of expected acked sacked data. More... | |
uint32_t | m_expectedDelivered {0} |
Amount of expected delivered data. More... | |
Ptr< TcpRateOps > | m_rateOps |
Rate operations. More... | |
uint32_t | m_segmentSize |
Segment size. More... | |
TcpTxBuffer | m_txBuf |
Tcp Tx buffer. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
Log the failure of this TestCase. More... | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
The TcpRateLinuxWithBufferTest tests rate sample functionality with arbitrary SACK scenario.
Check the value of delivered against a home-made guess
Definition at line 444 of file tcp-rate-ops-test.cc.
TcpRateLinuxWithBufferTest::TcpRateLinuxWithBufferTest | ( | uint32_t | segmentSize, |
std::string | desc | ||
) |
Constructor.
segmentSize | Segment size to use. |
desc | Description. |
Definition at line 483 of file tcp-rate-ops-test.cc.
References m_rateOps, ns3::MakeCallback(), RateSampleUpdatedTrace(), RateUpdatedTrace(), and ns3::ObjectBase::TraceConnectWithoutContext().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 497 of file tcp-rate-ops-test.cc.
References ns3::Seconds(), and TestWithSackBlocks().
|
overrideprivatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test teardown
Reimplemented from ns3::TestCase.
Definition at line 591 of file tcp-rate-ops-test.cc.
|
privatevirtual |
Track the rate sample value of TcpRateLinux.
sample | updated value of TcpRateSample. |
Definition at line 514 of file tcp-rate-ops-test.cc.
References m_expectedAckedSacked, NS_LOG_DEBUG, and NS_TEST_ASSERT_MSG_EQ.
Referenced by TcpRateLinuxWithBufferTest().
|
privatevirtual |
Track the rate value of TcpRateLinux.
rate | updated value of TcpRate. |
Definition at line 505 of file tcp-rate-ops-test.cc.
References m_expectedDelivered, NS_LOG_DEBUG, and NS_TEST_ASSERT_MSG_EQ.
Referenced by TcpRateLinuxWithBufferTest().
|
private |
Test with arbitrary SACK scenario.
Definition at line 523 of file tcp-rate-ops-test.cc.
References ns3::TcpTxBuffer::Add(), ns3::TcpTxBuffer::BytesInFlight(), ns3::TcpTxBuffer::CopyFromSequence(), ns3::TcpTxBuffer::DiscardUpTo(), ns3::TcpRateOps::GenerateSample(), m_expectedAckedSacked, m_expectedDelivered, m_rateOps, m_segmentSize, m_txBuf, ns3::MakeCallback(), ns3::Seconds(), ns3::TcpTxBuffer::SetDupAckThresh(), ns3::TcpTxBuffer::SetHeadSequence(), ns3::TcpTxBuffer::SetSegmentSize(), ns3::TcpRateOps::SkbSent(), and ns3::TcpTxBuffer::Update().
Referenced by DoRun().
|
private |
Test with acks without drop.
|
private |
Amount of expected acked sacked data.
Definition at line 477 of file tcp-rate-ops-test.cc.
Referenced by RateSampleUpdatedTrace(), and TestWithSackBlocks().
|
private |
Amount of expected delivered data.
Definition at line 476 of file tcp-rate-ops-test.cc.
Referenced by RateUpdatedTrace(), and TestWithSackBlocks().
|
private |
Rate operations.
Definition at line 480 of file tcp-rate-ops-test.cc.
Referenced by TcpRateLinuxWithBufferTest(), and TestWithSackBlocks().
|
private |
Segment size.
Definition at line 478 of file tcp-rate-ops-test.cc.
Referenced by TestWithSackBlocks().
|
private |
Tcp Tx buffer.
Definition at line 479 of file tcp-rate-ops-test.cc.
Referenced by TestWithSackBlocks().