1 /* 2 * Copyright (c) 2020-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_sdio_entry_test.h" 10 #include "hdf_log.h" 11 #include "sdio_if.h" 12 #include "sdio_test.h" 13 14 #define HDF_LOG_TAG hdf_sdio_entry_test 15 HdfSdioUnitTestEntry(HdfTestMsg * msg)16int32_t HdfSdioUnitTestEntry(HdfTestMsg *msg) 17 { 18 struct SdioTester *tester = NULL; 19 20 if (msg == NULL) { 21 HDF_LOGE("HdfSdioUnitTestEntry: msg is null!"); 22 return HDF_FAILURE; 23 } 24 tester = GetSdioTest(); 25 if (tester == NULL || tester->TestEntry == NULL) { 26 HDF_LOGE("HdfSdioUnitTestEntry: tester or TestEntry is null!"); 27 msg->result = HDF_FAILURE; 28 return HDF_FAILURE; 29 } 30 msg->result = tester->TestEntry(tester, msg->subCmd); 31 return msg->result; 32 } 33