diff --git a/lib/ts_common.sh b/lib/ts_common.sh index 6fe5782c5896ba81052714231b2839e84ecc22ed..b318f7384c0428bc79c791cdffa3f3f8da5937b0 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 diff --git a/testcase/block/block-011.sh b/testcase/block/block-011.sh index a541b9698b5461c971c2c929ab606c154b272790..2fd4df3ee76ba2a0214ffc0cec010e812b734d5d 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 0ae570fe6546d0bdcb8da63fd54833825ac97c90..f586c6dc6facb6ec1dbcbc64614e65f7cbdc0faf 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 83597d5a973b94ff883971d239c22deb223c8cfa..1b5d45d9ebd44a1db39c4fe55f1514cd01886f19 160000 --- a/tst-open-blktests +++ b/tst-open-blktests @@ -1 +1 @@ -Subproject commit 83597d5a973b94ff883971d239c22deb223c8cfa +Subproject commit 1b5d45d9ebd44a1db39c4fe55f1514cd01886f19