• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright (c) 2021 Li Wang <liwang@redhat.com>
3  */
4 
5 #ifndef TST_ARCH_H__
6 #define TST_ARCH_H__
7 
8 enum tst_arch_type {
9 	TST_UNKNOWN,
10 	TST_X86,
11 	TST_X86_64,
12 	TST_IA64,
13 	TST_PPC,
14 	TST_PPC64,
15 	TST_S390,
16 	TST_S390X,
17 	TST_ARM,
18 	TST_AARCH64,
19 	TST_SPARC,
20 };
21 
22 /*
23  * This tst_arch is to save the system architecture for
24  * using in the whole testcase.
25  */
26 extern const struct tst_arch {
27         char name[16];
28         enum tst_arch_type type;
29 } tst_arch;
30 
31 /*
32  * Check if test platform is in the given arch list. If yes return 1,
33  * otherwise return 0.
34  *
35  * @archlist A NULL terminated array of architectures to support.
36  */
37 int tst_is_on_arch(const char *const *archlist);
38 
39 #endif /* TST_ARCH_H__ */
40