Merge "Rename android bpf library"
diff --git a/OWNERS b/OWNERS
index 80f05a3..ea18248 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,4 +1,3 @@
-romlem@google.com
smuckle@google.com
sspatil@google.com
yim@google.com
diff --git a/api/net/VtsKernelNetTest.py b/api/net/VtsKernelNetTest.py
index da0f33d..71c4f0f 100644
--- a/api/net/VtsKernelNetTest.py
+++ b/api/net/VtsKernelNetTest.py
@@ -73,7 +73,7 @@
logging.info('exit code: %s', result[const.EXIT_CODE])
asserts.assertFalse(
result[const.EXIT_CODE],
- 'kernel_net_tests binary returned non-zero exit code.')
+ 'kernel_net_tests binary returned non-zero exit code: \n' + result[const.STDERR])
if __name__ == '__main__':
test_runner.main()
diff --git a/api/proc/KernelProcFileTestBase.py b/api/proc/KernelProcFileTestBase.py
index c4840f5..aeaac70 100644
--- a/api/proc/KernelProcFileTestBase.py
+++ b/api/proc/KernelProcFileTestBase.py
@@ -187,8 +187,16 @@
"""
return True
- def file_optional(self):
- """Returns: True if file is allowed to be absent (boolean)."""
+ def file_optional(self, shell=None, dut=None):
+ """Performs any actions necessary to return if file is allowed to be absent
+
+ Args:
+ shell: shell object, to run commands on the device side
+ dut: AndroidDevice object to access functions and properties of that object
+
+ Returns:
+ boolean, True if file is allowed to be absent.
+ """
return False
def result_correct(self, parse_result):
diff --git a/api/proc/ProcFsFileTests.py b/api/proc/ProcFsFileTests.py
index 9e37067..266e781 100644
--- a/api/proc/ProcFsFileTests.py
+++ b/api/proc/ProcFsFileTests.py
@@ -110,6 +110,6 @@
def get_path(self):
return "/proc/swaps"
- def file_optional(self):
+ def file_optional(self, shell=None, dut=None):
# It is not mandatory to have this file present
return True
diff --git a/api/proc/ProcQtaguidCtrlTest.py b/api/proc/ProcQtaguidCtrlTest.py
index 7948d45..ef2be8c 100644
--- a/api/proc/ProcQtaguidCtrlTest.py
+++ b/api/proc/ProcQtaguidCtrlTest.py
@@ -52,6 +52,26 @@
def get_path(self):
return "/proc/net/xt_qtaguid/ctrl"
+ def file_optional(self, shell=None, dut=None):
+ """Specifies if the /proc/net/xt_qtaguid/ctrl file is mandatory.
+
+ For device running kernel 4.9 or above, it should use the eBPF cgroup
+ filter to monitor networking stats instead. So it may not have
+ xt_qtaguid module and /proc/net/xt_qtaguid/ctrl file on device.
+ But for device that still has xt_qtaguid module, this file is mandatory.
+
+ Same logic as checkKernelSupport in file:
+ test/vts-testcase/kernel/api/qtaguid/SocketTagUserSpace.cpp
+
+ Returns:
+ True when the kernel is 4.9 or newer, otherwise False is returned
+ """
+ (version, patchlevel, sublevel) = dut.kernel_version
+ if version == 4 and patchlevel >= 9 or version > 4:
+ return True
+ else:
+ return False
+
def get_permission_checker(self):
"""Get r/w file permission checker.
"""
diff --git a/api/proc/ProcSimpleFileTests.py b/api/proc/ProcSimpleFileTests.py
index 2bffe32..e19600d 100644
--- a/api/proc/ProcSimpleFileTests.py
+++ b/api/proc/ProcSimpleFileTests.py
@@ -111,7 +111,7 @@
def get_permission_checker(self):
return target_file_utils.IsReadWrite
- def file_optional(self):
+ def file_optional(self, shell=None, dut=None):
return True
class ProcKptrRestrictTest(KernelProcFileTestBase.KernelProcFileTestBase):
@@ -458,7 +458,7 @@
def get_permission_checker(self):
return target_file_utils.IsReadWrite
- def file_optional(self):
+ def file_optional(self, shell=None, dut=None):
# This file isn't in Android common kernel.
return True
diff --git a/api/proc/ProcUidCpuPowerTests.py b/api/proc/ProcUidCpuPowerTests.py
index d4cb255..71af639 100644
--- a/api/proc/ProcUidCpuPowerTests.py
+++ b/api/proc/ProcUidCpuPowerTests.py
@@ -42,7 +42,7 @@
def get_path(self):
return "/proc/uid_cpupower/time_in_state"
- def file_optional(self):
+ def file_optional(self, shell=None, dut=None):
# This file is optional until implemented in Android common kernel
return True
@@ -66,7 +66,7 @@
def get_path(self):
return "/proc/uid_cpupower/concurrent_active_time"
- def file_optional(self):
+ def file_optional(self, shell=None, dut=None):
# This file is optional until implemented in Android common kernel
return True
@@ -98,6 +98,6 @@
def get_path(self):
return "/proc/uid_cpupower/concurrent_policy_time"
- def file_optional(self):
+ def file_optional(self, shell=None, dut=None):
# This file is optional until implemented in Android common kernel
return True
diff --git a/api/proc/ProcUidTimeInStateTest.py b/api/proc/ProcUidTimeInStateTest.py
index be812d5..c3a1a71 100644
--- a/api/proc/ProcUidTimeInStateTest.py
+++ b/api/proc/ProcUidTimeInStateTest.py
@@ -49,7 +49,7 @@
def get_path(self):
return "/proc/uid_time_in_state"
- def file_optional(self):
+ def file_optional(self, shell=None, dut=None):
# This file is optional until implemented in Android common kernel
return True
diff --git a/api/proc/VtsKernelProcFileApiTest.py b/api/proc/VtsKernelProcFileApiTest.py
index 4273be5..a656b37 100644
--- a/api/proc/VtsKernelProcFileApiTest.py
+++ b/api/proc/VtsKernelProcFileApiTest.py
@@ -140,7 +140,7 @@
"Skip test for 64-bit kernel.")
filepath = test_object.get_path()
asserts.skipIf(not target_file_utils.Exists(filepath, self.shell) and
- test_object.file_optional(),
+ test_object.file_optional(shell=self.shell, dut=self.dut),
"%s does not exist and is optional." % filepath)
target_file_utils.assertPermissionsAndExistence(
self.shell, filepath, test_object.get_permission_checker())
@@ -206,16 +206,16 @@
# This command only performs a best effort attempt to remount all
# filesystems. Check that it doesn't throw an error.
- self.dut.adb.shell("\"echo u > %s\"" % filepath)
+ self.dut.adb.shell("echo u > %s" % filepath)
# Reboot the device.
- self.dut.adb.shell("\"echo b > %s\"" % filepath)
+ self.dut.adb.shell("echo b > %s" % filepath)
asserts.assertFalse(self.dut.hasBooted(), "Device is still alive.")
self.dut.waitForBootCompletion()
self.dut.rootAdb()
# Crash the system.
- self.dut.adb.shell("\"echo c > %s\"" % filepath)
+ self.dut.adb.shell("echo c > %s" % filepath)
asserts.assertFalse(self.dut.hasBooted(), "Device is still alive.")
self.dut.waitForBootCompletion()
self.dut.rootAdb()
@@ -232,7 +232,7 @@
"""
stats_path = "/proc/uid_io/stats"
result = self.dut.adb.shell(
- "\"cat %s | grep '^%d'\"" % (stats_path, uid),
+ "cat %s | grep '^%d'" % (stats_path, uid),
no_except=True)
return result[const.STDOUT].split()
@@ -250,9 +250,9 @@
# fg write chars are at index 2, and bg write chars are at 6.
wchar_index = 6 if state else 2
old_wchar = UidIOStats(root_uid)[wchar_index]
- self.dut.adb.shell("\"echo %d %s > %s\"" % (root_uid, state, filepath))
+ self.dut.adb.shell("echo %d %s > %s" % (root_uid, state, filepath))
# This should increase the number of write syscalls.
- self.dut.adb.shell("\"echo foo\"")
+ self.dut.adb.shell("echo foo")
asserts.assertLess(
old_wchar,
UidIOStats(root_uid)[wchar_index],
diff --git a/config/Android.mk b/config/Android.mk
deleted file mode 100644
index 181a8e4..0000000
--- a/config/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := VtsKernelConfig
--include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
diff --git a/config/AndroidTest.xml b/config/AndroidTest.xml
deleted file mode 100644
index bac70bc..0000000
--- a/config/AndroidTest.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="Config for VTS KernelConfigTest">
- <option name="config-descriptor:metadata" key="plan" value="vts-kernel" />
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
- <option name="push-group" value="HostDrivenTest.push" />
- </target_preparer>
- <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
- <option name="test-module-name" value="VtsKernelConfig" />
- <option name="test-case-path" value="vts/testcases/kernel/config/VtsKernelConfigTest" />
- </test>
-</configuration>
diff --git a/config/VtsKernelConfigTest.py b/config/VtsKernelConfigTest.py
deleted file mode 100644
index 19981ee..0000000
--- a/config/VtsKernelConfigTest.py
+++ /dev/null
@@ -1,252 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import gzip
-import logging
-import os
-import re
-import shutil
-import tempfile
-
-from vts.runners.host import asserts
-from vts.runners.host import base_test
-from vts.runners.host import const
-from vts.runners.host import keys
-from vts.runners.host import test_runner
-from vts.utils.python.android import api
-from vts.utils.python.controllers import android_device
-from vts.utils.python.file import target_file_utils
-
-from vts.testcases.kernel.lib import version
-
-
-class VtsKernelConfigTest(base_test.BaseTestClass):
- """Test case which check config options in /proc/config.gz.
-
- Attributes:
- _temp_dir: The temporary directory to which /proc/config.gz is copied.
- """
-
- PROC_FILE_PATH = "/proc/config.gz"
- KERNEL_CONFIG_FILE_PATH = "vts/testcases/kernel/config/data"
-
- def setUpClass(self):
- required_params = [keys.ConfigKeys.IKEY_DATA_FILE_PATH]
- self.getUserParams(required_params)
- self.dut = self.android_devices[0]
- self.shell = self.dut.shell
- self._temp_dir = tempfile.mkdtemp()
- self.supported_kernel_versions = version.getSupportedKernels(self.dut)
- self.release_dir = self.getReleaseDir()
-
- def getReleaseDir(self):
- """Return the appropriate subdirectory in kernel/configs.
-
- Returns the directory in kernel/configs corresponding to
- the device's first_api_level.
-
- Returns:
- string: a directory in kernel configs
- """
- api_level = self.dut.getLaunchApiLevel(strict=False)
-
- if (api_level == 0):
- logging.info("Cound not detect api level, using last release")
- return "p"
- elif api_level == api.PLATFORM_API_LEVEL_P:
- return "p"
- elif api_level == api.PLATFORM_API_LEVEL_O_MR1:
- return "o-mr1"
- elif api_level <= api.PLATFORM_API_LEVEL_O:
- return "o"
- else:
- return "."
-
- def checkKernelVersion(self):
- """Validate the kernel version of DUT is a valid kernel version.
-
- Returns:
- string, kernel version of device
- """
- cmd = "uname -a"
- results = self.shell.Execute(cmd)
- logging.info("Shell command '%s' results: %s", cmd, results)
-
- match = re.search(r"(\d+)\.(\d+)", results[const.STDOUT][0])
- if match is None:
- asserts.fail("Failed to detect kernel version of device.")
- else:
- kernel_version = int(match.group(1))
- kernel_patchlevel = int(match.group(2))
- logging.info("Detected kernel version: %s", match.group(0))
-
- for v in self.supported_kernel_versions:
- if (kernel_version == v[0] and kernel_patchlevel == v[1]):
- return match.group(0)
- asserts.fail("Detected kernel version is not one of %s" %
- self.supported_kernel_versions)
-
- def checkKernelArch(self, configs):
- """Find arch of the device kernel.
-
- Uses the kernel configuration to determine the architecture
- it is compiled for.
-
- Args:
- configs: dict containing device kernel configuration options
-
- Returns:
- A string containing the architecture of the device kernel. If
- the architecture cannot be determined, an empty string is
- returned.
- """
-
- CONFIG_ARM = "CONFIG_ARM"
- CONFIG_ARM64 = "CONFIG_ARM64"
- CONFIG_X86 = "CONFIG_X86"
-
- if CONFIG_ARM in configs and configs[CONFIG_ARM] == "y":
- return "arm"
- elif CONFIG_ARM64 in configs and configs[CONFIG_ARM64] == "y":
- return "arm64"
- elif CONFIG_X86 in configs and configs[CONFIG_X86] == "y":
- return "x86"
- else:
- print "Unable to determine kernel architecture."
- return ""
-
- def parseConfigFileToDict(self, file, configs):
- """Parse kernel config file to a dictionary.
-
- Args:
- file: file object, android-base.config or unzipped /proc/config.gz
- configs: dict to which config options in file will be added
-
- Returns:
- dict: {config_name: config_state}
- """
- config_lines = [line.rstrip("\n") for line in file.readlines()]
-
- for line in config_lines:
- if line.startswith("#") and line.endswith("is not set"):
- match = re.search(r"CONFIG_\S+", line)
- if match is None:
- asserts.fail("Failed to parse config file")
- else:
- config_name = match.group(0)
- config_state = "n"
- elif line.startswith("CONFIG_"):
- config_name, config_state = line.split("=", 1)
- if config_state.startswith(("'", '"')):
- config_state = config_state[1:-1]
- else:
- continue
- configs[config_name] = config_state
-
- return configs
-
- def testKernelConfigs(self):
- """Ensures all kernel configs conform to Android requirements.
-
- Detects kernel version of device and validates against appropriate
- Common Android Kernel android-base.config and Android Treble
- requirements.
- """
- logging.info("Testing existence of %s" % self.PROC_FILE_PATH)
- target_file_utils.assertPermissionsAndExistence(
- self.shell, self.PROC_FILE_PATH, target_file_utils.IsReadOnly)
-
- logging.info("Validating kernel version of device.")
- kernel_version = self.checkKernelVersion()
-
- # Pull configs from the universal config file.
- configs = dict()
- config_file_path = os.path.join(
- self.data_file_path, self.KERNEL_CONFIG_FILE_PATH,
- self.release_dir, "android-" + kernel_version, "android-base.config")
- logging.info("Pulling base config from %s", config_file_path)
- with open(config_file_path, 'r') as config_file:
- configs = self.parseConfigFileToDict(config_file, configs)
-
- # Pull configs from device.
- device_configs = dict()
- self.dut.adb.pull("%s %s" % (self.PROC_FILE_PATH, self._temp_dir))
- logging.info("Adb pull %s to %s", self.PROC_FILE_PATH, self._temp_dir)
-
- localpath = os.path.join(self._temp_dir, "config.gz")
- with gzip.open(localpath, "rb") as device_config_file:
- device_configs = self.parseConfigFileToDict(
- device_config_file, device_configs)
-
- # Check device architecture and pull arch-specific configs.
- kernelArch = self.checkKernelArch(device_configs)
- if kernelArch is not "":
- config_file_path = os.path.join(self.data_file_path,
- self.KERNEL_CONFIG_FILE_PATH,
- self.release_dir,
- "android-" + kernel_version,
- "android-base-%s.config" % kernelArch)
- if os.path.isfile(config_file_path):
- logging.info("Pulling arch config from %s", config_file_path)
- with open(config_file_path, 'r') as config_file:
- configs = self.parseConfigFileToDict(config_file, configs)
-
- # Determine any deviations from the required configs.
- should_be_enabled = []
- should_not_be_set = []
- incorrect_config_state = []
- for config_name, config_state in configs.iteritems():
- if (config_state == "y" and
- (config_name not in device_configs or
- device_configs[config_name] not in ("y", "m"))):
- should_be_enabled.append(config_name)
- elif (config_state == "n" and (config_name in device_configs) and
- device_configs[config_name] != "n"):
- should_not_be_set.append(config_name + "=" +
- device_configs[config_name])
- elif (config_name in device_configs and
- device_configs[config_name] != config_state):
- incorrect_config_state.append(config_name + "=" +
- device_configs[config_name])
-
- if ("CONFIG_OF" not in device_configs and
- "CONFIG_ACPI" not in device_configs):
- should_be_enabled.append("CONFIG_OF | CONFIG_ACPI")
-
- if ("CONFIG_ANDROID_LOW_MEMORY_KILLER" not in device_configs and
- ("CONFIG_MEMCG" not in device_configs or
- "CONFIG_MEMCG_SWAP" not in device_configs)):
- should_be_enabled.append("CONFIG_ANDROID_LOW_MEMORY_KILLER | "
- "(CONFIG_MEMCG & CONFIG_MEMCG_SWAP)")
-
- asserts.assertTrue(
- len(should_be_enabled) == 0 and len(should_not_be_set) == 0 and
- len(incorrect_config_state) == 0,
- ("The following kernel configs should be enabled: [%s]\n"
- "The following kernel configs should not be set: [%s]\n"
- "THe following kernel configs have incorrect state: [%s]") %
- (", ".join(should_be_enabled), ", ".join(should_not_be_set),
- ", ".join(incorrect_config_state)))
-
- def tearDownClass(self):
- """Deletes the temporary directory."""
- logging.info("Delete %s", self._temp_dir)
- shutil.rmtree(self._temp_dir)
-
-
-if __name__ == "__main__":
- test_runner.main()
diff --git a/config/__init__.py b/config/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/config/__init__.py
+++ /dev/null
diff --git a/lib/__init__.py b/lib/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/lib/__init__.py
+++ /dev/null
diff --git a/lib/version.py b/lib/version.py
deleted file mode 100644
index c5cc466..0000000
--- a/lib/version.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from vts.utils.python.android import api
-
-def getSupportedKernels(dut):
- """Returns a list of the supported kernel versions for this
- devices' advertised API level.
-
- Args:
- dut: The AndroidDevice object corresponding to the device
- under test.
-
- Returns:
- A list of supported kernel versions.
- """
- api_level = dut.getLaunchApiLevel(strict=False)
- if api_level > api.PLATFORM_API_LEVEL_O_MR1 or api_level == 0:
- return [[4, 4, 107], [4, 9, 84], [4, 14, 42]]
- else:
- return [[3, 18, 0], [4, 4, 0], [4, 9, 0]]
diff --git a/ltp/configs/stable_tests.py b/ltp/configs/stable_tests.py
index b2cc7cf..0ea8ea1 100644
--- a/ltp/configs/stable_tests.py
+++ b/ltp/configs/stable_tests.py
@@ -302,6 +302,8 @@
'pty.ptem01_64bit',
'pty.pty01_32bit',
'pty.pty01_64bit',
+ 'pty.pty02_32bit',
+ 'pty.pty02_64bit',
'sched.hackbench01_32bit',
'sched.hackbench01_64bit',
'sched.hackbench01_low_mem_32bit',
@@ -336,6 +338,8 @@
'syscalls.abort01_64bit',
'syscalls.accept01_32bit',
'syscalls.accept01_64bit',
+ 'syscalls.accept4_01_32bit',
+ 'syscalls.accept4_01_64bit',
'syscalls.access01_32bit',
'syscalls.access01_64bit',
'syscalls.access02_32bit',
@@ -460,6 +464,8 @@
'syscalls.close08_64bit',
'syscalls.connect01_32bit',
'syscalls.connect01_64bit',
+ 'syscalls.copy_file_range01_32bit',
+ 'syscalls.copy_file_range01_64bit',
'syscalls.creat01_32bit',
'syscalls.creat01_64bit',
'syscalls.creat03_32bit',
@@ -524,6 +530,7 @@
'syscalls.epoll_wait02_64bit',
'syscalls.epoll_wait03_32bit',
'syscalls.epoll_wait03_64bit',
+ 'syscalls.eventfd01_32bit',
'syscalls.eventfd2_01_32bit',
'syscalls.eventfd2_01_64bit',
'syscalls.eventfd2_02_32bit',
@@ -734,6 +741,10 @@
'syscalls.fdatasync01_64bit',
'syscalls.fdatasync02_32bit',
'syscalls.fdatasync02_64bit',
+ 'syscalls.fgetxattr01_32bit',
+ 'syscalls.fgetxattr01_64bit',
+ 'syscalls.fgetxattr03_32bit',
+ 'syscalls.fgetxattr03_64bit',
'syscalls.flistxattr01_32bit',
'syscalls.flistxattr01_64bit',
'syscalls.flistxattr02_32bit',
@@ -776,6 +787,10 @@
'syscalls.fork11_64bit',
'syscalls.fpathconf01_32bit',
'syscalls.fpathconf01_64bit',
+ 'syscalls.fsetxattr01_32bit',
+ 'syscalls.fsetxattr01_64bit',
+ 'syscalls.fsetxattr02_32bit',
+ 'syscalls.fsetxattr02_64bit',
'syscalls.fstat01_32bit',
'syscalls.fstat01_64_32bit',
'syscalls.fstat01_64_64bit',
@@ -1124,6 +1139,8 @@
'syscalls.madvise05_64bit',
'syscalls.madvise08_32bit',
'syscalls.madvise08_64bit',
+ 'syscalls.madvise10_32bit',
+ 'syscalls.madvise10_64bit',
'syscalls.memcmp01_32bit',
'syscalls.memcmp01_64bit',
'syscalls.memcpy01_32bit',
@@ -1376,6 +1393,8 @@
'syscalls.prctl01_64bit',
'syscalls.prctl02_32bit',
'syscalls.prctl02_64bit',
+ 'syscalls.prctl03_32bit',
+ 'syscalls.prctl03_64bit',
'syscalls.pread01_32bit',
'syscalls.pread01_64_32bit',
'syscalls.pread01_64_64bit',
diff --git a/version/Android.mk b/version/Android.mk
deleted file mode 100644
index 07cc197..0000000
--- a/version/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := VtsKernelVersion
--include test/vts/tools/build/Android.host_config.mk
diff --git a/version/AndroidTest.xml b/version/AndroidTest.xml
deleted file mode 100644
index 3a61516..0000000
--- a/version/AndroidTest.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="Config for VTS KernelVersionTest">
- <option name="config-descriptor:metadata" key="plan" value="vts-kernel" />
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
- <option name="push-group" value="HostDrivenTest.push" />
- </target_preparer>
- <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
- <option name="test-module-name" value="VtsKernelVersion" />
- <option name="test-case-path" value="vts/testcases/kernel/version/VtsKernelVersionTest" />
- </test>
-</configuration>
diff --git a/version/VtsKernelVersionTest.py b/version/VtsKernelVersionTest.py
deleted file mode 100644
index b2edeb5..0000000
--- a/version/VtsKernelVersionTest.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import logging
-import re
-
-from vts.runners.host import asserts
-from vts.runners.host import base_test
-from vts.runners.host import const
-from vts.runners.host import keys
-from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.file import target_file_utils
-
-from vts.testcases.kernel.lib import version
-
-
-class VtsKernelVersionTest(base_test.BaseTestClass):
- """Test case which verifies the version of the kernel on the DUT is
- supported.
- """
-
- def setUpClass(self):
- required_params = [keys.ConfigKeys.IKEY_DATA_FILE_PATH]
- self.getUserParams(required_params)
- self.dut = self.android_devices[0]
- self.shell = self.dut.shell
- self.supported_kernel_versions = version.getSupportedKernels(self.dut)
-
- def testKernelVersion(self):
- """Validate the kernel version of DUT is a valid kernel version.
-
- Returns:
- string, kernel version of device
- """
- cmd = "uname -a"
- results = self.shell.Execute(cmd)
- logging.info("Shell command '%s' results: %s", cmd, results)
-
- match = re.search(r"(\d+)\.(\d+)\.(\d+)", results[const.STDOUT][0])
- if match is None:
- asserts.fail("Failed to detect kernel version of device.")
- else:
- kernel_version = int(match.group(1))
- kernel_patchlevel = int(match.group(2))
- kernel_sublevel = int(match.group(3))
- logging.info("Detected kernel version: %s.%s.%s" % (kernel_version,
- kernel_patchlevel, kernel_sublevel))
-
- for v in self.supported_kernel_versions:
- if (kernel_version == v[0] and kernel_patchlevel == v[1] and
- kernel_sublevel >= v[2]):
- logging.info("Compliant kernel version %s.%s.%s found." %
- (kernel_version, kernel_patchlevel, kernel_sublevel))
- return
-
- asserts.fail("Device is running an unsupported kernel version (%s.%s.%s)" %
- (kernel_version, kernel_patchlevel, kernel_sublevel))
-
-
-if __name__ == "__main__":
- test_runner.main()
diff --git a/version/__init__.py b/version/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/version/__init__.py
+++ /dev/null