1 /*
2 * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
3 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice, this list of
9 * conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
12 * of conditions and the following disclaimer in the documentation and/or other materials
13 * provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
16 * to endorse or promote products derived from this software without specific prior written
17 * permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 #ifndef IT_TEST_PROCESS_H
32 #define IT_TEST_PROCESS_H
33
34 #include "osTest.h"
35 #include "sys/resource.h"
36 #include "sys/wait.h"
37
38 #define WAIT_PARENT_FIRST_TO_RUN(tick) usleep((tick)*10 * 1000) // 10, 1000, wait time.
39 #include "sys/syscall.h"
40
Syscall(int nbr,int parm1,int parm2,int parm3,int parm4)41 static inline int Syscall(int nbr, int parm1, int parm2, int parm3, int parm4)
42 {
43 register int reg7 __asm__("r7") = nbr;
44 register int reg3 __asm__("r3") = parm4;
45 register int reg2 __asm__("r2") = parm3;
46 register int reg1 __asm__("r1") = parm2;
47 register int reg0 __asm__("r0") = parm1;
48
49 __asm__ __volatile__("svc 0" : "=r"(reg0) : "r"(reg7), "r"(reg0), "r"(reg1), "r"(reg2), "r"(reg3) : "memory");
50
51 return reg0;
52 }
53 extern INT32 g_iCunitErrCode;
54 extern INT32 g_iCunitErrLineNo;
55 extern int GetCpuCount(void);
56
57 extern void Wait(const char *ptr, int scount);
58 extern void ItTestProcess001(void);
59 extern void ItTestProcess002(void);
60 extern void ItTestProcess004(void);
61 extern void ItTestProcess005(void);
62 extern void ItTestProcess006(void);
63 extern void ItTestProcess007(void);
64 extern void ItTestProcess008(void);
65 extern void ItTestProcess009(void);
66 extern void ItTestProcess010(void);
67 extern void ItTestProcess011(void);
68 extern void ItTestProcess012(void);
69 extern void ItTestProcess013(void);
70 extern void ItTestProcess014(void);
71 extern void ItTestProcess015(void);
72 extern void ItTestProcess016(void);
73 extern void ItTestProcess017(void);
74 extern void ItTestProcess018(void);
75 extern void ItTestProcess019(void);
76 extern void ItTestProcess020(void);
77 extern void ItTestProcess021(void);
78 extern void ItTestProcess022(void);
79 extern void ItTestProcess023(void);
80 extern void ItTestProcess024(void);
81 extern void ItTestProcess025(void);
82 extern void ItTestProcess026(void);
83 extern void ItTestProcess027(void);
84 extern void ItTestProcess029(void);
85 extern void ItTestProcess030(void);
86 extern void ItTestProcess031(void);
87 extern void ItTestProcess032(void);
88 extern void ItTestProcess033(void);
89 extern void ItTestProcess034(void);
90 extern void ItTestProcess035(void);
91 extern void ItTestProcess036(void);
92 extern void ItTestProcess037(void);
93 extern void ItTestProcess038(void);
94 extern void ItTestProcess039(void);
95 extern void ItTestProcess040(void);
96 extern void ItTestProcess041(void);
97 extern void ItTestProcess042(void);
98 extern void ItTestProcess043(void);
99 extern void ItTestProcess044(void);
100 extern void ItTestProcess045(void);
101 extern void ItTestProcess046(void);
102 extern void ItTestProcess047(void);
103 extern void ItTestProcess048(void);
104 extern void ItTestProcess049(void);
105 extern void ItTestProcess050(void);
106 extern void ItTestProcess051(void);
107 extern void ItTestProcess052(void);
108 extern void ItTestProcess053(void);
109 extern void ItTestProcess054(void);
110 extern void ItTestProcess055(void);
111 extern void ItTestProcess056(void);
112 extern void ItTestProcess057(void);
113 extern void ItTestProcess058(void);
114 extern void ItTestProcess059(void);
115 extern void ItTestProcess060(void);
116 extern void ItTestProcess061(void);
117 extern void ItTestProcess062(void);
118 extern void ItTestProcess063(void);
119 extern void ItTestProcess064(void);
120 extern void ItTestProcess065(void);
121 extern void ItTestProcess066(void);
122 extern void ItTestProcess067(void);
123 extern void ItTestProcess068(void);
124 extern void ItTestProcess069(void);
125 extern void ItTestProcessSmp001(void);
126 extern void ItTestProcessSmp002(void);
127 extern void ItTestProcessSmp003(void);
128 extern void ItTestProcessSmp004(void);
129 extern void ItTestProcessSmp005(void);
130 extern void ItTestProcessSmp006(void);
131 extern void ItTestProcessSmp007(void);
132 extern void ItTestProcessSmp008(void);
133 #endif
134