From 7924ae5385571476ead04f65c9cfec845ee41246 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sat, 19 Sep 2015 15:52:44 -0700 Subject: [PATCH] TEST: Skip CompareAndWrite DPO/FUA test early if the opcode is not supported. Signed-off-by: Ronnie Sahlberg --- test-tool/test_compareandwrite_dpofua.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test-tool/test_compareandwrite_dpofua.c b/test-tool/test_compareandwrite_dpofua.c index effff44..329aca8 100644 --- a/test-tool/test_compareandwrite_dpofua.c +++ b/test-tool/test_compareandwrite_dpofua.c @@ -74,13 +74,17 @@ test_compareandwrite_dpofua(void) ret = compareandwrite(sd, 0, buf, 2 * block_size, block_size, 0, 1, 0, 0, EXPECT_STATUS_GOOD); - CU_ASSERT_EQUAL(ret, 0); } else { ret = compareandwrite(sd, 0, buf, 2 * block_size, block_size, 0, 1, 0, 0, EXPECT_INVALID_FIELD_IN_CDB); - CU_ASSERT_EQUAL(ret, 0); } + if (ret == -2) { + logging(LOG_NORMAL, "[SKIPPED] REPORT_SUPPORTED_OPCODES not " + "implemented. Skipping this part of the test"); + return; + } + CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Test COMPAREANDWRITE with FUA==1"); if (dpofua) {