From 6de6b3f10667022a82fa8a12859a16fe89c11dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Mon, 8 May 2023 08:26:41 +0000 Subject: [PATCH] add congestion control test to CTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is not a substantially new test, as VTS has already required either reno or cubic, and reno is ancient and obsolete (and was only ever included because it's builtin to the kernel), so in practice everything should have already always been using cubic. Bug: 281477097 Test: TreeHugger, atest ProcNetTest Signed-off-by: Maciej Żenczykowski Change-Id: I04622ae37265361f648bbcf46c0a10e22be3b24f --- .../hostside/src/com/android/cts/net/ProcNetTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/cts/hostside/src/com/android/cts/net/ProcNetTest.java b/tests/cts/hostside/src/com/android/cts/net/ProcNetTest.java index 19e61c62a0..1a528b112b 100644 --- a/tests/cts/hostside/src/com/android/cts/net/ProcNetTest.java +++ b/tests/cts/hostside/src/com/android/cts/net/ProcNetTest.java @@ -166,4 +166,15 @@ public class ProcNetTest extends DeviceTestCase implements IBuildReceiver, IDevi assertTrue(interval <= upperBoundSec); } } + + /** + * Verify that cubic is used as the congestion control algorithm. + * (This repeats the VTS test, and is here for good performance of the internet as a whole.) + * TODO: revisit this once a better CC algorithm like BBR2 is available. + */ + public void testCongestionControl() throws Exception { + String path = "/proc/sys/net/ipv4/tcp_congestion_control"; + String value = mDevice.executeAdbCommand("shell", "cat", path).trim(); + assertEquals(value, "cubic"); + } }