Merge "Do not run this test on device with xt_qtaguid"
diff --git a/api/bpf_native_test/Android.bp b/api/bpf_native_test/Android.bp
index 6d1ca41..5cb56a2 100644
--- a/api/bpf_native_test/Android.bp
+++ b/api/bpf_native_test/Android.bp
@@ -15,7 +15,6 @@
//
cc_test {
- tags: ["tests"],
name: "vts_test_binary_bpf_module",
srcs: ["BpfTest.cpp"],
shared_libs: [
diff --git a/api/bpf_native_test/Android.mk b/api/bpf_native_test/Android.mk
index f3d2966..28ccb9f 100644
--- a/api/bpf_native_test/Android.mk
+++ b/api/bpf_native_test/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelNetBpfTest
-VTS_CONFIG_SRC_DIR := testcases/kernel/api/bpf_native_test
include test/vts/tools/build/Android.host_config.mk
diff --git a/api/hwbinder/VtsKernelHwBinderTest.py b/api/hwbinder/VtsKernelHwBinderTest.py
index f038c0e..d5bc7cb 100644
--- a/api/hwbinder/VtsKernelHwBinderTest.py
+++ b/api/hwbinder/VtsKernelHwBinderTest.py
@@ -32,10 +32,8 @@
"""
def setUpClass(self):
- self.dut = self.registerController(android_device)[0]
- self.dut.shell.InvokeTerminal(
- "VtsKernelHwBinderTest") # creates a remote shell instance.
- self.shell = self.dut.shell.VtsKernelHwBinderTest
+ self.dut = self.android_devices[0]
+ self.shell = self.dut.shell
def testHwbinderExistence(self):
"""Checks that hwbinder node exists.
diff --git a/api/proc/Android.mk b/api/proc/Android.mk
index 947fcd8..208b755 100644
--- a/api/proc/Android.mk
+++ b/api/proc/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := KernelProcFileApiTest
-VTS_CONFIG_SRC_DIR := testcases/kernel/api/proc
-include test/vts/tools/build/Android.host_config.mk
diff --git a/api/proc/KernelProcFileApiTest.py b/api/proc/KernelProcFileApiTest.py
index 66de8c3..ba83761 100644
--- a/api/proc/KernelProcFileApiTest.py
+++ b/api/proc/KernelProcFileApiTest.py
@@ -97,7 +97,6 @@
ProcSimpleFileTests.ProcSchedWakeupGranularityNS(),
ProcShowUidStatTest.ProcShowUidStatTest(),
ProcSimpleFileTests.ProcSuidDumpable(),
- ProcSimpleFileTests.ProcSysAbiSwapInstruction(),
ProcSimpleFileTests.ProcSysKernelRandomBootId(),
ProcSimpleFileTests.ProcSysRqTest(),
ProcSimpleFileTests.ProcUptime(),
@@ -119,13 +118,17 @@
class KernelProcFileApiTest(base_test.BaseTestClass):
- """Test cases which check content of proc files."""
+ """Test cases which check content of proc files.
+
+ Attributes:
+ _PROC_SYS_ABI_SWP_FILE_PATH: the path of a file which decides behaviour of SWP instruction.
+ """
+
+ _PROC_SYS_ABI_SWP_FILE_PATH = "/proc/sys/abi/swp"
def setUpClass(self):
- self.dut = self.registerController(android_device)[0]
- self.dut.shell.InvokeTerminal(
- "KernelApiTest") # creates a remote shell instance.
- self.shell = self.dut.shell.KernelApiTest
+ self.dut = self.android_devices[0]
+ self.shell = self.dut.shell
def runProcFileTest(self, test_object):
"""Reads from the file and checks that it parses and the content is valid.
@@ -269,5 +272,27 @@
)
file_content = self.ReadFileContent(filepath)
+ def testProcSysAbiSwpInstruction(self):
+ """Tests /proc/sys/abi/swp.
+
+ /proc/sys/abi/swp sets the execution behaviour for the obsoleted ARM instruction
+ SWP. As per the setting in /proc/sys/abi/swp, the usage of SWP{B}
+ can either generate an undefined instruction abort or use software emulation
+ or hardware execution.
+ """
+
+ asserts.skipIf(not ("arm" in self.dut.cpu_abi and self.dut.is64Bit),
+ "file not present on non-ARM64 device")
+ target_file_utils.assertPermissionsAndExistence(
+ self.shell, self._PROC_SYS_ABI_SWP_FILE_PATH, target_file_utils.IsReadWrite)
+ file_content = self.ReadFileContent(self._PROC_SYS_ABI_SWP_FILE_PATH)
+ try:
+ swp_state = int(file_content)
+ except ValueError as e:
+ asserts.fail("Failed to parse %s" % self._PROC_SYS_ABI_SWP_FILE_PATH)
+ asserts.assertTrue(swp_state >= 0 and swp_state <= 2,
+ "%s contains incorrect value: %d" % (self._PROC_SYS_ABI_SWP_FILE_PATH,
+ swp_state))
+
if __name__ == "__main__":
test_runner.main()
diff --git a/api/proc/ProcFsFileTests.py b/api/proc/ProcFsFileTests.py
index 074151f..9e37067 100644
--- a/api/proc/ProcFsFileTests.py
+++ b/api/proc/ProcFsFileTests.py
@@ -109,3 +109,7 @@
def get_path(self):
return "/proc/swaps"
+
+ def file_optional(self):
+ # It is not mandatory to have this file present
+ return True
diff --git a/api/proc/ProcModulesTest.py b/api/proc/ProcModulesTest.py
index 4a8a585..0f8d6c1 100644
--- a/api/proc/ProcModulesTest.py
+++ b/api/proc/ProcModulesTest.py
@@ -23,12 +23,9 @@
'''/proc/modules contains information about loaded kernel modules.'''
def prepare_test(self, shell, dut):
- try:
- first_api_level = int(dut.first_api_level)
- except ValueError as e:
- first_api_level = 0
- self.require_module = (first_api_level > api.PLATFORM_API_LEVEL_O_MR1 or
- first_api_level == 0)
+ api_level = dut.getLaunchApiLevel(strict=False)
+ self.require_module = (api_level > api.PLATFORM_API_LEVEL_O_MR1 or
+ api_level == 0)
return True
def parse_contents(self, contents):
diff --git a/api/proc/ProcSimpleFileTests.py b/api/proc/ProcSimpleFileTests.py
index 65adba9..2bffe32 100644
--- a/api/proc/ProcSimpleFileTests.py
+++ b/api/proc/ProcSimpleFileTests.py
@@ -20,27 +20,6 @@
from vts.testcases.kernel.api.proc import KernelProcFileTestBase
from vts.utils.python.file import target_file_utils
-# Test for /proc/sys/abi/swp.
-
-class ProcSysAbiSwapInstruction(KernelProcFileTestBase.KernelProcFileTestBase):
- '''/proc/sys/abi/swp sets the execution behaviour for the obsoleted ARM instruction
- SWP. As per the setting in /proc/sys/abi/swp, the usage of SWP{B}
- can either generate an undefined instruction abort or use software emulation
- or hardware execution.
- '''
-
- def parse_contents(self, contents):
- return self.parse_line("{:d}\n", contents)[0]
-
- def result_correct(self, result):
- return result >= 0 and result <= 2
-
- def get_path(self):
- return "/proc/sys/abi/swp"
-
- def get_permission_checker(self):
- return target_file_utils.IsReadWrite
-
# Test for /proc/sys/kernel/*.
class ProcCorePattern(KernelProcFileTestBase.KernelProcFileTestBase):
@@ -132,6 +111,8 @@
def get_permission_checker(self):
return target_file_utils.IsReadWrite
+ def file_optional(self):
+ return True
class ProcKptrRestrictTest(KernelProcFileTestBase.KernelProcFileTestBase):
'''/proc/sys/kernel/kptr_restrict determines whether kernel pointers are printed
diff --git a/api/proc/ProcVmallocInfoTest.py b/api/proc/ProcVmallocInfoTest.py
index bf0bff0..1e7ef36 100644
--- a/api/proc/ProcVmallocInfoTest.py
+++ b/api/proc/ProcVmallocInfoTest.py
@@ -35,18 +35,21 @@
t_VMAP = literal_token('vmap')
t_USER = literal_token('user')
t_VPAGES = literal_token('vpages')
+ t_VM_AREA = literal_token('vm_area')
+ t_UNPURGED = literal_token('unpurged')
+ t_VM_MAP_RAM = literal_token('vm_map_ram')
t_ignore = ' '
def t_PHYS(self, t):
- r'phys=[a-f0-9]+'
+ r'phys=(0x)?[a-f0-9]+'
t.value = [t.value[:4], int(t.value[5:], 16)]
return t
p_lines = repeat_rule('line')
def p_line(self, p):
- 'line : addr_range NUMBER caller module pages phys ioremap vmalloc vmap user vpages NEWLINE'
+ 'line : addr_range NUMBER caller module pages phys ioremap vmalloc vmap user vpages vm_vm_area NEWLINE'
p[0] = p[1:]
def p_addr_range(self, p):
@@ -93,6 +96,15 @@
| empty'''
p[0] = p[1]
+ def p_vm_vm_area(self, p):
+ '''vm_vm_area : UNPURGED VM_AREA
+ | VM_MAP_RAM
+ | empty'''
+ if len(p) == 2:
+ p[0] = []
+ else:
+ p[0] = p[1:]
+
def p_caller(self, p):
'''caller : CALLER
| HEX_LITERAL
diff --git a/api/qtaguid/Android.mk b/api/qtaguid/Android.mk
index 39ca48d..63eef09 100644
--- a/api/qtaguid/Android.mk
+++ b/api/qtaguid/Android.mk
@@ -35,5 +35,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelQtaguidTest
-VTS_CONFIG_SRC_DIR := testcases/kernel/api/qtaguid
-include test/vts/tools/build/Android.host_config.mk
diff --git a/api/rootdir/Android.mk b/api/rootdir/Android.mk
index f148a27..e2a6f08 100644
--- a/api/rootdir/Android.mk
+++ b/api/rootdir/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelRootDir
-VTS_CONFIG_SRC_DIR := testcases/kernel/api/rootdir
-include test/vts/tools/build/Android.host_config.mk
diff --git a/api/selinux/Android.mk b/api/selinux/Android.mk
index 0c50947..906575d 100644
--- a/api/selinux/Android.mk
+++ b/api/selinux/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelSelinuxFileApi
-VTS_CONFIG_SRC_DIR := testcases/kernel/api/selinux
-include test/vts/tools/build/Android.host_config.mk
diff --git a/api/selinux/VtsKernelSelinuxFileApiTest.py b/api/selinux/VtsKernelSelinuxFileApiTest.py
index 95d8185..8f4f681 100644
--- a/api/selinux/VtsKernelSelinuxFileApiTest.py
+++ b/api/selinux/VtsKernelSelinuxFileApiTest.py
@@ -38,10 +38,8 @@
"""
def setUpClass(self):
- self.dut = self.registerController(android_device)[0]
- self.dut.shell.InvokeTerminal(
- "KernelSelinuxFileApiTest") # creates a remote shell instance.
- self.shell = self.dut.shell.KernelSelinuxFileApiTest
+ self.dut = self.android_devices[0]
+ self.shell = self.dut.shell
def runSelinuxFileTest(self, test_object):
"""Reads the file and checks that its content and permissions are valid.
diff --git a/api/sysfs/Android.mk b/api/sysfs/Android.mk
index 6871e46..4b63d86 100644
--- a/api/sysfs/Android.mk
+++ b/api/sysfs/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelApiSysfsTest
-VTS_CONFIG_SRC_DIR := testcases/kernel/api/sysfs
-include test/vts/tools/build/Android.host_config.mk
diff --git a/api/sysfs/KernelApiSysfsTest.py b/api/sysfs/KernelApiSysfsTest.py
index 15b57a2..8fc53eb 100644
--- a/api/sysfs/KernelApiSysfsTest.py
+++ b/api/sysfs/KernelApiSysfsTest.py
@@ -31,10 +31,8 @@
'''Test cases which check sysfs files.'''
def setUpClass(self):
- self.dut = self.registerController(android_device)[0]
- self.dut.shell.InvokeTerminal(
- 'default') # creates a remote shell instance.
- self.shell = self.dut.shell.default
+ self.dut = self.android_devices[0]
+ self.shell = self.dut.shell
def ConvertToInteger(self, text):
'''Check whether a given text is interger.
diff --git a/api/system_as_root/Android.mk b/api/system_as_root/Android.mk
new file mode 100644
index 0000000..a673ad1
--- /dev/null
+++ b/api/system_as_root/Android.mk
@@ -0,0 +1,22 @@
+#
+# 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 := VtsKernelSystemAsRoot
+-include test/vts/tools/build/Android.host_config.mk
diff --git a/api/system_as_root/AndroidTest.xml b/api/system_as_root/AndroidTest.xml
new file mode 100644
index 0000000..ad28d5e
--- /dev/null
+++ b/api/system_as_root/AndroidTest.xml
@@ -0,0 +1,26 @@
+<?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 KernelSystemAsRoot test cases">
+ <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="VtsKernelSystemAsRoot" />
+ <option name="test-case-path" value="vts/testcases/kernel/api/system_as_root/VtsKernelSystemAsRootTest" />
+ <option name="precondition-first-api-level" value="28" />
+ </test>
+</configuration>
diff --git a/api/system_as_root/VtsKernelSystemAsRootTest.py b/api/system_as_root/VtsKernelSystemAsRootTest.py
new file mode 100644
index 0000000..8fb5d05
--- /dev/null
+++ b/api/system_as_root/VtsKernelSystemAsRootTest.py
@@ -0,0 +1,69 @@
+#!/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.
+#
+
+"""A test module to check system-as-root is enabled for new devices in P.
+
+The test logic is:
+ if precondition-first-api-level >= 28 (in AndroidTest.xml):
+ assert (
+ ro.build.system_root_image is 'true' AND
+ /system mount point doesn't exist)
+ else:
+ assert True
+"""
+
+
+import logging
+
+from vts.runners.host import asserts
+from vts.runners.host import base_test
+from vts.runners.host import const
+from vts.runners.host import test_runner
+
+
+# The property to indicate the system image is also root image.
+_SYSTEM_ROOT_IMAGE_PROP = "ro.build.system_root_image"
+
+
+class VtsKernelSystemAsRootTest(base_test.BaseTestClass):
+ """A test class to verify system-as-root is enabled."""
+
+ def setUpClass(self):
+ """Initializes device and shell."""
+ self._dut = self.android_devices[0]
+ self._shell = self._dut.shell
+
+ def testSystemRootImageProperty(self):
+ """Checks ro.build.system_root_image is 'true'."""
+ asserts.assertEqual("true",
+ self._dut.getProp(_SYSTEM_ROOT_IMAGE_PROP),
+ "%s is not true" % _SYSTEM_ROOT_IMAGE_PROP)
+
+ def testNoSystemMountPoint(self):
+ """Checks there is no /system mount point."""
+ # The format of /proc/mounts is:
+ # <partition> <mount point> <file system> <mount options> ...
+ results = self._shell.Execute(
+ "cat /proc/mounts | cut -d\" \" -f2")
+ mount_points = results[const.STDOUT][0].split()
+ logging.info('Mount points on the device: %s', mount_points)
+ asserts.assertFalse("/system" in mount_points,
+ "/system mount point shouldn't exist")
+
+
+if __name__ == "__main__":
+ test_runner.main()
diff --git a/api/system_as_root/__init__.py b/api/system_as_root/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/api/system_as_root/__init__.py
diff --git a/config/VtsKernelConfigTest.py b/config/VtsKernelConfigTest.py
index 22dd726..73cf7b0 100644
--- a/config/VtsKernelConfigTest.py
+++ b/config/VtsKernelConfigTest.py
@@ -27,6 +27,7 @@
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
@@ -46,12 +47,34 @@
def setUpClass(self):
required_params = [keys.ConfigKeys.IKEY_DATA_FILE_PATH]
self.getUserParams(required_params)
- self.dut = self.registerController(android_device)[0]
- self.dut.shell.InvokeTerminal(
- "KernelConfigTest") # creates a remote shell instance.
- self.shell = self.dut.shell.KernelConfigTest
+ 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.
@@ -154,7 +177,8 @@
configs = dict()
config_file_path = os.path.join(
self.data_file_path, self.KERNEL_CONFIG_FILE_PATH,
- "android-" + kernel_version, "android-base.cfg")
+ self.release_dir, "android-" + kernel_version, "android-base.cfg")
+ logging.info("Pulling base cfg from %s", config_file_path)
with open(config_file_path, 'r') as config_file:
configs = self.parseConfigFileToDict(config_file, configs)
@@ -173,9 +197,11 @@
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.cfg" % kernelArch)
if os.path.isfile(config_file_path):
+ logging.info("Pulling arch cfg from %s", config_file_path)
with open(config_file_path, 'r') as config_file:
configs = self.parseConfigFileToDict(config_file, configs)
diff --git a/cpu_profiling/Android.mk b/cpu_profiling/Android.mk
index b05e156..fe4a2bf 100644
--- a/cpu_profiling/Android.mk
+++ b/cpu_profiling/Android.mk
@@ -18,5 +18,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CpuProfilingTest
-VTS_CONFIG_SRC_DIR := testcases/kernel/cpu_profiling
-include test/vts/tools/build/Android.host_config.mk
diff --git a/lib/version.py b/lib/version.py
index dd87cb5..b33953f 100644
--- a/lib/version.py
+++ b/lib/version.py
@@ -26,12 +26,8 @@
Returns:
A list of supported kernel versions.
"""
- try:
- first_api_level = int(dut.first_api_level)
- except ValueError as e:
- first_api_level = 0
- if (first_api_level > api.PLATFORM_API_LEVEL_O_MR1 or
- first_api_level == 0):
+ api_level = dut.getLaunchApiLevel(strict=False)
+ if api_level > api.PLATFORM_API_LEVEL_O_MR1 or api_level == 0:
return [[4, 4, 0], [4, 9, 0], [4, 14, 0]]
else:
return [[3, 18, 0], [4, 4, 0], [4, 9, 0]]
diff --git a/linux_kselftest/LinuxKselftestTest.py b/linux_kselftest/LinuxKselftestTest.py
index f88d62b..5d1e9d0 100644
--- a/linux_kselftest/LinuxKselftestTest.py
+++ b/linux_kselftest/LinuxKselftestTest.py
@@ -49,9 +49,8 @@
logging.info("%s: %s", keys.ConfigKeys.IKEY_DATA_FILE_PATH,
self.data_file_path)
- self._dut = self.registerController(android_device)[0]
- self._dut.shell.InvokeTerminal("one")
- self._shell = self._dut.shell.one
+ self._dut = self.android_devices[0]
+ self._shell = self._dut.shell
if self.test_type == "presubmit":
self._testcases = config.KSFT_CASES_PRESUBMIT
diff --git a/linux_kselftest/presubmit/Android.mk b/linux_kselftest/presubmit/Android.mk
index 52e91d7..b02f247 100644
--- a/linux_kselftest/presubmit/Android.mk
+++ b/linux_kselftest/presubmit/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelLinuxKselftestPresubmit
-VTS_CONFIG_SRC_DIR := testcases/kernel/linux_kselftest/presubmit
-include test/vts/tools/build/Android.host_config.mk
diff --git a/linux_kselftest/presubmit/AndroidTest.xml b/linux_kselftest/presubmit/AndroidTest.xml
index 2c94e06..abcd177 100644
--- a/linux_kselftest/presubmit/AndroidTest.xml
+++ b/linux_kselftest/presubmit/AndroidTest.xml
@@ -22,6 +22,6 @@
<test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
<option name="test-module-name" value="VtsKernelLinuxKselftestPresubmit" />
<option name="test-case-path" value="vts/testcases/kernel/linux_kselftest/LinuxKselftestTest" />
- <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/presubmit/LinuxKselftestTestPresubmit.config" />
+ <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/presubmit/LinuxKselftestTestPresubmit.runner_conf" />
</test>
</configuration>
diff --git a/linux_kselftest/presubmit/LinuxKselftestTestPresubmit.config b/linux_kselftest/presubmit/LinuxKselftestTestPresubmit.runner_conf
similarity index 100%
rename from linux_kselftest/presubmit/LinuxKselftestTestPresubmit.config
rename to linux_kselftest/presubmit/LinuxKselftestTestPresubmit.runner_conf
diff --git a/linux_kselftest/stable/Android.mk b/linux_kselftest/stable/Android.mk
index ddc23e0..95d2b78 100644
--- a/linux_kselftest/stable/Android.mk
+++ b/linux_kselftest/stable/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelLinuxKselftest
-VTS_CONFIG_SRC_DIR := testcases/kernel/linux_kselftest/stable
-include test/vts/tools/build/Android.host_config.mk
diff --git a/linux_kselftest/stable/AndroidTest.xml b/linux_kselftest/stable/AndroidTest.xml
index 0e0adce..e1dae06 100644
--- a/linux_kselftest/stable/AndroidTest.xml
+++ b/linux_kselftest/stable/AndroidTest.xml
@@ -22,7 +22,7 @@
<test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
<option name="test-module-name" value="VtsKernelLinuxKselftest" />
<option name="test-case-path" value="vts/testcases/kernel/linux_kselftest/LinuxKselftestTest" />
- <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/stable/LinuxKselftestTest.config" />
+ <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/stable/LinuxKselftestTest.runner_conf" />
<option name="runtime-hint" value="8m"/>
</test>
</configuration>
diff --git a/linux_kselftest/stable/LinuxKselftestTest.config b/linux_kselftest/stable/LinuxKselftestTest.runner_conf
similarity index 100%
rename from linux_kselftest/stable/LinuxKselftestTest.config
rename to linux_kselftest/stable/LinuxKselftestTest.runner_conf
diff --git a/linux_kselftest/staging/Android.mk b/linux_kselftest/staging/Android.mk
index c413cf3..6b789ce 100644
--- a/linux_kselftest/staging/Android.mk
+++ b/linux_kselftest/staging/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelLinuxKselftestStaging
-VTS_CONFIG_SRC_DIR := testcases/kernel/linux_kselftest/staging
-include test/vts/tools/build/Android.host_config.mk
diff --git a/linux_kselftest/staging/AndroidTest.xml b/linux_kselftest/staging/AndroidTest.xml
index 0b2cb6c..a1c4f6d 100644
--- a/linux_kselftest/staging/AndroidTest.xml
+++ b/linux_kselftest/staging/AndroidTest.xml
@@ -22,6 +22,6 @@
<test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
<option name="test-module-name" value="VtsKernelLinuxKselftestStaging" />
<option name="test-case-path" value="vts/testcases/kernel/linux_kselftest/LinuxKselftestTest" />
- <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/staging/LinuxKselftestTestStaging.config" />
+ <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/staging/LinuxKselftestTestStaging.runner_conf" />
</test>
</configuration>
diff --git a/linux_kselftest/staging/LinuxKselftestTestStaging.config b/linux_kselftest/staging/LinuxKselftestTestStaging.runner_conf
similarity index 100%
rename from linux_kselftest/staging/LinuxKselftestTestStaging.config
rename to linux_kselftest/staging/LinuxKselftestTestStaging.runner_conf
diff --git a/ltp/configs/disabled_tests.py b/ltp/configs/disabled_tests.py
index b5e0608..fea8e44 100644
--- a/ltp/configs/disabled_tests.py
+++ b/ltp/configs/disabled_tests.py
@@ -80,7 +80,6 @@
'syscalls.setuid03_16',
'syscalls.setuid04_16',
'syscalls.splice02',
- 'syscalls.sysconf01',
'syscalls.utimensat01',
'fs.gf01',
'fs.gf02',
@@ -159,7 +158,6 @@
'fs.ftest05',
'fs.ftest07',
'fs.ftest08',
- 'ipc.signal_test_01',
'mm.mmapstress10',
'syscalls.fcntl14',
'syscalls.fcntl14',
@@ -279,6 +277,4 @@
'syscalls.fcntl36',
# b/71416822: fails in VTS
'tracing.dynamic_debug01',
- # (TODO): b/73784987
- 'syscalls.mount03',
]
diff --git a/ltp/stable/Android.mk b/ltp/stable/Android.mk
index 1807499..816e0fc 100644
--- a/ltp/stable/Android.mk
+++ b/ltp/stable/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelLtp
-VTS_CONFIG_SRC_DIR := testcases/kernel/ltp/stable
-include test/vts/tools/build/Android.host_config.mk
diff --git a/ltp/stable/AndroidTest.xml b/ltp/stable/AndroidTest.xml
index c0e0fd7..0be847b 100644
--- a/ltp/stable/AndroidTest.xml
+++ b/ltp/stable/AndroidTest.xml
@@ -22,6 +22,7 @@
<option name="test-module-name" value="VtsKernelLtp" />
<option name="test-timeout" value="3h" />
<option name="runtime-hint" value="20m" />
+ <option name="disable-framework" value="true" />
<option name="test-case-path" value="vts/testcases/kernel/ltp/KernelLtpTest" />
</test>
</configuration>
diff --git a/ltp/staging/Android.mk b/ltp/staging/Android.mk
index 5161053..37e8d49 100644
--- a/ltp/staging/Android.mk
+++ b/ltp/staging/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := VtsKernelLtpStaging
-VTS_CONFIG_SRC_DIR := testcases/kernel/ltp/staging
-include test/vts/tools/build/Android.host_config.mk
diff --git a/ltp/staging/AndroidTest.xml b/ltp/staging/AndroidTest.xml
index 02db7fd..71b888d 100644
--- a/ltp/staging/AndroidTest.xml
+++ b/ltp/staging/AndroidTest.xml
@@ -22,7 +22,8 @@
<option name="test-module-name" value="VtsKernelLtpStaging" />
<option name="test-timeout" value="3h30m" />
<option name="runtime-hint" value="1h30m" />
+ <option name="disable-framework" value="true" />
<option name="test-case-path" value="vts/testcases/kernel/ltp/KernelLtpTest" />
- <option name="test-config-path" value="vts/testcases/kernel/ltp/staging/KernelLtpStagingTest.config" />
+ <option name="test-config-path" value="vts/testcases/kernel/ltp/staging/KernelLtpStagingTest.runner_conf" />
</test>
</configuration>
diff --git a/ltp/staging/KernelLtpStagingTest.config b/ltp/staging/KernelLtpStagingTest.runner_conf
similarity index 100%
rename from ltp/staging/KernelLtpStagingTest.config
rename to ltp/staging/KernelLtpStagingTest.runner_conf
diff --git a/memory/Android.mk b/memory/Android.mk
index 0fa172a..e6e04db 100644
--- a/memory/Android.mk
+++ b/memory/Android.mk
@@ -19,5 +19,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := MemorySystemStressTest
-VTS_CONFIG_SRC_DIR := testcases/kernel/memory
-include test/vts/tools/build/Android.host_config.mk
diff --git a/memory/MemorySystemStressTest.py b/memory/MemorySystemStressTest.py
index 468703f..ea687b2 100644
--- a/memory/MemorySystemStressTest.py
+++ b/memory/MemorySystemStressTest.py
@@ -32,11 +32,10 @@
_STRESSAPPTEST = '/data/local/tmp/32/stressapptest'
def setUpClass(self):
- self.dut = self.registerController(android_device)[0]
+ self.dut = self.android_devices[0]
# Set executable bit on stressapptest binary
- self.dut.shell.InvokeTerminal("sat_setup")
- self.shell = getattr(self.dut.shell, "sat_setup")
+ self.shell = self.dut.shell
cmd = ['chmod +x', str(self._STRESSAPPTEST)]
self.shell.Execute(' '.join(cmd))
diff --git a/syscall/Android.mk b/syscall/Android.mk
index a8cdd65..f0bcfcc 100644
--- a/syscall/Android.mk
+++ b/syscall/Android.mk
@@ -40,6 +40,4 @@
include $(CLEAR_VARS)
LOCAL_MODULE := SyscallExistenceTest
-
-VTS_CONFIG_SRC_DIR := testcases/kernel/syscall
-include test/vts/tools/build/Android.host_config.mk
diff --git a/syscall/SyscallExistenceTest.py b/syscall/SyscallExistenceTest.py
index 9952e40..47d08c6 100644
--- a/syscall/SyscallExistenceTest.py
+++ b/syscall/SyscallExistenceTest.py
@@ -26,10 +26,9 @@
class SyscallExistenceTest(base_test.BaseTestClass):
"""Tests to verify kernel syscall interface."""
- TEST_SHELL_NAME = "my_shell1"
def setUpClass(self):
- self.dut = self.registerController(android_device)[0]
+ self.dut = self.android_devices[0]
if "arm" in self.dut.cpu_abi:
self.ARCH64__NR_name_to_handle_at = 264
self.ARCH64__NR_open_by_handle_at = 265
@@ -40,11 +39,9 @@
self.ARCH64__NR_uselib = 134
else:
asserts.fail("Unknown CPU ABI: %s" % self.dut.cpu_abi)
- self.dut.shell.InvokeTerminal(self.TEST_SHELL_NAME)
def tearDown(self):
- self.dut.shell.InvokeTerminal(self.TEST_SHELL_NAME)
- results = getattr(self.dut.shell, self.TEST_SHELL_NAME).Execute("which ls")
+ results = self.dut.shell.Execute("which ls")
logging.info(str(results[const.STDOUT]))
asserts.assertEqual(len(results[const.STDOUT]), 1)
asserts.assertEqual(results[const.STDOUT][0].strip(), "/system/bin/ls")
@@ -83,7 +80,7 @@
def SyscallDisabled(self, syscallid):
"""Helper function to check if a syscall is disabled."""
target = "/data/local/tmp/64/vts_test_binary_syscall_exists"
- results = getattr(self.dut.shell, self.TEST_SHELL_NAME).Execute([
+ results = self.dut.shell.Execute([
"chmod 755 %s" % target,
"%s %d" % (target, syscallid)
])
diff --git a/version/VtsKernelVersionTest.py b/version/VtsKernelVersionTest.py
index 0e999f0..b2edeb5 100644
--- a/version/VtsKernelVersionTest.py
+++ b/version/VtsKernelVersionTest.py
@@ -37,10 +37,8 @@
def setUpClass(self):
required_params = [keys.ConfigKeys.IKEY_DATA_FILE_PATH]
self.getUserParams(required_params)
- self.dut = self.registerController(android_device)[0]
- self.dut.shell.InvokeTerminal(
- "KernelVersionTest") # creates a remote shell instance.
- self.shell = self.dut.shell.KernelVersionTest
+ self.dut = self.android_devices[0]
+ self.shell = self.dut.shell
self.supported_kernel_versions = version.getSupportedKernels(self.dut)
def testKernelVersion(self):