From 080cccb08ae787271e67c125ff242f2c203c52e1 Mon Sep 17 00:00:00 2001 From: propelluo Date: Thu, 11 Dec 2025 16:11:47 +0800 Subject: [PATCH 1/2] update the submodule and skip the blocked test cases Signed-off-by: propelluo --- testcase/block/block-011.sh | 3 ++- testcase/block/block-040.sh | 1 + tst-open-blktests | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/testcase/block/block-011.sh b/testcase/block/block-011.sh index a541b96..2fd4df3 100755 --- a/testcase/block/block-011.sh +++ b/testcase/block/block-011.sh @@ -3,7 +3,7 @@ # @用例ID: 20251210-171538-994426040 # @用例名称: block-011 # @用例级别: 3 -# @用例标签: +# @用例标签: 待分析 # @扩展属性: # @用例类型: 功能测试 # @自动化: 1 @@ -27,6 +27,7 @@ tc_setup() { msg "this is tc_setup" # @预置条件: + skip_test "test case block in the virtual machine" return 0 } diff --git a/testcase/block/block-040.sh b/testcase/block/block-040.sh index 0ae570f..f586c6d 100755 --- a/testcase/block/block-040.sh +++ b/testcase/block/block-040.sh @@ -27,6 +27,7 @@ tc_setup() { msg "this is tc_setup" # @预置条件: + skip_test "test case block in the physical machine" return 0 } diff --git a/tst-open-blktests b/tst-open-blktests index 83597d5..1b5d45d 160000 --- a/tst-open-blktests +++ b/tst-open-blktests @@ -1 +1 @@ -Subproject commit 83597d5a973b94ff883971d239c22deb223c8cfa +Subproject commit 1b5d45d9ebd44a1db39c4fe55f1514cd01886f19 -- Gitee From a09b6ccc1fa7f3176baef7394a984f227e059ddb Mon Sep 17 00:00:00 2001 From: propelluo Date: Fri, 12 Dec 2025 11:14:14 +0800 Subject: [PATCH 2/2] when there is no measurable equipment, resulting in no output after the test case is executed, use skip_test to handle it Signed-off-by: propelluo --- lib/ts_common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ts_common.sh b/lib/ts_common.sh index 6fe5782..b318f73 100644 --- a/lib/ts_common.sh +++ b/lib/ts_common.sh @@ -65,8 +65,12 @@ run_one() { msg "${output}" # Analyze the results - # Priority: [failed] > [not run] > [passed] - if echo "$output" | grep -q '\[failed\]'; then + # Priority: [failed] > [not run] > [passed] > empty output + # Check for empty output first (no test device available) + if [[ -z "$output" ]] || [[ -z "$(echo "$output" | tr -d '[:space:]')" ]]; then + msg "Result: skip test (no output, possibly no test device available)" + skip_test "Test case ${test_case} skipped: no output (no test device available)" + elif echo "$output" | grep -q '\[failed\]'; then msg "Result: test fail" return 1 elif echo "$output" | grep -q '\[not run\]'; then -- Gitee