1#
2# Copyright (C) 2020 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
17import os
18
19import ltp_enums
20
21VTS_LTP_OUTPUT = os.path.join('DATA', 'nativetest', 'ltp')
22LTP_RUNTEST_DIR = 'external/ltp/runtest'
23# The bp file that contains all binaries of ltp
24LTP_GEN_BINARY_BP = 'external/ltp/gen.bp'
25
26LTP_DISABLED_BUILD_TESTS_CONFIG_PATH = 'external/ltp/android/tools/disabled_tests.txt'
27# Directory for the template of the test config.
28LTP_CONFIG_TEMPLATE_DIR = 'test/vts-testcase/kernel/ltp/testcase/tools/template'
29# The file name of the config template file
30LTP_CONFIG_TEMPLATE_FILE_NAME = 'template.xml'
31
32# Environment paths for ltp test cases
33# string, ltp build root directory on target
34LTPDIR = '/data/local/tmp/ltp'
35# Directory for environment variable 'TMP' needed by some test cases
36TMP = os.path.join(LTPDIR, 'tmp')
37# Directory for environment variable 'TMPBASE' needed by some test cases
38TMPBASE = os.path.join(TMP, 'tmpbase')
39# Directory for environment variable 'LTPTMP' needed by some test cases
40LTPTMP = os.path.join(TMP, 'ltptemp')
41# Directory for environment variable 'TMPDIR' needed by some test cases
42TMPDIR = os.path.join(TMP, 'tmpdir')
43
44# File name suffix for low memory scenario group scripts
45LOW_MEMORY_SCENARIO_GROUP_SUFFIX = '_low_mem'
46
47# Requirement to testcase dictionary.
48REQUIREMENTS_TO_TESTCASE = {
49    ltp_enums.Requirements.LOOP_DEVICE_SUPPORT: [
50        'syscalls.mount01',
51        'syscalls.fchmod06',
52        'syscalls.ftruncate04',
53        'syscalls.ftruncate04_64',
54        'syscalls.inotify03',
55        'syscalls.link08',
56        'syscalls.linkat02',
57        'syscalls.mkdir03',
58        'syscalls.mkdirat02',
59        'syscalls.mknod07',
60        'syscalls.mknodat02',
61        'syscalls.mmap16',
62        'syscalls.mount01',
63        'syscalls.mount02',
64        'syscalls.mount03',
65        'syscalls.mount04',
66        'syscalls.mount06',
67        'syscalls.rename11',
68        'syscalls.renameat01',
69        'syscalls.rmdir02',
70        'syscalls.umount01',
71        'syscalls.umount02',
72        'syscalls.umount03',
73        'syscalls.umount2_01',
74        'syscalls.umount2_02',
75        'syscalls.umount2_03',
76        'syscalls.utime06',
77        'syscalls.utimes01',
78        'syscalls.mkfs01',
79        'fs.quota_remount_test01',
80    ],
81    ltp_enums.Requirements.BIN_IN_PATH_LDD: ['commands.ldd'],
82}
83
84# Requirement for all test cases
85REQUIREMENT_FOR_ALL = [ltp_enums.Requirements.LTP_TMP_DIR]
86
87# Requirement to test suite dictionary
88REQUIREMENT_TO_TESTSUITE = {}
89
90# List of LTP test suites to run
91TEST_SUITES = [
92    'can',
93    'cap_bounds',
94    'commands',
95    'connectors',
96    'containers',
97    'controllers',
98    'cpuhotplug',
99    'cve',
100    'dio',
101    'fcntl-locktests_android',
102    'filecaps',
103    'fs',
104    'fs_bind',
105    'fs_perms_simple',
106    'fsx',
107    'hugetlb',
108    'hyperthreading',
109    'input',
110    'io',
111    'ipc',
112    'kernel_misc',
113    'math',
114    'mm',
115    'nptl',
116    'power_management_tests',
117    'pty',
118    'sched',
119    'securebits',
120    'syscalls',
121    'tracing',
122]
123
124# List of LTP test suites to run
125TEST_SUITES_LOW_MEM = [
126    'can',
127    'cap_bounds',
128    'commands',
129    'connectors',
130    'containers',
131    'cpuhotplug',
132    'cve',
133    'dio',
134    'fcntl-locktests_android',
135    'filecaps',
136    'fs',
137    'fs_bind',
138    'fs_perms_simple',
139    'fsx',
140    'hugetlb',
141    'hyperthreading',
142    'input',
143    'io',
144    'ipc',
145    'kernel_misc',
146    'math',
147    'mm',
148    'nptl',
149    'power_management_tests',
150    'pty',
151    'sched_low_mem',
152    'securebits',
153    'syscalls',
154    'tracing',
155]
156