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 #ifndef OSAL_TEST_CASE_DEF_H 10 #define OSAL_TEST_CASE_DEF_H 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif /* __cplusplus */ 15 16 enum HdfOsalTestCaseCmd { 17 OSAL_TEST_START, 18 OSAL_MUTEX_CREATE, 19 OSAL_MUTEX_LOCK_TIMEOUT, 20 OSAL_MUTEX_UNLOCK, 21 OSAL_MUTEX_LOCK_FOREVER, 22 OSAL_MUTEX_DESTROY, 23 OSAL_MUTEX_VISIT_DESTROY, 24 OSAL_MUTEX_STRESS_TEST, 25 OSAL_MUTEX_OTHER, 26 OSAL_SPIN_CREATE, 27 OSAL_SPIN_LOCK, 28 OSAL_SPIN_UNLOCK, 29 OSAL_SPIN_LOCK_IRQ, 30 OSAL_SPIN_UNLOCK_IRQ, 31 OSAL_SPIN_LOCK_IRQ_SAVE, 32 OSAL_SPIN_UNLOCK_IRQ_RESTORE, 33 OSAL_SPIN_DESTROY, 34 OSAL_SPIN_LOCK_AFTER_DESTROY, 35 OSAL_SPIN_STRESS_TEST, 36 OSAL_SPIN_OTHER, 37 OSAL_TIME_SLEEP, 38 OSAL_TIME_MSLEEP, 39 OSAL_TIME_USLEEP, 40 OSAL_TIME_GETTIME, 41 OSAL_TIME_DIFFTIME, 42 OSAL_IRQ_UNREG_ABNORMAL, 43 OSAL_IRQ_REG_NORMAL, 44 OSAL_IRQ_UNREG_NORMAL, 45 OSAL_IRQ_REG_NORMAL_STRESS, 46 OSAL_IRQ_UNREG_NORMAL_STRESS, 47 OSAL_TIMER_CREATE_ONCE, 48 OSAL_TIMER_CREATE_LOOP, 49 OSAL_TIMER_RUN_CHECK, 50 OSAL_TIMER_PARA_CHECK, 51 OSAL_TIMER_PERIOD_CHECK, 52 OSAL_TIMER_MODIFY_CHECK, 53 OSAL_TIMER_STOP_CHECK, 54 OSAL_THREAD_CREATE, 55 OSAL_THREAD_PARA_CHECK, 56 OSAL_THREAD_RUN_CHECK, 57 OSAL_FW_REQUEST, 58 OSAL_FW_READ, 59 OSAL_FW_DATA_CHECK, 60 OSAL_FW_SEEK, 61 OSAL_FW_RELEASE, 62 OSAL_FW_READ_AFTER_RELEASE, 63 OSAL_MALLOC_BIG, 64 OSAL_MALLOC_SMALL, 65 OSAL_MALLOC_BIG_STRESS, 66 OSAL_MALLOC_SMALL_STRESS, 67 OSAL_LIST_INIT, 68 OSAL_LIST_EMPTY, 69 OSAL_LIST_COUNT_CHECK, 70 OSAL_LIST_TAIL, 71 OSAL_LIST_HEAD, 72 OSAL_LIST_REMOVE, 73 OSAL_LIST_TRAVERSAL, 74 OSAL_LIST_TRAVERSAL_REMOVE, 75 OSAL_LIST_STRESS, 76 OSAL_SEM_CREATE, 77 OSAL_SEM_POST, 78 OSAL_SEM_POST_RESULT, 79 OSAL_SEM_WAIT_TIMEOUT, 80 OSAL_SEM_WAIT_FOREVER, 81 OSAL_SEM_DESTROY, 82 OSAL_SEM_VISIT_AFTER_DESTROY, 83 OSAL_WORK_QUEUE_CREATE, 84 OSAL_WORK_CREATE, 85 OSAL_DELAY_WORK_CREATE, 86 OSAL_WORK_ADD, 87 OSAL_DELAY_WORK_ADD, 88 OSAL_WORK_RUN_CHECK, 89 OSAL_DELAY_WORK_RUN_CHECK, 90 OSAL_WORK_CANCEL, 91 OSAL_DELAY_WORK_CANCEL, 92 OSAL_ATOMIC_SET, 93 OSAL_ATOMIC_READ, 94 OSAL_ATOMIC_INC, 95 OSAL_ATOMIC_DEC, 96 OSAL_TEST_BIT, 97 OSAL_TEST_SET_BIT, 98 OSAL_TEST_CLR_BIT, 99 OSAL_CLR_BIT, 100 OSAL_FILE_OPEN_RD, 101 OSAL_FILE_READ_RD, 102 OSAL_FILE_WRITE_RD, 103 OSAL_FILE_SEEK_RD, 104 OSAL_FILE_CLOSE_RD, 105 OSAL_FILE_OPEN_RDWR, 106 OSAL_FILE_READ_RDWR, 107 OSAL_FILE_WRITE_RDWR, 108 OSAL_FILE_SEEK_RDWR, 109 OSAL_FILE_CLOSE_RDWR, 110 OSAL_TEST_OTHER, 111 OSAL_TEST_ALL, 112 OSAL_TEST_END, 113 OSAL_TEST_MAX, 114 }; 115 #define TEST_FILE_PATH_NAME "/storage/hdf.txt" 116 #if defined(__KERNEL__) 117 #define TEST_FW_PATH_NAME "/lib/firmware/hdf_fw.img" 118 #define TEST_FW_NAME "hdf_fw.img" 119 #else 120 #define TEST_FW_PATH_NAME "/storage/hdf_fw.img" 121 #endif 122 #ifdef __cplusplus 123 } 124 #endif /* __cplusplus */ 125 126 #endif /* OSAL_TEST_CASE_DEF_H */ 127