From eca630007a5322df18d9beb8dc2f7ff2c1ccace6 Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Fri, 20 Sep 2024 15:04:11 +0900 Subject: [PATCH] Skip testRouterSolicitations on T- devices. This does not lways pass on some devices before U. Now that the test is being added to MCTS, and needs to be backwards compatible, skip this test on T- devices. Test: atest CtsHostsideNetworkTests Change-Id: I2368f118d2539d70a97c937485f5179c47ba28d7 --- tests/cts/hostside/src/com/android/cts/net/ProcNetTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 fa68e3e60d..ae572e6235 100644 --- a/tests/cts/hostside/src/com/android/cts/net/ProcNetTest.java +++ b/tests/cts/hostside/src/com/android/cts/net/ProcNetTest.java @@ -166,6 +166,8 @@ public class ProcNetTest extends BaseHostJUnit4Test implements IBuildReceiver, I */ @Test public void testRouterSolicitations() throws Exception { + assumeTrue(new DeviceSdkLevel(mDevice).isDeviceAtLeastU()); + for (String interfaceDir : mSysctlDirs) { String path = IPV6_SYSCTL_DIR + "/" + interfaceDir + "/" + "router_solicitations"; int value = readIntFromPath(path); @@ -186,8 +188,7 @@ public class ProcNetTest extends BaseHostJUnit4Test implements IBuildReceiver, I */ @Test public void testCongestionControl() throws Exception { - final DeviceSdkLevel dsl = new DeviceSdkLevel(mDevice); - assumeTrue(dsl.isDeviceAtLeastV()); + assumeTrue(new DeviceSdkLevel(mDevice).isDeviceAtLeastV()); String path = "/proc/sys/net/ipv4/tcp_congestion_control"; String value = mDevice.executeAdbCommand("shell", "cat", path).trim();