1 /* 2 * Copyright (c) 2021-2023 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 "hdf_i2s_entry_test.h" 10 #include "hdf_log.h" 11 #include "i2s_test.h" 12 13 #define HDF_LOG_TAG hdf_i2s_entry_test 14 HdfI2sUnitTestEntry(HdfTestMsg * msg)15int32_t HdfI2sUnitTestEntry(HdfTestMsg *msg) 16 { 17 struct I2sTest *test = NULL; 18 19 HDF_LOGE("HdfI2sUnitTestEntry: enter!\n"); 20 21 if (msg == NULL) { 22 HDF_LOGE("HdfI2sUnitTestEntry: msg is null!"); 23 return HDF_FAILURE; 24 } 25 test = GetI2sTest(); 26 if (test == NULL || test->TestEntry == NULL) { 27 HDF_LOGE("HdfI2sUnitTestEntry: tester or TestEntry is null!\n"); 28 msg->result = HDF_FAILURE; 29 return HDF_FAILURE; 30 } 31 msg->result = test->TestEntry(test, msg->subCmd); 32 return msg->result; 33 } 34