1 /*
2 Copyright (c) 2015 SanDisk Corp.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <stdlib.h>
22
23 #include <CUnit/CUnit.h>
24
25 #include "iscsi.h"
26 #include "scsi-lowlevel.h"
27 #include "iscsi-test-cu.h"
28
29 void
test_receive_copy_results_op_params(void)30 test_receive_copy_results_op_params(void)
31 {
32 struct scsi_task *op_task = NULL;
33 struct scsi_copy_results_op_params *opp;
34 int ret;
35
36 logging(LOG_VERBOSE, LOG_BLANK_LINE);
37 logging(LOG_VERBOSE, "Test RECEIVE COPY RESULTS, OPERATING PARAMS");
38
39 ret = RECEIVE_COPY_RESULTS(&op_task, sd, SCSI_COPY_RESULTS_OP_PARAMS, 0,
40 (void **)&opp, EXPECT_STATUS_GOOD);
41
42 if (ret == 0)
43 logging(LOG_NORMAL,
44 "max_target_desc=%d, max_seg_desc=%d",
45 opp->max_target_desc_count,
46 opp->max_segment_desc_count);
47
48 scsi_free_scsi_task(op_task);
49 }
50