From 49c78ba9369229c1fe6b0828609d3508967d5d97 Mon Sep 17 00:00:00 2001 From: jiaziyang Date: Mon, 26 Jul 2021 18:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9uart=5Ftest.c=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=9C=A8UartRead=E4=B8=AD=E5=85=88=E8=AE=BE=E7=BD=AEU?= =?UTF-8?q?art=E4=BC=A0=E8=BE=93=E6=A8=A1=E5=BC=8F=E4=B8=BA=E9=9D=9E?= =?UTF-8?q?=E9=98=BB=E5=A1=9E=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jiaziyang --- test/unittest/platform/common/uart_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unittest/platform/common/uart_test.c b/test/unittest/platform/common/uart_test.c index ea7f59ffc..7700323b3 100644 --- a/test/unittest/platform/common/uart_test.c +++ b/test/unittest/platform/common/uart_test.c @@ -35,6 +35,10 @@ static int32_t UartWriteTest(struct UartTest *test) static int32_t UartReadTest(struct UartTest *test) { + if (UartSetTransMode(test->handle, UART_MODE_RD_NONBLOCK) != HDF_SUCCESS) { + HDF_LOGE("%s: error", __func__); + return HDF_FAILURE; + } if (UartRead(test->handle, test->rbuf, test->len) != 0) { HDF_LOGE("%s: error", __func__); return HDF_FAILURE; -- Gitee