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 <bart.vanassche@sandisk.com>
Cc: Sushma Gurram <Sushma.Gurram@sandisk.com>
This commit is contained in:
Bart Van Assche
2015-08-31 14:48:59 -07:00
committed by Ronnie Sahlberg
parent 3b8b42d976
commit 9826147581

View File

@@ -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;