• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "stdio.h"
32 #include <climits>
33 #include <gtest/gtest.h>
34 
35 #include "It_test_sys.h"
36 
37 CHAR *g_groupFileStream = "root:x:0:\ndaemon:x:1:\nbin:x:2:\n";
38 CHAR *g_passwdFileStream = "root:x:0:0:root:/root:/bin/bash\n" \
39     "daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nbin:x:2:2:bin:/bin:/usr/sbin/nologin\n";
40 
41 using namespace testing::ext;
42 namespace OHOS {
43 class SysTest : public testing::Test {
44 public:
SetUpTestCase(void)45     static void SetUpTestCase(void) {}
TearDownTestCase(void)46     static void TearDownTestCase(void) {}
47 };
48 
49 #if defined(LOSCFG_USER_TEST_SMOKE)
50 /* *
51  * @tc.name: IT_TEST_SYS_004
52  * @tc.desc: function for SysTest
53  * @tc.type: FUNC
54  * @tc.require: AR000EEMQ9
55  */
56 HWTEST_F(SysTest, ItTestSys004, TestSize.Level0)
57 {
58     ItTestSys004();
59 }
60 
61 /* *
62  * @tc.name: IT_TEST_SYS_005
63  * @tc.desc: function for SysTest
64  * @tc.type: FUNC
65  * @tc.require: AR000EEMQ9
66  */
67 HWTEST_F(SysTest, ItTestSys005, TestSize.Level0)
68 {
69     ItTestSys005();
70 }
71 
72 /* *
73  * @tc.name: IT_TEST_SYS_006
74  * @tc.desc: function for SysTest
75  * @tc.type: FUNC
76  * @tc.require: AR000EEMQ9
77  */
78 HWTEST_F(SysTest, ItTestSys006, TestSize.Level0)
79 {
80     ItTestSys006();
81 }
82 
83 /* *
84  * @tc.name: IT_TEST_SYS_007
85  * @tc.desc: function for SysTest
86  * @tc.type: FUNC
87  * @tc.require: AR000EEMQ9
88  */
89 HWTEST_F(SysTest, ItTestSys007, TestSize.Level0)
90 {
91     ItTestSys007();
92 }
93 
94 /* *
95  * @tc.name: IT_TEST_SYS_008
96  * @tc.desc: function for SysTest
97  * @tc.type: FUNC
98  * @tc.require: AR000EEMQ9
99  */
100 HWTEST_F(SysTest, ItTestSys008, TestSize.Level0)
101 {
102     ItTestSys008();
103 }
104 
105 /* *
106  * @tc.name: IT_TEST_SYS_009
107  * @tc.desc: function for SysTest
108  * @tc.type: FUNC
109  * @tc.require: AR000EEMQ9
110  */
111 HWTEST_F(SysTest, ItTestSys009, TestSize.Level0)
112 {
113     ItTestSys009();
114 }
115 
116 /* *
117  * @tc.name: IT_TEST_SYS_010
118  * @tc.desc: function for SysTest
119  * @tc.type: FUNC
120  * @tc.require: AR000EEMQ9
121  */
122 HWTEST_F(SysTest, ItTestSys010, TestSize.Level0)
123 {
124     ItTestSys010();
125 }
126 
127 /* *
128  * @tc.name: IT_TEST_SYS_012
129  * @tc.desc: function for SysTest
130  * @tc.type: FUNC
131  * @tc.require: AR000EEMQ9
132  */
133 HWTEST_F(SysTest, ItTestSys012, TestSize.Level0)
134 {
135     ItTestSys012();
136 }
137 
138 /* *
139  * @tc.name: IT_TEST_SYS_013
140  * @tc.desc: function for SysTest
141  * @tc.type: FUNC
142  * @tc.require: AR000EEMQ9
143  */
144 HWTEST_F(SysTest, ItTestSys013, TestSize.Level0)
145 {
146     ItTestSys013();
147 }
148 
149 /* *
150  * @tc.name: IT_TEST_SYS_014
151  * @tc.desc: function for SysTest
152  * @tc.type: FUNC
153  * @tc.require: AR000EEMQ9
154  */
155 HWTEST_F(SysTest, ItTestSys014, TestSize.Level0)
156 {
157     ItTestSys014();
158 }
159 
160 /* *
161  * @tc.name: IT_TEST_SYS_015
162  * @tc.desc: function for SysTest
163  * @tc.type: FUNC
164  * @tc.require: AR000EEMQ9
165  */
166 HWTEST_F(SysTest, ItTestSys015, TestSize.Level0)
167 {
168     ItTestSys015();
169 }
170 
171 /* *
172  * @tc.name: IT_TEST_SYS_016
173  * @tc.desc: function for SysTest
174  * @tc.type: FUNC
175  * @tc.require: AR000EEMQ9
176  */
177 HWTEST_F(SysTest, ItTestSys016, TestSize.Level0)
178 {
179     ItTestSys016();
180 }
181 
182 /* *
183  * @tc.name: IT_TEST_SYS_017
184  * @tc.desc: function for SysTest
185  * @tc.type: FUNC
186  * @tc.require: AR000EEMQ9
187  */
188 HWTEST_F(SysTest, ItTestSys017, TestSize.Level0)
189 {
190     ItTestSys017();
191 }
192 
193 /* *
194  * @tc.name: IT_TEST_SYS_029
195  * @tc.desc: function for ftok exception test
196  * @tc.type: FUNC
197  * @tc.require: AR000EEMQ9
198  */
199 HWTEST_F(SysTest, ItTestSys029, TestSize.Level0)
200 {
201     ItTestSys029();
202 }
203 
204 /* *
205  * @tc.name: IT_TEST_SYS_030
206  * @tc.desc: function for sigsetjmp siglongjmp test
207  * @tc.type: FUNC
208  * @tc.require: AR000EEMQ9
209  */
210 HWTEST_F(SysTest, IT_TEST_SYS_030, TestSize.Level0)
211 {
212     IT_TEST_SYS_030();
213 }
214 
215 /* *
216  * @tc.name: IT_TEST_SYS_031
217  * @tc.desc: function for ctermid test
218  * @tc.type: FUNC
219  * @tc.require: AR000EEMQ9
220  */
221 HWTEST_F(SysTest, IT_TEST_SYS_031, TestSize.Level0)
222 {
223     IT_TEST_SYS_031();
224 }
225 #endif
226 
227 #if defined(LOSCFG_USER_TEST_FULL)
228 /* *
229  * @tc.name: IT_TEST_SYS_001
230  * @tc.desc: function for SysTest
231  * @tc.type: FUNC
232  * @tc.require: AR000EEMQ9
233  */
234 HWTEST_F(SysTest, ItTestSys001, TestSize.Level0)
235 {
236     ItTestSys001();
237 }
238 
239 /* *
240  * @tc.name: IT_TEST_SYS_018
241  * @tc.desc: function for SysTest
242  * @tc.type: FUNC
243  * @tc.require: AR000EEMQ9
244  */
245 HWTEST_F(SysTest, ItTestSys018, TestSize.Level0)
246 {
247     ItTestSys018();
248 }
249 
250 /* *
251  * @tc.name: IT_TEST_SYS_019
252  * @tc.desc: function for SysTest
253  * @tc.type: FUNC
254  * @tc.require: AR000EEMQ9
255  */
256 HWTEST_F(SysTest, ItTestSys019, TestSize.Level0)
257 {
258     ItTestSys019();
259 }
260 
261 /* *
262  * @tc.name: IT_TEST_SYS_020
263  * @tc.desc: function for SysTest
264  * @tc.type: FUNC
265  * @tc.require: AR000EEMQ9
266  */
267 HWTEST_F(SysTest, ItTestSys020, TestSize.Level0)
268 {
269     ItTestSys020();
270 }
271 
272 /* *
273  * @tc.name: IT_TEST_SYS_021
274  * @tc.desc: function for SysTest
275  * @tc.type: FUNC
276  * @tc.require: AR000EEMQ9
277  */
278 HWTEST_F(SysTest, ItTestSys021, TestSize.Level0)
279 {
280     ItTestSys021();
281 }
282 
283 /* *
284  * @tc.name: IT_TEST_SYS_022
285  * @tc.desc: function for SysTest
286  * @tc.type: FUNC
287  * @tc.require: AR000EEMQ9
288  */
289 HWTEST_F(SysTest, ItTestSys022, TestSize.Level0)
290 {
291     ItTestSys022();
292 }
293 
294 /* *
295  * @tc.name: IT_TEST_SYS_023
296  * @tc.desc: function for SysTest
297  * @tc.type: FUNC
298  * @tc.require: AR000EEMQ9
299  */
300 HWTEST_F(SysTest, ItTestSys023, TestSize.Level0)
301 {
302     ItTestSys023();
303 }
304 
305 /* *
306  * @tc.name: IT_TEST_SYS_024
307  * @tc.desc: function for SysTest
308  * @tc.type: FUNC
309  * @tc.require: AR000EEMQ9
310  */
311 HWTEST_F(SysTest, ItTestSys024, TestSize.Level0)
312 {
313     ItTestSys024();
314 }
315 
316 /* *
317  * @tc.name: IT_TEST_SYS_025
318  * @tc.desc: function for SysTest
319  * @tc.type: FUNC
320  * @tc.require: AR000EEMQ9
321  */
322 HWTEST_F(SysTest, ItTestSys025, TestSize.Level0)
323 {
324     ItTestSys025();
325 }
326 
327 /* *
328  * @tc.name: IT_TEST_SYS_025
329  * @tc.desc: function for SysTest
330  * @tc.type: FUNC
331  * @tc.require: AR000EEMQ9
332  */
333 HWTEST_F(SysTest, ItTestSys026, TestSize.Level0)
334 {
335     ItTestSys026();
336 }
337 
338 /* *
339  * @tc.name: IT_TEST_SYS_027
340  * @tc.desc: function for ftok normal test
341  * @tc.type: FUNC
342  * @tc.require: AR000EEMQ9
343  */
344 HWTEST_F(SysTest, ItTestSys027, TestSize.Level0)
345 {
346     ItTestSys027();
347 }
348 
349 /* *
350  * @tc.name: ItTestSys028
351  * @tc.desc: function for nice:set pthread priority
352  * @tc.type: FUNC
353  * @tc.require: AR000EEMQ9
354  */
355 HWTEST_F(SysTest, ItTestSys028, TestSize.Level0)
356 {
357     ItTestSys028();
358 }
359 #endif
360 } // namespace OHOS
361