diff options
author | Maciej Żenczykowski <maze@google.com> | 2024-03-05 20:06:51 -0800 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2024-03-05 20:16:40 -0800 |
commit | 9ad691d26b42f5dfbe2f87ccf3f756fff1557dba (patch) | |
tree | 565d6c304e702211b5044a96151633d50af3d34a | |
parent | ad5f415f6aa86c35384177b71b0a7f7ea8615bd9 (diff) | |
download | tests-9ad691d26b42f5dfbe2f87ccf3f756fff1557dba.tar.gz |
net-test: skip minLTS test on GSI
Testing on GSI basically doesn't make sense as
we're testing new VTS + new GSI + old vendor
(which includes kernel). As such it is not
surprising if this test fails... and not much
you can do about it.
In practice this test is now more-or-less duplicated
in VTS netd_integration_test's kernel_test.cpp.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7a3642a5d3ba79eb6ac51f0bbf0958f4ed2f76b3
-rwxr-xr-x | net/test/kernel_feature_test.py | 1 | ||||
-rw-r--r-- | net/test/net_test.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/net/test/kernel_feature_test.py b/net/test/kernel_feature_test.py index cde19aa..89269d1 100755 --- a/net/test/kernel_feature_test.py +++ b/net/test/kernel_feature_test.py @@ -87,6 +87,7 @@ class KernelFeatureTest(net_test.NetworkTest): with net_test.RunAsUidGid(12345, self.AID_NET_RAW): self.assertRaisesErrno(errno.EPERM, socket, AF_PACKET, SOCK_RAW, 0) + @unittest.skipUnless(not net_test.IS_GSI, "GSI") def testMinRequiredKernelVersion(self): self.assertTrue(net_test.KernelAtLeast([(4, 19, 236), (5, 4, 186), diff --git a/net/test/net_test.py b/net/test/net_test.py index 5f88a2b..93c3167 100644 --- a/net/test/net_test.py +++ b/net/test/net_test.py @@ -96,6 +96,9 @@ KERN_INFO = 6 LINUX_VERSION = csocket.LinuxVersion() LINUX_ANY_VERSION = (0, 0) +# From //system/gsid/libgsi.cpp IsGsiRunning() +IS_GSI = os.access("/metadata/gsi/dsu/booted", os.F_OK) + def KernelAtLeast(versions): """Checks the kernel version matches the specified versions. |