From bb6abd8c6bead38705ba73ba9d7134161896a193 Mon Sep 17 00:00:00 2001 From: vcbchang Date: Sat, 26 Jun 2021 15:16:29 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BF=A1=E5=8F=B7=E7=AE=A1=E9=81=93?= =?UTF-8?q?=E7=94=A8=E4=BE=8BItPosixPipe005=E7=94=B1=E4=BA=8E=E5=81=B6?= =?UTF-8?q?=E7=8E=B0=E6=80=A7=E9=97=AE=E9=A2=98=E6=9A=82=E6=97=B6=E4=B8=8B?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【背景】信号管道用例ItPosixPipe005偶尔会失败,经查找,发现是CPU调度所致,延时时间与期望调度不符合,增加延时时间即可 【修改方案】修复了此问题,但是考虑pipe用例整体不稳定,并且pipe用例的pipe函数存在问题,先暂时下线,等pipe部分全部修改完毕后再上线。 re #I3XXPH Signed-off-by: vcbchang Change-Id: I21831c9f5ef5700f3b3c8da02f945e0c37f31a6a --- testsuites/unittest/signal/BUILD.gn | 3 ++- .../signal/{smoke => full}/pipe_test_005.cpp | 2 +- testsuites/unittest/signal/signal_test.cpp | 22 +++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) rename testsuites/unittest/signal/{smoke => full}/pipe_test_005.cpp (97%) diff --git a/testsuites/unittest/signal/BUILD.gn b/testsuites/unittest/signal/BUILD.gn index d157f594..cf3c76dd 100644 --- a/testsuites/unittest/signal/BUILD.gn +++ b/testsuites/unittest/signal/BUILD.gn @@ -51,7 +51,7 @@ sources_smoke = [ "smoke/mkfifo_test_002.cpp", "smoke/pipe_test_002.cpp", "smoke/pipe_test_004.cpp", - "smoke/pipe_test_005.cpp", + "smoke/signal_test_002.cpp", "smoke/signal_test_009.cpp", "smoke/signal_test_013.cpp", @@ -107,6 +107,7 @@ sources_full = [ "full/It_ipc_pipe_003.cpp", "full/pipe_test_001.cpp", "full/pipe_test_003.cpp", + "full/pipe_test_005.cpp", "full/pipe_test_006.cpp", ] diff --git a/testsuites/unittest/signal/smoke/pipe_test_005.cpp b/testsuites/unittest/signal/full/pipe_test_005.cpp similarity index 97% rename from testsuites/unittest/signal/smoke/pipe_test_005.cpp rename to testsuites/unittest/signal/full/pipe_test_005.cpp index 4d9802b5..f17964ef 100644 --- a/testsuites/unittest/signal/smoke/pipe_test_005.cpp +++ b/testsuites/unittest/signal/full/pipe_test_005.cpp @@ -74,7 +74,7 @@ static int PipecommonWrite() exit(errno); } } - usleep(15000); // 15000, Used to calculate the delay time. + usleep(150000); // 150000, Used to calculate the delay time. } exit(0); } else { diff --git a/testsuites/unittest/signal/signal_test.cpp b/testsuites/unittest/signal/signal_test.cpp index 5fc18d45..959457a5 100644 --- a/testsuites/unittest/signal/signal_test.cpp +++ b/testsuites/unittest/signal/signal_test.cpp @@ -218,17 +218,6 @@ HWTEST_F(SignalTest, ItPosixPipe002, TestSize.Level0) ItPosixPipe002(); } -/* * - * @tc.name: ItPosixPipe005 - * @tc.desc: function for SignalTest - * @tc.type: FUNC - * @tc.require: AR000EEMQ9 - */ -HWTEST_F(SignalTest, ItPosixPipe005, TestSize.Level0) -{ - ItPosixPipe005(); -} - /* * * @tc.name: ItPosixMkfifo002 * @tc.desc: function for SignalTest @@ -638,6 +627,17 @@ HWTEST_F(SignalTest, ItPosixPipe003, TestSize.Level0) ItPosixPipe003(); } +/* * + * @tc.name: ItPosixPipe005 + * @tc.desc: function for SignalTest + * @tc.type: FUNC + * @tc.require: AR000EEMQ9 + */ +HWTEST_F(SignalTest, ItPosixPipe005, TestSize.Level0) +{ + ItPosixPipe005(); +} + /* * * @tc.name: ItPosixPipe006 * @tc.desc: function for SignalTest