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