Lines Matching refs:TrafficMonitorTest

48 class TrafficMonitorTest : public Test {  class
63 TrafficMonitorTest() in TrafficMonitorTest() function in shill::TrafficMonitorTest
109 Invoke(this, &TrafficMonitorTest::MockLoadTcpSocketInfo)); in SetupMockSocketInfos()
117 Invoke(this, &TrafficMonitorTest::MockLoadConnectionInfo)); in SetupMockConnectionInfos()
149 const char TrafficMonitorTest::kLocalIpAddr[] = "127.0.0.1";
150 const uint16_t TrafficMonitorTest::kLocalPort1 = 1234;
151 const uint16_t TrafficMonitorTest::kLocalPort2 = 2345;
152 const uint16_t TrafficMonitorTest::kLocalPort3 = 3456;
153 const uint16_t TrafficMonitorTest::kLocalPort4 = 4567;
154 const uint16_t TrafficMonitorTest::kLocalPort5 = 4567;
155 const char TrafficMonitorTest::kRemoteIpAddr[] = "192.168.1.1";
156 const uint16_t TrafficMonitorTest::kRemotePort = 5678;
157 const uint64_t TrafficMonitorTest::kTxQueueLength1 = 111;
158 const uint64_t TrafficMonitorTest::kTxQueueLength2 = 222;
159 const uint64_t TrafficMonitorTest::kTxQueueLength3 = 333;
160 const uint64_t TrafficMonitorTest::kTxQueueLength4 = 444;
162 TEST_F(TrafficMonitorTest, StartAndStop) { in TEST_F() argument
180 TEST_F(TrafficMonitorTest, BuildIPPortToTxQueueLengthValid) { in TEST_F() argument
185 TrafficMonitorTest::kLocalPort1, in TEST_F()
187 TrafficMonitorTest::kRemotePort, in TEST_F()
188 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
194 string ip_port = FormatIPPort(local_addr_, TrafficMonitorTest::kLocalPort1); in TEST_F()
195 EXPECT_EQ(TrafficMonitorTest::kTxQueueLength1, tx_queue_lengths[ip_port]); in TEST_F()
198 TEST_F(TrafficMonitorTest, BuildIPPortToTxQueueLengthInvalidDevice) { in TEST_F() argument
205 TrafficMonitorTest::kLocalPort1, in TEST_F()
207 TrafficMonitorTest::kRemotePort, in TEST_F()
208 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
216 TEST_F(TrafficMonitorTest, BuildIPPortToTxQueueLengthZero) { in TEST_F() argument
221 TrafficMonitorTest::kLocalPort1, in TEST_F()
223 TrafficMonitorTest::kRemotePort, in TEST_F()
232 TEST_F(TrafficMonitorTest, BuildIPPortToTxQueueLengthInvalidConnectionState) { in TEST_F() argument
237 TrafficMonitorTest::kLocalPort1, in TEST_F()
239 TrafficMonitorTest::kRemotePort, in TEST_F()
240 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
248 TEST_F(TrafficMonitorTest, BuildIPPortToTxQueueLengthInvalidTimerState) { in TEST_F() argument
253 TrafficMonitorTest::kLocalPort1, in TEST_F()
255 TrafficMonitorTest::kRemotePort, in TEST_F()
256 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
264 TEST_F(TrafficMonitorTest, BuildIPPortToTxQueueLengthMultipleEntries) { in TEST_F() argument
269 TrafficMonitorTest::kLocalPort1, in TEST_F()
271 TrafficMonitorTest::kRemotePort, in TEST_F()
272 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
278 TrafficMonitorTest::kLocalPort2, in TEST_F()
280 TrafficMonitorTest::kRemotePort, in TEST_F()
281 TrafficMonitorTest::kTxQueueLength2, in TEST_F()
287 TrafficMonitorTest::kLocalPort3, in TEST_F()
289 TrafficMonitorTest::kRemotePort, in TEST_F()
290 TrafficMonitorTest::kTxQueueLength3, in TEST_F()
296 TrafficMonitorTest::kLocalPort4, in TEST_F()
298 TrafficMonitorTest::kRemotePort, in TEST_F()
299 TrafficMonitorTest::kTxQueueLength4, in TEST_F()
305 TrafficMonitorTest::kLocalPort5, in TEST_F()
307 TrafficMonitorTest::kRemotePort, in TEST_F()
314 string ip_port = FormatIPPort(local_addr_, TrafficMonitorTest::kLocalPort2); in TEST_F()
316 ip_port = FormatIPPort(local_addr_, TrafficMonitorTest::kLocalPort3); in TEST_F()
320 TEST_F(TrafficMonitorTest, SampleTrafficStuckTxQueueSameQueueLength) { in TEST_F() argument
325 TrafficMonitorTest::kLocalPort1, in TEST_F()
327 TrafficMonitorTest::kRemotePort, in TEST_F()
328 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
333 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
350 TEST_F(TrafficMonitorTest, SampleTrafficStuckTxQueueIncreasingQueueLength) { in TEST_F() argument
355 TrafficMonitorTest::kLocalPort1, in TEST_F()
357 TrafficMonitorTest::kRemotePort, in TEST_F()
358 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
363 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
372 TrafficMonitorTest::kLocalPort1, in TEST_F()
374 TrafficMonitorTest::kRemotePort, in TEST_F()
375 TrafficMonitorTest::kTxQueueLength1 + 1, in TEST_F()
384 TEST_F(TrafficMonitorTest, SampleTrafficStuckTxQueueVariousQueueLengths) { in TEST_F() argument
389 TrafficMonitorTest::kLocalPort1, in TEST_F()
391 TrafficMonitorTest::kRemotePort, in TEST_F()
392 TrafficMonitorTest::kTxQueueLength2, in TEST_F()
397 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
406 TrafficMonitorTest::kLocalPort1, in TEST_F()
408 TrafficMonitorTest::kRemotePort, in TEST_F()
409 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
421 TrafficMonitorTest::kLocalPort1, in TEST_F()
423 TrafficMonitorTest::kRemotePort, in TEST_F()
424 TrafficMonitorTest::kTxQueueLength2, in TEST_F()
433 TEST_F(TrafficMonitorTest, SampleTrafficUnstuckTxQueueZeroQueueLength) { in TEST_F() argument
438 TrafficMonitorTest::kLocalPort1, in TEST_F()
440 TrafficMonitorTest::kRemotePort, in TEST_F()
441 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
446 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
454 TrafficMonitorTest::kLocalPort1, in TEST_F()
456 TrafficMonitorTest::kRemotePort, in TEST_F()
465 TEST_F(TrafficMonitorTest, SampleTrafficUnstuckTxQueueNoConnection) { in TEST_F() argument
470 TrafficMonitorTest::kLocalPort1, in TEST_F()
472 TrafficMonitorTest::kRemotePort, in TEST_F()
473 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
478 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
488 TEST_F(TrafficMonitorTest, SampleTrafficUnstuckTxQueueStateChanged) { in TEST_F() argument
493 TrafficMonitorTest::kLocalPort1, in TEST_F()
495 TrafficMonitorTest::kRemotePort, in TEST_F()
496 TrafficMonitorTest::kTxQueueLength1, in TEST_F()
501 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
509 TrafficMonitorTest::kLocalPort1, in TEST_F()
511 TrafficMonitorTest::kRemotePort, in TEST_F()
520 TEST_F(TrafficMonitorTest, SampleTrafficDnsTimedOut) { in TEST_F() argument
525 true, local_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
528 local_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
531 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
552 TEST_F(TrafficMonitorTest, SampleTrafficDnsOutstanding) { in TEST_F() argument
557 true, local_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
560 local_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
563 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
571 TEST_F(TrafficMonitorTest, SampleTrafficDnsSuccessful) { in TEST_F() argument
576 false, local_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
579 local_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
582 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
590 TEST_F(TrafficMonitorTest, SampleTrafficDnsFailureThenSuccess) { in TEST_F() argument
595 true, local_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
598 local_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
601 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
613 false, local_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
616 local_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
623 TEST_F(TrafficMonitorTest, SampleTrafficDnsTimedOutInvalidProtocol) { in TEST_F() argument
628 true, local_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
631 local_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
634 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
642 TEST_F(TrafficMonitorTest, SampleTrafficDnsTimedOutInvalidSourceIp) { in TEST_F() argument
647 true, remote_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
650 remote_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
653 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
661 TEST_F(TrafficMonitorTest, SampleTrafficDnsTimedOutOutsideTimeWindow) { in TEST_F() argument
667 true, remote_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
670 remote_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
673 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
681 TEST_F(TrafficMonitorTest, SampleTrafficNonDnsTimedOut) { in TEST_F() argument
687 true, local_addr_, TrafficMonitorTest::kLocalPort1, in TEST_F()
690 local_addr_, TrafficMonitorTest::kLocalPort1)); in TEST_F()
693 Bind(&TrafficMonitorTest::OnNoOutgoingPackets, Unretained(this))); in TEST_F()
701 TEST_F(TrafficMonitorTest, SampleTrafficDnsStatsReset) { in TEST_F() argument