1# 2# Copyright (C) 2016 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17from vts.testcases.kernel.linux_kselftest import test_case 18 19class ConfigKeys(object): 20 TEST_TYPE = "test_type" 21 22class ExitCode(object): 23 """Exit codes for test binaries and test scripts.""" 24 KSFT_PASS = 0 25 KSFT_FAIL = 1 26 KSFT_XPASS = 2 27 KSFT_XFAIL = 3 28 KSFT_SKIP = 4 29 30# Directory on the target where the tests are copied. 31KSFT_DIR = "/data/local/tmp/linux-kselftest" 32 33# Presubmit, stable, and staging lists are always mutually exclusive. 34KSFT_CASES_PRESUBMIT = map(lambda x: test_case.LinuxKselftestTestcase(*(x)), [ 35 ("futex/functional/futex_wait_timeout", ["arm", "x86"], [32, 64]), 36 ("futex/functional/futex_wait_wouldblock", ["arm", "x86"], [32, 64]), 37 ("futex/functional/futex_requeue_pi_mismatched_ops", ["arm", "x86"], [32, 64]), 38 ("futex/functional/futex_wait_uninitialized_heap", ["arm", "x86"], [32]), 39 ("futex/functional/futex_wait_private_mapped_file", ["arm", "x86"], [32, 64]), 40 ("net/socket", ["arm", "x86"], [32, 64]), 41]) 42 43KSFT_CASES_STABLE = map(lambda x: test_case.LinuxKselftestTestcase(*(x)), [ 44 ("net/psock_tpacket", ["arm", "x86"], [32, 64]), 45 ("ptrace/peeksiginfo", ["arm", "x86"], [64]), 46 ("timers/posix_timers", ["arm", "x86"], [32, 64]), 47 ("timers/nanosleep", ["arm", "x86"], [32, 64]), 48 ("timers/nsleep-lat", ["arm", "x86"], [32, 64]), 49 ("timers/set-timer-lat", ["arm", "x86"], [32, 64]), 50 ("timers/inconsistency-check", ["arm", "x86"], [32, 64]), 51 ("timers/raw_skew", ["arm", "x86"], [32, 64]), 52 ("timers/threadtest", ["arm", "x86"], [32, 64]), 53 ("timers/set-tai", ["arm", "x86"], [32, 64]), 54 ("timers/valid-adjtimex", ["arm", "x86"], [64]), 55]) 56 57KSFT_CASES_STAGING = map(lambda x: test_case.LinuxKselftestTestcase(*(x)), [ 58# TODO(trong): enable pstore test. 59# ("pstore/pstore_tests", ["arm", "x86"], [32, 64]), 60 ("seccomp/seccomp_bpf", ["arm", "x86"], [32, 64]), 61 ("timers/alarmtimer-suspend", ["arm", "x86"], [32, 64]), 62 ("x86/single_step_syscall", ["x86"], [32, 64]), 63 ("x86/sysret_ss_attrs", ["x86"], [32]), 64 ("x86/syscall_nt", ["x86"], [32, 64]), 65 ("x86/ptrace_syscall", ["x86"], [32, 64]), 66 ("x86/test_mremap_vdso", ["x86"], [32, 64]), 67 ("x86/check_initial_reg_state", ["x86"], [32, 64]), 68 ("x86/ldt_gdt", ["x86"], [32, 64]), 69 ("x86/syscall_arg_fault", ["x86"], [32]), 70 ("x86/test_syscall_vdso", ["x86"], [32]), 71 ("x86/unwind_vdso", ["x86"], [32]), 72 ("x86/test_FCMOV", ["x86"], [32]), 73 ("x86/test_FCOMI", ["x86"], [32]), 74 ("x86/test_FISTTP", ["x86"], [32]), 75 ("x86/vdso_restorer", ["x86"], [32]), 76]) 77