• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #include <cstdint>
10 #include <cstdio>
11 #include <cstdlib>
12 #include <fcntl.h>
13 #include <string>
14 #include <unistd.h>
15 #include <gtest/gtest.h>
16 #include "hdf_io_service_if.h"
17 #include "hdf_uhdf_test.h"
18 #include "osal_test_case_def.h"
19 
20 using namespace testing::ext;
21 
22 #ifndef __LITEOS__
23 static const char *OSAL_FW_PATH = "/lib/firmware";
24 static const int OSAL_FW_PATH_MODE = 0x777;
25 #endif
26 
27 #define OSAL_TEST_FUNC_DEFINE(subCmd) do { \
28     struct HdfTestMsg msg = { TEST_OSAL_ITEM, subCmd, -1 }; \
29     printf("OSAL test enter cmd:%d\n\r", subCmd); \
30     EXPECT_EQ(0, HdfTestSendMsgToService(&msg)); \
31 } while (0)
32 
33 class OsalTest : public testing::Test {
34 public:
35     static void SetUpTestCase();
36     static void TearDownTestCase();
37     void SetUp();
38     void TearDown();
39 private:
40     static const int OSAL_TEST_TIME = 30;
41     static const int OSAL_WAIT_END_TIME = 5;
42 };
43 
OsalCreateDir(bool flag)44 static void OsalCreateDir(bool flag)
45 {
46 #if defined(__LITEOS__)
47     (void)flag;
48 #else
49     int ret;
50     if (flag) {
51         ret = mkdir(OSAL_FW_PATH, OSAL_FW_PATH_MODE);
52     } else {
53         ret = rmdir(OSAL_FW_PATH);
54     }
55     printf("%s %d %d", __func__, ret, flag);
56 #endif
57 }
SetUpTestCase()58 void OsalTest::SetUpTestCase()
59 {
60     HdfTestOpenService();
61     OsalCreateDir(true);
62     OSAL_TEST_FUNC_DEFINE(OSAL_TEST_START);
63     sleep(OSAL_TEST_TIME);
64     OSAL_TEST_FUNC_DEFINE(OSAL_TEST_END);
65     sleep(OSAL_WAIT_END_TIME);
66 }
67 
TearDownTestCase()68 void OsalTest::TearDownTestCase()
69 {
70     HdfTestCloseService();
71 }
72 
SetUp()73 void OsalTest::SetUp()
74 {
75 }
76 
TearDown()77 void OsalTest::TearDown()
78 {
79 }
80 
81 /**
82   * @tc.name: OsalGetMutex001
83   * @tc.desc: mutex function test
84   * @tc.type: FUNC
85   * @tc.require: AR000F868U
86   */
87 HWTEST_F(OsalTest, OsalGetMutex001, TestSize.Level3)
88 {
89     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_CREATE);
90 }
91 
92 /**
93   * @tc.name: OsalGetMutex002
94   * @tc.desc: mutex function test
95   * @tc.type: FUNC
96   * @tc.require: AR000F868U
97   */
98 HWTEST_F(OsalTest, OsalGetMutex002, TestSize.Level3)
99 {
100     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_LOCK_TIMEOUT);
101 }
102 
103 /**
104   * @tc.name: OsalGetMutex003
105   * @tc.desc: mutex function test
106   * @tc.type: FUNC
107   * @tc.require: AR000F868U
108   */
109 HWTEST_F(OsalTest, OsalGetMutex003, TestSize.Level3)
110 {
111     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_UNLOCK);
112 }
113 
114 /**
115   * @tc.name: OsalGetMutex004
116   * @tc.desc: mutex function test
117   * @tc.type: FUNC
118   * @tc.require: AR000F868U
119   */
120 HWTEST_F(OsalTest, OsalGetMutex004, TestSize.Level3)
121 {
122     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_LOCK_FOREVER);
123 }
124 
125 /**
126   * @tc.name: OsalGetMutex005
127   * @tc.desc: mutex function test
128   * @tc.type: FUNC
129   * @tc.require: AR000F868U
130   */
131 HWTEST_F(OsalTest, OsalGetMutex005, TestSize.Level3)
132 {
133     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_DESTROY);
134 }
135 
136 /**
137   * @tc.name: OsalGetMutex006
138   * @tc.desc: mutex function test
139   * @tc.type: FUNC
140   * @tc.require: AR000F868U
141   */
142 HWTEST_F(OsalTest, OsalGetMutex006, TestSize.Level3)
143 {
144     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_VISIT_DESTROY);
145 }
146 
147 /**
148   * @tc.name: OsalGetMutex007
149   * @tc.desc: mutex function test
150   * @tc.type: FUNC
151   * @tc.require: AR000F868U
152   */
153 HWTEST_F(OsalTest, OsalGetMutex007, TestSize.Level3)
154 {
155     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_STRESS_TEST);
156 }
157 
158 /**
159   * @tc.name: OsalGetMutex008
160   * @tc.desc: mutex function test
161   * @tc.type: FUNC
162   * @tc.require: AR000F868U
163   */
164 HWTEST_F(OsalTest, OsalGetMutex008, TestSize.Level3)
165 {
166     OSAL_TEST_FUNC_DEFINE(OSAL_MUTEX_OTHER);
167 }
168 
169 /**
170   * @tc.name: OsalGetSpin001
171   * @tc.desc: Spin function test
172   * @tc.type: FUNC
173   * @tc.require: AR000F8690
174   */
175 HWTEST_F(OsalTest, OsalGetSpin001, TestSize.Level3)
176 {
177     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_CREATE);
178 }
179 
180 /**
181   * @tc.name: OsalGetSpin002
182   * @tc.desc: Spin function test
183   * @tc.type: FUNC
184   * @tc.require: AR000F8690
185   */
186 HWTEST_F(OsalTest, OsalGetSpin002, TestSize.Level3)
187 {
188     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_LOCK);
189 }
190 
191 /**
192   * @tc.name: OsalGetSpin003
193   * @tc.desc: Spin function test
194   * @tc.type: FUNC
195   * @tc.require: AR000F8690
196   */
197 HWTEST_F(OsalTest, OsalGetSpin003, TestSize.Level3)
198 {
199     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_UNLOCK);
200 }
201 
202 /**
203   * @tc.name: OsalGetSpin004
204   * @tc.desc: Spin function test
205   * @tc.type: FUNC
206   * @tc.require: AR000F8690
207   */
208 HWTEST_F(OsalTest, OsalGetSpin004, TestSize.Level3)
209 {
210     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_LOCK_IRQ);
211 }
212 
213 /**
214   * @tc.name: OsalGetSpin005
215   * @tc.desc: Spin function test
216   * @tc.type: FUNC
217   * @tc.require: AR000F8690
218   */
219 HWTEST_F(OsalTest, OsalGetSpin005, TestSize.Level3)
220 {
221     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_UNLOCK_IRQ);
222 }
223 
224 /**
225   * @tc.name: OsalGetSpin006
226   * @tc.desc: Spin function test
227   * @tc.type: FUNC
228   * @tc.require: AR000F8690
229   */
230 HWTEST_F(OsalTest, OsalGetSpin006, TestSize.Level3)
231 {
232     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_LOCK_IRQ_SAVE);
233 }
234 
235 /**
236   * @tc.name: OsalGetSpin007
237   * @tc.desc: Spin function test
238   * @tc.type: FUNC
239   * @tc.require: AR000F8690
240   */
241 HWTEST_F(OsalTest, OsalGetSpin007, TestSize.Level3)
242 {
243     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_UNLOCK_IRQ_RESTORE);
244 }
245 
246 /**
247   * @tc.name: OsalGetSpin008
248   * @tc.desc: Spin function test
249   * @tc.type: FUNC
250   * @tc.require: AR000F8690
251   */
252 HWTEST_F(OsalTest, OsalGetSpin008, TestSize.Level3)
253 {
254     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_DESTROY);
255 }
256 
257 /**
258   * @tc.name: OsalGetSpin009
259   * @tc.desc: Spin function test
260   * @tc.type: FUNC
261   * @tc.require: AR000F8690
262   */
263 HWTEST_F(OsalTest, OsalGetSpin009, TestSize.Level3)
264 {
265     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_LOCK_AFTER_DESTROY);
266 }
267 
268 /**
269   * @tc.name: OsalGetSpin010
270   * @tc.desc: LOG function test
271   * @tc.type: FUNC
272   * @tc.require: AR000F8695
273   */
274 HWTEST_F(OsalTest, OsalGetSpin010, TestSize.Level3)
275 {
276     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_STRESS_TEST);
277 }
278 
279 /**
280   * @tc.name: OsalGetSpin011
281   * @tc.desc: LOG function test
282   * @tc.type: FUNC
283   * @tc.require: AR000F8695
284   */
285 HWTEST_F(OsalTest, OsalGetSpin011, TestSize.Level3)
286 {
287     OSAL_TEST_FUNC_DEFINE(OSAL_SPIN_OTHER);
288 }
289 
290 /**
291   * @tc.name: OsalGetTime001
292   * @tc.desc: time function test
293   * @tc.type: FUNC
294   * @tc.require: AR000F8696
295   */
296 HWTEST_F(OsalTest, OsalGetTime001, TestSize.Level3)
297 {
298     OSAL_TEST_FUNC_DEFINE(OSAL_TIME_SLEEP);
299 }
300 /**
301   * @tc.name: OsalGetTime002
302   * @tc.desc: time function test
303   * @tc.type: FUNC
304   * @tc.require: AR000F8696
305   */
306 HWTEST_F(OsalTest, OsalGetTime002, TestSize.Level3)
307 {
308     OSAL_TEST_FUNC_DEFINE(OSAL_TIME_MSLEEP);
309 }
310 /**
311   * @tc.name: OsalGetTime003
312   * @tc.desc: time function test
313   * @tc.type: FUNC
314   * @tc.require: AR000F8696
315   */
316 HWTEST_F(OsalTest, OsalGetTime003, TestSize.Level3)
317 {
318     OSAL_TEST_FUNC_DEFINE(OSAL_TIME_USLEEP);
319 }
320 /**
321   * @tc.name: OsalGetTime004
322   * @tc.desc: time function test
323   * @tc.type: FUNC
324   * @tc.require: AR000F8696
325   */
326 HWTEST_F(OsalTest, OsalGetTime004, TestSize.Level3)
327 {
328     OSAL_TEST_FUNC_DEFINE(OSAL_TIME_GETTIME);
329 }
330 /**
331   * @tc.name: OsalGetTime005
332   * @tc.desc: time function test
333   * @tc.type: FUNC
334   * @tc.require: AR000F8696
335   */
336 HWTEST_F(OsalTest, OsalGetTime005, TestSize.Level3)
337 {
338     OSAL_TEST_FUNC_DEFINE(OSAL_TIME_DIFFTIME);
339 }
340 
341 /**
342   * @tc.name: OsalGetIrq001
343   * @tc.desc: irq function test
344   * @tc.type: FUNC
345   * @tc.require: AR000F868Q
346   */
347 HWTEST_F(OsalTest, OsalGetIrq001, TestSize.Level3)
348 {
349     OSAL_TEST_FUNC_DEFINE(OSAL_IRQ_UNREG_ABNORMAL);
350 }
351 /**
352   * @tc.name: OsalGetIrq002
353   * @tc.desc: irq function test
354   * @tc.type: FUNC
355   * @tc.require: AR000F868Q
356   */
357 HWTEST_F(OsalTest, OsalGetIrq002, TestSize.Level3)
358 {
359     OSAL_TEST_FUNC_DEFINE(OSAL_IRQ_REG_NORMAL);
360 }
361 /**
362   * @tc.name: OsalGetIrq003
363   * @tc.desc: irq function test
364   * @tc.type: FUNC
365   * @tc.require: AR000F868Q
366   */
367 HWTEST_F(OsalTest, OsalGetIrq003, TestSize.Level3)
368 {
369     OSAL_TEST_FUNC_DEFINE(OSAL_IRQ_UNREG_NORMAL);
370 }
371 /**
372   * @tc.name: OsalGetIrq004
373   * @tc.desc: irq function test
374   * @tc.type: FUNC
375   * @tc.require: AR000F868Q
376   */
377 HWTEST_F(OsalTest, OsalGetIrq004, TestSize.Level3)
378 {
379     OSAL_TEST_FUNC_DEFINE(OSAL_IRQ_REG_NORMAL_STRESS);
380 }
381 /**
382   * @tc.name: OsalGetIrq005
383   * @tc.desc: irq function test
384   * @tc.type: FUNC
385   * @tc.require: AR000F868Q
386   */
387 HWTEST_F(OsalTest, OsalGetIrq005, TestSize.Level3)
388 {
389     OSAL_TEST_FUNC_DEFINE(OSAL_IRQ_UNREG_NORMAL_STRESS);
390 }
391 
392 /**
393   * @tc.name: OsalGetTimer001
394   * @tc.desc: timer function test
395   * @tc.type: FUNC
396   * @tc.require: AR000F868T
397   */
398 HWTEST_F(OsalTest, OsalGetTimer001, TestSize.Level3)
399 {
400     OSAL_TEST_FUNC_DEFINE(OSAL_TIMER_CREATE_ONCE);
401 }
402 /**
403   * @tc.name: OsalGetTimer002
404   * @tc.desc: timer function test
405   * @tc.type: FUNC
406   * @tc.require: AR000F868T
407   */
408 HWTEST_F(OsalTest, OsalGetTimer002, TestSize.Level3)
409 {
410     OSAL_TEST_FUNC_DEFINE(OSAL_TIMER_CREATE_LOOP);
411 }
412 /**
413   * @tc.name: OsalGetTimer003
414   * @tc.desc: timer function test
415   * @tc.type: FUNC
416   * @tc.require: AR000F868T
417   */
418 HWTEST_F(OsalTest, OsalGetTimer003, TestSize.Level3)
419 {
420     OSAL_TEST_FUNC_DEFINE(OSAL_TIMER_RUN_CHECK);
421 }
422 /**
423   * @tc.name: OsalGetTimer004
424   * @tc.desc: timer function test
425   * @tc.type: FUNC
426   * @tc.require: AR000F868T
427   */
428 HWTEST_F(OsalTest, OsalGetTimer004, TestSize.Level3)
429 {
430     OSAL_TEST_FUNC_DEFINE(OSAL_TIMER_PARA_CHECK);
431 }
432 /**
433   * @tc.name: OsalGetTimer005
434   * @tc.desc: timer function test
435   * @tc.type: FUNC
436   * @tc.require: AR000F868T
437   */
438 HWTEST_F(OsalTest, OsalGetTimer005, TestSize.Level3)
439 {
440     OSAL_TEST_FUNC_DEFINE(OSAL_TIMER_PERIOD_CHECK);
441 }
442 /**
443   * @tc.name: OsalGetTimer006
444   * @tc.desc: timer function test
445   * @tc.type: FUNC
446   * @tc.require: AR000F868T
447   */
448 HWTEST_F(OsalTest, OsalGetTimer006, TestSize.Level3)
449 {
450     OSAL_TEST_FUNC_DEFINE(OSAL_TIMER_MODIFY_CHECK);
451 }
452 /**
453   * @tc.name: OsalGetTimer007
454   * @tc.desc: timer function test
455   * @tc.type: FUNC
456   * @tc.require: AR000F868T
457   */
458 HWTEST_F(OsalTest, OsalGetTimer007, TestSize.Level3)
459 {
460     OSAL_TEST_FUNC_DEFINE(OSAL_TIMER_STOP_CHECK);
461 }
462 
463 /**
464   * @tc.name: OsalGetThread001
465   * @tc.desc: thread function test
466   * @tc.type: FUNC
467   * @tc.require: AR000F868S
468   */
469 HWTEST_F(OsalTest, OsalGetThread001, TestSize.Level3)
470 {
471     OSAL_TEST_FUNC_DEFINE(OSAL_THREAD_CREATE);
472 }
473 /**
474   * @tc.name: OsalGetThread002
475   * @tc.desc: thread function test
476   * @tc.type: FUNC
477   * @tc.require: AR000F868S
478   */
479 HWTEST_F(OsalTest, OsalGetThread002, TestSize.Level3)
480 {
481     OSAL_TEST_FUNC_DEFINE(OSAL_THREAD_PARA_CHECK);
482 }
483 /**
484   * @tc.name: OsalGetThread003
485   * @tc.desc: thread function test
486   * @tc.type: FUNC
487   * @tc.require: AR000F868S
488   */
489 HWTEST_F(OsalTest, OsalGetThread003, TestSize.Level3)
490 {
491     OSAL_TEST_FUNC_DEFINE(OSAL_THREAD_RUN_CHECK);
492 }
493 
494 /**
495   * @tc.name: OsalGetFW001
496   * @tc.desc: FW function test
497   * @tc.type: FUNC
498   * @tc.require: AR000F8693
499   */
500 HWTEST_F(OsalTest, OsalGetFW001, TestSize.Level3)
501 {
502     OSAL_TEST_FUNC_DEFINE(OSAL_FW_REQUEST);
503 }
504 /**
505   * @tc.name: OsalGetFW002
506   * @tc.desc: FW function test
507   * @tc.type: FUNC
508   * @tc.require: AR000F8693
509   */
510 HWTEST_F(OsalTest, OsalGetFW002, TestSize.Level3)
511 {
512     OSAL_TEST_FUNC_DEFINE(OSAL_FW_READ);
513 }
514 /**
515   * @tc.name: OsalGetFW003
516   * @tc.desc: FW function test
517   * @tc.type: FUNC
518   * @tc.require: AR000F8693
519   */
520 HWTEST_F(OsalTest, OsalGetFW003, TestSize.Level3)
521 {
522     OSAL_TEST_FUNC_DEFINE(OSAL_FW_DATA_CHECK);
523 }
524 /**
525   * @tc.name: OsalGetFW004
526   * @tc.desc: FW function test
527   * @tc.type: FUNC
528   * @tc.require: AR000F8693
529   */
530 HWTEST_F(OsalTest, OsalGetFW004, TestSize.Level3)
531 {
532     OSAL_TEST_FUNC_DEFINE(OSAL_FW_SEEK);
533 }
534 /**
535   * @tc.name: OsalGetFW005
536   * @tc.desc: FW function test
537   * @tc.type: FUNC
538   * @tc.require: AR000F8693
539   */
540 HWTEST_F(OsalTest, OsalGetFW005, TestSize.Level3)
541 {
542     OSAL_TEST_FUNC_DEFINE(OSAL_FW_RELEASE);
543 }
544 /**
545   * @tc.name: OsalGetFW006
546   * @tc.desc: FW function test
547   * @tc.type: FUNC
548   * @tc.require: AR000F8693
549   */
550 HWTEST_F(OsalTest, OsalGetFW006, TestSize.Level3)
551 {
552     OSAL_TEST_FUNC_DEFINE(OSAL_FW_READ_AFTER_RELEASE);
553 }
554 
555 /**
556   * @tc.name: OsalGetMemory001
557   * @tc.desc: memory function test
558   * @tc.type: FUNC
559   * @tc.require: AR000F868R
560   */
561 HWTEST_F(OsalTest, OsalGetMemory001, TestSize.Level3)
562 {
563     OSAL_TEST_FUNC_DEFINE(OSAL_MALLOC_BIG);
564 }
565 /**
566   * @tc.name: OsalGetMemory002
567   * @tc.desc: memory function test
568   * @tc.type: FUNC
569   * @tc.require: AR000F868R
570   */
571 HWTEST_F(OsalTest, OsalGetMemory002, TestSize.Level3)
572 {
573     OSAL_TEST_FUNC_DEFINE(OSAL_MALLOC_SMALL);
574 }
575 /**
576   * @tc.name: OsalGetMemory003
577   * @tc.desc: memory function test
578   * @tc.type: FUNC
579   * @tc.require: AR000F868R
580   */
581 HWTEST_F(OsalTest, OsalGetMemory003, TestSize.Level3)
582 {
583     OSAL_TEST_FUNC_DEFINE(OSAL_MALLOC_BIG_STRESS);
584 }
585 /**
586   * @tc.name: OsalGetMemory004
587   * @tc.desc: memory function test
588   * @tc.type: FUNC
589   * @tc.require: AR000F868R
590   */
591 HWTEST_F(OsalTest, OsalGetMemory004, TestSize.Level3)
592 {
593     OSAL_TEST_FUNC_DEFINE(OSAL_MALLOC_SMALL_STRESS);
594 }
595 
596 /**
597   * @tc.name: OsalGetList001
598   * @tc.desc: list function test
599   * @tc.type: FUNC
600   * @tc.require: SR000F868P
601   */
602 HWTEST_F(OsalTest, OsalGetList001, TestSize.Level3)
603 {
604     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_INIT);
605 }
606 /**
607   * @tc.name: OsalGetList002
608   * @tc.desc: list function test
609   * @tc.type: FUNC
610   * @tc.require: SR000F868P
611   */
612 HWTEST_F(OsalTest, OsalGetList002, TestSize.Level3)
613 {
614     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_EMPTY);
615 }
616 /**
617   * @tc.name: OsalGetList003
618   * @tc.desc: list function test
619   * @tc.type: FUNC
620   * @tc.require: SR000F868P
621   */
622 HWTEST_F(OsalTest, OsalGetList003, TestSize.Level3)
623 {
624     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_COUNT_CHECK);
625 }
626 /**
627   * @tc.name: OsalGetList004
628   * @tc.desc: list function test
629   * @tc.type: FUNC
630   * @tc.require: SR000F868P
631   */
632 HWTEST_F(OsalTest, OsalGetList004, TestSize.Level3)
633 {
634     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_TAIL);
635 }
636 /**
637   * @tc.name: OsalGetList005
638   * @tc.desc: list function test
639   * @tc.type: FUNC
640   * @tc.require: SR000F868P
641   */
642 HWTEST_F(OsalTest, OsalGetList005, TestSize.Level3)
643 {
644     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_HEAD);
645 }
646 /**
647   * @tc.name: OsalGetList006
648   * @tc.desc: list function test
649   * @tc.type: FUNC
650   * @tc.require: SR000F868P
651   */
652 HWTEST_F(OsalTest, OsalGetList006, TestSize.Level3)
653 {
654     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_REMOVE);
655 }
656 /**
657   * @tc.name: OsalGetList007
658   * @tc.desc: list function test
659   * @tc.type: FUNC
660   * @tc.require: SR000F868P
661   */
662 HWTEST_F(OsalTest, OsalGetList007, TestSize.Level3)
663 {
664     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_TRAVERSAL);
665 }
666 /**
667   * @tc.name: OsalGetList008
668   * @tc.desc: list function test
669   * @tc.type: FUNC
670   * @tc.require: SR000F868P
671   */
672 HWTEST_F(OsalTest, OsalGetList008, TestSize.Level3)
673 {
674     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_TRAVERSAL_REMOVE);
675 }
676 /**
677   * @tc.name: OsalGetList009
678   * @tc.desc: list function test
679   * @tc.type: FUNC
680   * @tc.require: SR000F868P
681   */
682 HWTEST_F(OsalTest, OsalGetList009, TestSize.Level3)
683 {
684     OSAL_TEST_FUNC_DEFINE(OSAL_LIST_STRESS);
685 }
686 
687 /**
688   * @tc.name: OsalGetSem001
689   * @tc.desc: sem function test
690   * @tc.type: FUNC
691   * @tc.require: AR000F868V
692   */
693 HWTEST_F(OsalTest, OsalGetSem001, TestSize.Level3)
694 {
695     OSAL_TEST_FUNC_DEFINE(OSAL_SEM_CREATE);
696 }
697 /**
698   * @tc.name: OsalGetSem002
699   * @tc.desc: sem function test
700   * @tc.type: FUNC
701   * @tc.require: AR000F868V
702   */
703 HWTEST_F(OsalTest, OsalGetSem002, TestSize.Level3)
704 {
705     OSAL_TEST_FUNC_DEFINE(OSAL_SEM_POST);
706 }
707 /**
708   * @tc.name: OsalGetSem003
709   * @tc.desc: sem function test
710   * @tc.type: FUNC
711   * @tc.require: AR000F868V
712   */
713 HWTEST_F(OsalTest, OsalGetSem003, TestSize.Level3)
714 {
715     OSAL_TEST_FUNC_DEFINE(OSAL_SEM_POST_RESULT);
716 }
717 /**
718   * @tc.name: OsalGetSem004
719   * @tc.desc: sem function test
720   * @tc.type: FUNC
721   * @tc.require: AR000F868V
722   */
723 HWTEST_F(OsalTest, OsalGetSem004, TestSize.Level3)
724 {
725     OSAL_TEST_FUNC_DEFINE(OSAL_SEM_WAIT_TIMEOUT);
726 }
727 /**
728   * @tc.name: OsalGetSem005
729   * @tc.desc: sem function test
730   * @tc.type: FUNC
731   * @tc.require: AR000F868V
732   */
733 HWTEST_F(OsalTest, OsalGetSem005, TestSize.Level3)
734 {
735     OSAL_TEST_FUNC_DEFINE(OSAL_SEM_WAIT_FOREVER);
736 }
737 /**
738   * @tc.name: OsalGetSem006
739   * @tc.desc: sem function test
740   * @tc.type: FUNC
741   * @tc.require: AR000F868V
742   */
743 HWTEST_F(OsalTest, OsalGetSem006, TestSize.Level3)
744 {
745     OSAL_TEST_FUNC_DEFINE(OSAL_SEM_DESTROY);
746 }
747 /**
748   * @tc.name: OsalGetSem007
749   * @tc.desc: sem function test
750   * @tc.type: FUNC
751   * @tc.require: AR000F868V
752   */
753 HWTEST_F(OsalTest, OsalGetSem007, TestSize.Level3)
754 {
755     OSAL_TEST_FUNC_DEFINE(OSAL_SEM_VISIT_AFTER_DESTROY);
756 }
757 
758 /**
759   * @tc.name: OsalGetWork001
760   * @tc.desc: work function test
761   * @tc.type: FUNC
762   * @tc.require: AR000F8692
763   */
764 HWTEST_F(OsalTest, OsalGetWork001, TestSize.Level3)
765 {
766     OSAL_TEST_FUNC_DEFINE(OSAL_WORK_QUEUE_CREATE);
767 }
768 /**
769   * @tc.name: OsalGetWork002
770   * @tc.desc: work function test
771   * @tc.type: FUNC
772   * @tc.require: AR000F8692
773   */
774 HWTEST_F(OsalTest, OsalGetWork002, TestSize.Level3)
775 {
776     OSAL_TEST_FUNC_DEFINE(OSAL_WORK_CREATE);
777 }
778 /**
779   * @tc.name: OsalGetWork003
780   * @tc.desc: work function test
781   * @tc.type: FUNC
782   * @tc.require: AR000F8692
783   */
784 HWTEST_F(OsalTest, OsalGetWork003, TestSize.Level3)
785 {
786     OSAL_TEST_FUNC_DEFINE(OSAL_DELAY_WORK_CREATE);
787 }
788 /**
789   * @tc.name: OsalGetWork004
790   * @tc.desc: work function test
791   * @tc.type: FUNC
792   * @tc.require: AR000F8692
793   */
794 HWTEST_F(OsalTest, OsalGetWork004, TestSize.Level3)
795 {
796     OSAL_TEST_FUNC_DEFINE(OSAL_WORK_ADD);
797 }
798 /**
799   * @tc.name: OsalGetWork005
800   * @tc.desc: work function test
801   * @tc.type: FUNC
802   * @tc.require: AR000F8692
803   */
804 HWTEST_F(OsalTest, OsalGetWork005, TestSize.Level3)
805 {
806     OSAL_TEST_FUNC_DEFINE(OSAL_DELAY_WORK_ADD);
807 }
808 /**
809   * @tc.name: OsalGetWork006
810   * @tc.desc: work function test
811   * @tc.type: FUNC
812   * @tc.require: AR000F8692
813   */
814 HWTEST_F(OsalTest, OsalGetWork006, TestSize.Level3)
815 {
816     OSAL_TEST_FUNC_DEFINE(OSAL_WORK_RUN_CHECK);
817 }
818 /**
819   * @tc.name: OsalGetWork007
820   * @tc.desc: work function test
821   * @tc.type: FUNC
822   * @tc.require: AR000F8692
823   */
824 HWTEST_F(OsalTest, OsalGetWork007, TestSize.Level3)
825 {
826     OSAL_TEST_FUNC_DEFINE(OSAL_DELAY_WORK_RUN_CHECK);
827 }
828 /**
829   * @tc.name: OsalGetWork008
830   * @tc.desc: work function test
831   * @tc.type: FUNC
832   * @tc.require: AR000F8692
833   */
834 HWTEST_F(OsalTest, OsalGetWork008, TestSize.Level3)
835 {
836     OSAL_TEST_FUNC_DEFINE(OSAL_WORK_CANCEL);
837 }
838 /**
839   * @tc.name: OsalGetWork009
840   * @tc.desc: work function test
841   * @tc.type: FUNC
842   * @tc.require: AR000F8692
843   */
844 HWTEST_F(OsalTest, OsalGetWork009, TestSize.Level3)
845 {
846     OSAL_TEST_FUNC_DEFINE(OSAL_DELAY_WORK_CANCEL);
847 }
848 
849 /**
850   * @tc.name: OsalGetAtomic001
851   * @tc.desc: atomic function test
852   * @tc.type: FUNC
853   * @tc.require: AR000F8691
854   */
855 HWTEST_F(OsalTest, OsalGetAtomic001, TestSize.Level3)
856 {
857     OSAL_TEST_FUNC_DEFINE(OSAL_ATOMIC_SET);
858 }
859 /**
860   * @tc.name: OsalGetAtomic002
861   * @tc.desc: atomic function test
862   * @tc.type: FUNC
863   * @tc.require: AR000F8691
864   */
865 HWTEST_F(OsalTest, OsalGetAtomic002, TestSize.Level3)
866 {
867     OSAL_TEST_FUNC_DEFINE(OSAL_ATOMIC_READ);
868 }
869 /**
870   * @tc.name: OsalGetAtomic003
871   * @tc.desc: atomic function test
872   * @tc.type: FUNC
873   * @tc.require: AR000F8691
874   */
875 HWTEST_F(OsalTest, OsalGetAtomic003, TestSize.Level3)
876 {
877     OSAL_TEST_FUNC_DEFINE(OSAL_ATOMIC_INC);
878 }
879 /**
880   * @tc.name: OsalGetAtomic004
881   * @tc.desc: atomic function test
882   * @tc.type: FUNC
883   * @tc.require: AR000F8691
884   */
885 HWTEST_F(OsalTest, OsalGetAtomic004, TestSize.Level3)
886 {
887     OSAL_TEST_FUNC_DEFINE(OSAL_ATOMIC_DEC);
888 }
889 
890 /**
891   * @tc.name: OsalGetBits001
892   * @tc.desc: bits function test
893   * @tc.type: FUNC
894   * @tc.require: AR000F8691
895   */
896 HWTEST_F(OsalTest, OsalGetBits001, TestSize.Level3)
897 {
898     OSAL_TEST_FUNC_DEFINE(OSAL_TEST_BIT);
899 }
900 /**
901   * @tc.name: OsalGetBits002
902   * @tc.desc: bits function test
903   * @tc.type: FUNC
904   * @tc.require: AR000F8691
905   */
906 HWTEST_F(OsalTest, OsalGetBits002, TestSize.Level3)
907 {
908     OSAL_TEST_FUNC_DEFINE(OSAL_TEST_SET_BIT);
909 }
910 /**
911   * @tc.name: OsalGetBits003
912   * @tc.desc: bits function test
913   * @tc.type: FUNC
914   * @tc.require: AR000F8691
915   */
916 HWTEST_F(OsalTest, OsalGetBits003, TestSize.Level3)
917 {
918     OSAL_TEST_FUNC_DEFINE(OSAL_TEST_CLR_BIT);
919 }
920 /**
921   * @tc.name: OsalGetBits004
922   * @tc.desc: bits function test
923   * @tc.type: FUNC
924   * @tc.require: AR000F8691
925   */
926 HWTEST_F(OsalTest, OsalGetBits004, TestSize.Level3)
927 {
928     OSAL_TEST_FUNC_DEFINE(OSAL_CLR_BIT);
929 }
930 
931 /**
932   * @tc.name: OsalGetFile001
933   * @tc.desc: file function test
934   * @tc.type: FUNC
935   * @tc.require: AR000F8694
936   */
937 HWTEST_F(OsalTest, OsalGetFile001, TestSize.Level3)
938 {
939     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_OPEN_RD);
940 }
941 /**
942   * @tc.name: OsalGetFile002
943   * @tc.desc: file function test
944   * @tc.type: FUNC
945   * @tc.require: AR000F8694
946   */
947 HWTEST_F(OsalTest, OsalGetFile002, TestSize.Level3)
948 {
949     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_READ_RD);
950 }
951 /**
952   * @tc.name: OsalGetFile003
953   * @tc.desc: file function test
954   * @tc.type: FUNC
955   * @tc.require: AR000F8694
956   */
957 HWTEST_F(OsalTest, OsalGetFile003, TestSize.Level3)
958 {
959     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_WRITE_RD);
960 }
961 /**
962   * @tc.name: OsalGetFile004
963   * @tc.desc: file function test
964   * @tc.type: FUNC
965   * @tc.require: AR000F8694
966   */
967 HWTEST_F(OsalTest, OsalGetFile004, TestSize.Level3)
968 {
969     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_SEEK_RD);
970 }
971 /**
972   * @tc.name: OsalGetFile005
973   * @tc.desc: file function test
974   * @tc.type: FUNC
975   * @tc.require: AR000F8694
976   */
977 HWTEST_F(OsalTest, OsalGetFile005, TestSize.Level3)
978 {
979     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_CLOSE_RD);
980 }
981 /**
982   * @tc.name: OsalGetFile006
983   * @tc.desc: file function test
984   * @tc.type: FUNC
985   * @tc.require: AR000F8694
986   */
987 HWTEST_F(OsalTest, OsalGetFile006, TestSize.Level3)
988 {
989     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_OPEN_RDWR);
990 }
991 /**
992   * @tc.name: OsalGetFile007
993   * @tc.desc: file function test
994   * @tc.type: FUNC
995   * @tc.require: AR000F8694
996   */
997 HWTEST_F(OsalTest, OsalGetFile007, TestSize.Level3)
998 {
999     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_READ_RDWR);
1000 }
1001 /**
1002   * @tc.name: OsalGetFile008
1003   * @tc.desc: file function test
1004   * @tc.type: FUNC
1005   * @tc.require: AR000F8694
1006   */
1007 HWTEST_F(OsalTest, OsalGetFile008, TestSize.Level3)
1008 {
1009     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_WRITE_RDWR);
1010 }
1011 /**
1012   * @tc.name: OsalGetFile009
1013   * @tc.desc: file function test
1014   * @tc.type: FUNC
1015   * @tc.require: AR000F8694
1016   */
1017 HWTEST_F(OsalTest, OsalGetFile009, TestSize.Level3)
1018 {
1019     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_SEEK_RDWR);
1020 }
1021 /**
1022   * @tc.name: OsalGetFile010
1023   * @tc.desc: file function test
1024   * @tc.type: FUNC
1025   * @tc.require: AR000F8694
1026   */
1027 HWTEST_F(OsalTest, OsalGetFile010, TestSize.Level3)
1028 {
1029     OSAL_TEST_FUNC_DEFINE(OSAL_FILE_CLOSE_RDWR);
1030 }
1031 
1032 /**
1033   * @tc.name: OsalGetAll001
1034   * @tc.desc: all function test
1035   * @tc.type: FUNC
1036   * @tc.require: SR000F868P
1037   */
1038 HWTEST_F(OsalTest, OsalGetAll001, TestSize.Level3)
1039 {
1040     OSAL_TEST_FUNC_DEFINE(OSAL_TEST_ALL);
1041 }
1042