From 1ead8d9d28af329286d884b64a318c40e2909898 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sat, 29 Jun 2013 13:49:13 -0700 Subject: [PATCH] TESTS: Some targets just discard a command with "unexpected" r/w flags Set timeout for the read10 invalid test for a read10 with w flag set and fail the test if we have not received any reply at all within 3 seconds. --- test-tool/test_read10_invalid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test-tool/test_read10_invalid.c b/test-tool/test_read10_invalid.c index d7e0afd..a92a96d 100644 --- a/test-tool/test_read10_invalid.c +++ b/test-tool/test_read10_invalid.c @@ -239,7 +239,10 @@ test_read10_invalid(void) data.size = sizeof(buf); data.data = (unsigned char *)&buf[0]; + iscsi_set_noautoreconnect(iscsic, 1); + iscsi_set_timeout(iscsic, 3); task_ret = iscsi_scsi_command_sync(iscsic, tgt_lun, task, &data); + iscsi_set_noautoreconnect(iscsic, 0); CU_ASSERT_PTR_NOT_NULL(task_ret); logging(LOG_VERBOSE, "Verify that the target returned SUCCESS"); @@ -250,4 +253,5 @@ test_read10_invalid(void) CU_ASSERT_EQUAL(task->status, SCSI_STATUS_GOOD); scsi_free_scsi_task(task); task = NULL; + }