From 9826147581e94d1f6cc640ff897f883946b99c14 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 31 Aug 2015 14:48:59 -0700 Subject: [PATCH] test_extendedcopy_descr_limits: Fix a crash if this command is not supported Avoid that this test crashes as follows if the RECEIVE COPY RESULTS command is not supported: [FAILED] RECEIVECOPYRESULT command failed with sense. (null) Segmentation fault Signed-off-by: Bart Van Assche Cc: Sushma Gurram --- test-tool/test_extendedcopy_descr_limits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-tool/test_extendedcopy_descr_limits.c b/test-tool/test_extendedcopy_descr_limits.c index 8474c6c..e2cf59e 100644 --- a/test-tool/test_extendedcopy_descr_limits.c +++ b/test-tool/test_extendedcopy_descr_limits.c @@ -66,7 +66,7 @@ test_extendedcopy_descr_limits(void) logging(LOG_VERBOSE, "Issue RECEIVE COPY RESULTS (OPERATING PARAMS)"); ret = receive_copy_results(sd, SCSI_COPY_RESULTS_OP_PARAMS, 0, (void **)&opp, EXPECT_STATUS_GOOD); - if (ret == -2) { + if (ret < 0) { CU_PASS("[SKIPPED] Target does not support " "RECEIVE_COPY_RESULTS. Skipping test"); return;