1 /* 2 * Copyright (c) 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 "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("%s: \n", __func__); 20 21 if (msg == NULL) { 22 return HDF_FAILURE; 23 } 24 test = GetI2sTest(); 25 if (test == NULL || test->TestEntry == NULL) { 26 HDF_LOGE("%s: tester is NULL!\n", __func__); 27 msg->result = HDF_FAILURE; 28 return HDF_FAILURE; 29 } 30 msg->result = test->TestEntry(test, msg->subCmd); 31 return msg->result; 32 } 33