From 227489d32bf4fad520af2f6713a0fcae011e1c14 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Fri, 26 Apr 2013 18:01:04 -0700 Subject: [PATCH] TESTS: fix PREFETCH10/16 tests --- test-tool/test_prefetch10_0blocks.c | 5 +++-- test-tool/test_prefetch10_beyond_eol.c | 5 +++-- test-tool/test_prefetch10_flags.c | 5 +++++ test-tool/test_prefetch10_simple.c | 5 +++-- test-tool/test_prefetch16_0blocks.c | 5 +++-- test-tool/test_prefetch16_beyond_eol.c | 5 +++-- test-tool/test_prefetch16_flags.c | 5 +++++ test-tool/test_prefetch16_simple.c | 5 +++-- 8 files changed, 28 insertions(+), 12 deletions(-) diff --git a/test-tool/test_prefetch10_0blocks.c b/test-tool/test_prefetch10_0blocks.c index 2ac46c1..43c076a 100644 --- a/test-tool/test_prefetch10_0blocks.c +++ b/test-tool/test_prefetch10_0blocks.c @@ -33,9 +33,10 @@ test_prefetch10_0blocks(void) ret = prefetch10(iscsic, tgt_lun, 0, 0, 0, 0); if (ret == -2) { - CU_PASS("[SKIPPED] Target does not support PREFETCH10. Skipping test"); + logging(LOG_NORMAL, "[SKIPPED] PREFETCH10 is not implemented."); + CU_PASS("PREFETCH10 is not implemented."); return; - } + } CU_ASSERT_EQUAL(ret, 0); if (num_blocks > 0x80000000) { diff --git a/test-tool/test_prefetch10_beyond_eol.c b/test-tool/test_prefetch10_beyond_eol.c index 1a689c7..6c90c09 100644 --- a/test-tool/test_prefetch10_beyond_eol.c +++ b/test-tool/test_prefetch10_beyond_eol.c @@ -40,9 +40,10 @@ test_prefetch10_beyond_eol(void) ret = prefetch10_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1 - i, i, 0, 0); if (ret == -2) { - CU_PASS("[SKIPPED] Target does not support PREFETCH10. Skipping test"); + logging(LOG_NORMAL, "[SKIPPED] PREFETCH10 is not implemented."); + CU_PASS("PREFETCH10 is not implemented."); return; - } + } CU_ASSERT_EQUAL(ret, 0); } diff --git a/test-tool/test_prefetch10_flags.c b/test-tool/test_prefetch10_flags.c index 361ee45..93396f2 100644 --- a/test-tool/test_prefetch10_flags.c +++ b/test-tool/test_prefetch10_flags.c @@ -36,6 +36,11 @@ test_prefetch10_flags(void) logging(LOG_VERBOSE, "Test PREFETCH10 with IMMED==1"); ret = prefetch10(iscsic, tgt_lun, 0, 1, 1, 0); + if (ret == -2) { + logging(LOG_NORMAL, "[SKIPPED] PREFETCH10 is not implemented."); + CU_PASS("PREFETCH10 is not implemented."); + return; + } CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Test PREFETCH10 with GROUP==3"); diff --git a/test-tool/test_prefetch10_simple.c b/test-tool/test_prefetch10_simple.c index 3dc0218..90dc6c0 100644 --- a/test-tool/test_prefetch10_simple.c +++ b/test-tool/test_prefetch10_simple.c @@ -35,9 +35,10 @@ test_prefetch10_simple(void) for (i = 1; i <= 256; i++) { ret = prefetch10(iscsic, tgt_lun, 0, i, 0, 0); if (ret == -2) { - CU_PASS("[SKIPPED] Target does not support PREFETCH10. Skipping test"); + logging(LOG_NORMAL, "[SKIPPED] PREFETCH10 is not implemented."); + CU_PASS("PREFETCH10 is not implemented."); return; - } + } CU_ASSERT_EQUAL(ret, 0); } diff --git a/test-tool/test_prefetch16_0blocks.c b/test-tool/test_prefetch16_0blocks.c index d5ae0ca..e55d13d 100644 --- a/test-tool/test_prefetch16_0blocks.c +++ b/test-tool/test_prefetch16_0blocks.c @@ -33,9 +33,10 @@ test_prefetch16_0blocks(void) ret = prefetch16(iscsic, tgt_lun, 0, 0, 0, 0); if (ret == -2) { - CU_PASS("[SKIPPED] Target does not support PREFETCH16. Skipping test"); + logging(LOG_NORMAL, "[SKIPPED] PREFETCH16 is not implemented."); + CU_PASS("PREFETCH16 is not implemented."); return; - } + } CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Test PREFETCH16 0-blocks one block past end-of-LUN"); diff --git a/test-tool/test_prefetch16_beyond_eol.c b/test-tool/test_prefetch16_beyond_eol.c index df5e8fc..d74489d 100644 --- a/test-tool/test_prefetch16_beyond_eol.c +++ b/test-tool/test_prefetch16_beyond_eol.c @@ -35,9 +35,10 @@ test_prefetch16_beyond_eol(void) ret = prefetch16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1 - i, i, 0, 0); if (ret == -2) { - CU_PASS("[SKIPPED] Target does not support PREFETCH16. Skipping test"); + logging(LOG_NORMAL, "[SKIPPED] PREFETCH16 is not implemented."); + CU_PASS("PREFETCH16 is not implemented."); return; - } + } CU_ASSERT_EQUAL(ret, 0); } diff --git a/test-tool/test_prefetch16_flags.c b/test-tool/test_prefetch16_flags.c index a94d940..7240bde 100644 --- a/test-tool/test_prefetch16_flags.c +++ b/test-tool/test_prefetch16_flags.c @@ -36,6 +36,11 @@ test_prefetch16_flags(void) logging(LOG_VERBOSE, "Test PREFETCH16 with IMMED==1"); ret = prefetch16(iscsic, tgt_lun, 0, 1, 1, 0); + if (ret == -2) { + logging(LOG_NORMAL, "[SKIPPED] PREFETCH16 is not implemented."); + CU_PASS("PREFETCH16 is not implemented."); + return; + } CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Test PREFETCH16 with GROUP==3"); diff --git a/test-tool/test_prefetch16_simple.c b/test-tool/test_prefetch16_simple.c index 81a2b1f..dab69de 100644 --- a/test-tool/test_prefetch16_simple.c +++ b/test-tool/test_prefetch16_simple.c @@ -35,9 +35,10 @@ test_prefetch16_simple(void) for (i = 1; i <= 256; i++) { ret = prefetch16(iscsic, tgt_lun, 0, i, 0, 0); if (ret == -2) { - CU_PASS("[SKIPPED] Target does not support PREFETCH16. Skipping test"); + logging(LOG_NORMAL, "[SKIPPED] PREFETCH16 is not implemented."); + CU_PASS("PREFETCH16 is not implemented."); return; - } + } CU_ASSERT_EQUAL(ret, 0); }