Commit Graph

1540 Commits

Author SHA1 Message Date
Ronnie Sahlberg
fae0d70260 TESTS: Dont try to eject the media if preventallow is not supported
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 16:29:29 -07:00
Ronnie Sahlberg
e725788eeb TESTS: WriteAtomic fixes to handle devices that do not return BlockLimits VPD
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 16:12:01 -07:00
Ronnie Sahlberg
fe1017fe2a TESTS: Don't test WriteSame10/16 if we do not have BlockLimits VPD
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 16:06:05 -07:00
Ronnie Sahlberg
67932e870e TEST: Fix number of blocks in Get_LBA_STATUS simple
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 15:58:03 -07:00
Ronnie Sahlberg
7924ae5385 TEST: Skip CompareAndWrite DPO/FUA test early if the opcode is not supported.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 15:52:44 -07:00
Ronnie Sahlberg
f7ea45e053 TESTS: ReportSuppOpcodes, handle broken targets that return success but no data.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 15:47:13 -07:00
Ronnie Sahlberg
d7606c44e2 TESTS: Update checks for DPUFUA bits in CDB_USAE_DATA fields
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 15:24:04 -07:00
Ronnie Sahlberg
ac3b1d6e3c TEST: Fix the READ6 tests so they work for linux usb devices
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 14:55:58 -07:00
Ronnie Sahlberg
e57b266e91 TESTS: Fix how we compute the max transfer length the bus can handle was broken
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-19 14:41:52 -07:00
Ronnie Sahlberg
3b98737e3c Merge pull request #181 from ddiss/mp_reset_v2
Mp reset v2
2015-09-19 14:12:14 -07:00
David Disseldorp
5c0b1b9913 test/pr: simple PR Out CLEAR test
Check that a Persistent Reserve Out CLEAR request:
- clears an existing reservation
- clears existing registration keys
- bumps the PRgeneration number

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-09-18 18:06:25 +02:00
David Disseldorp
a90e5a3d4c test/iscsi-support: PR Out CLEAR helper function
Add a helper function to dispatch Persistent Reserve Out requests with
CLEAR service action.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-09-18 18:06:19 +02:00
David Disseldorp
a569d55a0e test/multipath: add COMPARE AND WRITE test
Confirm that data is consistent across paths when using the atomic
COMPARE AND WRITE operation.
This should be extended in future to issue the requests simultaneously
across both paths, in an attempt to trigger a read/write race.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-09-17 19:13:39 +02:00
David Disseldorp
b9dd210194 test/multipath: add logical unit reset test
This test issues a logical unit reset iSCSI TMF request, and then
confirms that all paths report a subsequent unit attention condition.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-09-17 19:13:39 +02:00
David Disseldorp
6b3ee9931a test/multipath: add helper to check that all paths are iSCSI
MPATH_SKIP_UNLESS_ISCSI(_sds, _num_sds) iterates over all _sds, and
skips the test unless all paths are iSCSI based.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-09-17 19:13:39 +02:00
Ronnie Sahlberg
2e59742b1f TESTS: Dont assume atomic align/granularity is always reported as non-0
From Alexander Motin <mav@freebsd.org>
Treat BlockLimits VPD atomic granulatity/alignment reported as 0
(no restrictions) as == 1 (also means no restriction).

Both 0 and 1 mean that there is no restriction on alignment or
granularity but with the difference being that the second value can
be used to increment to the next valid LBA.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-12 13:38:02 -07:00
Ronnie Sahlberg
e59d2ce1d3 TESTS: ifdef out iov_tot_len if we do not have SG_IO
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-12 12:43:07 -07:00
Ronnie Sahlberg
fa9df7fdd3 TESTS: Fix the writeatomic tests for targets where atomic granularity != 1
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-10 17:20:06 -07:00
Ronnie Sahlberg
fd55600d39 TESTS: Print correct sense data when a command fail that were expected to succeed 2015-09-10 16:45:24 -07:00
Ronnie Sahlberg
126bbd8b29 TESTS: Add WriteAtomic tests for alignment and granularity
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-09 09:53:09 -07:00
Ronnie Sahlberg
4c87f455ae TESTS: Verify that MAX_ATOMIC_XFER_LEN is <= MAX_XFER_LEN
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-09 06:55:13 -07:00
Ronnie Sahlberg
b4cdf07271 Add tests that BlockLimits VPD matches the AtomicWrite16 support
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-09 06:49:51 -07:00
Ronnie Sahlberg
80b81772e2 Add unmarshalling of VPD BLock Limits settings for atomic writes
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-09 06:49:41 -07:00
Ronnie Sahlberg
6c16f9e322 Add tests for WRITE_ATOMIC_16
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-08 10:17:15 -07:00
Ronnie Sahlberg
02fd6217cb Add support for WRITE_ATOMIC_16
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-09-08 10:16:57 -07:00
Ronnie Sahlberg
639c6f4c15 Merge pull request #180 from rcsheets/autogen-can-fail
Allow for autogen.sh failure
2015-09-06 07:17:18 -07:00
Bart Van Assche
9826147581 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>
2015-09-06 07:05:36 -07:00
Robert C. Sheets
b3b2964752 When type output is not wanted, redirect all output instead of just stdout 2015-08-27 10:47:48 -07:00
Robert C. Sheets
a62db28570 One more comment 2015-08-27 03:21:44 -07:00
Robert C. Sheets
206f9fdf86 Bail out with a useful message if a required command isn't available 2015-08-27 03:18:51 -07:00
Ronnie Sahlberg
3b8b42d976 TESTS: Add missing check for not supported : RECEIVE_COPY_RESULTS
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-08-02 12:57:45 -07:00
Ronnie Sahlberg
0bb846c0f5 Don't use alloca for large blobs.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-08-02 12:57:32 -07:00
Ronnie Sahlberg
a6f7c06119 Add support and tests for ExtendedCopy and ReceiveCopyResults
From sushma.gurram@sandisk.com
Add support to libiscsi and tests for these two opcodes.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-08-02 12:57:21 -07:00
Ronnie Sahlberg
4518dfa43c Don't leak memory in the test helper for write16
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-08-02 12:16:58 -07:00
Ronnie Sahlberg
c29b9bcc60 TEST: NULL out rsop_task after freeing it to avoid double free.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-08-02 12:16:54 -07:00
Ronnie Sahlberg
1b95b79147 Merge pull request #177 from deepankar/master
Fix documentation typos and copy-paste errors.
2015-07-18 07:09:16 -07:00
Kamalneet Singh
1cef3e62a9 Fix documentation typos and copy-paste errors. 2015-07-18 05:36:19 -07:00
Ronnie Sahlberg
96c00b2178 New version 1.15.0
- Replace some u_int32_t with uint32_t
- Portability fixes to iscsi-perf
- Improved documentation for the tests in README
- Add/fix support for setting task/pdu timeouts and add unit tests for it.
- Add multipath helpers for the test suite and add a simple multipath test
- Skip sending TUR during reconnect, since it can cause the connection to
-   hang.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-06-21 08:50:50 -07:00
Ronnie Sahlberg
ed17e17f8e Fix broken makefile
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-06-16 07:06:43 -07:00
Ronnie Sahlberg
29e2ae2868 Merge pull request #175 from plieven/timeout
reconnect: copy scsi_timeout on reconnect
2015-06-16 06:09:16 -07:00
Peter Lieven
1ceb216394 pdu: timed out pdus might have no callback
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-06-16 12:14:11 +02:00
Peter Lieven
85fc823f59 pdu: do not leak timed out pdus
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-06-16 12:08:13 +02:00
Peter Lieven
7dd62aca61 pdu: add more debugging info for timed out commands
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-06-16 12:06:59 +02:00
Peter Lieven
0a3e157844 reconnect: copy scsi_timeout on reconnect
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-06-16 11:33:57 +02:00
Ronnie Sahlberg
65eb400891 Merge pull request #174 from agrare/master
test_modesense6_control_swp test: read current control before modesel…
2015-06-12 06:42:11 -07:00
Adam Grare
838c35b693 test_modesense6_control_swp test: read current control before modeselect6
After checking if SWP can be changed the current control page has
to be read back before sending it to initiator with modeselect6.
2015-06-11 16:48:43 -04:00
Ronnie Sahlberg
f240ef1cc7 Merge pull request #173 from rodrigc/fix4
reserve6 tests: fix login parameters
2015-06-04 00:15:52 -07:00
Ronnie Sahlberg
c7398ac0d1 Merge pull request #171 from rodrigc/fix2
test_modesense6_control_swp: skip test if target cannot change swp
2015-06-04 00:13:37 -07:00
Ronnie Sahlberg
514de96e15 TEST-TOOL: We need to include the multipath header in the dist files
or else we break all building of RPMs, which is not good.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-06-04 00:04:55 -07:00
Craig Rodrigues
7fe7891e84 reserve6 tests: fix login parameters 2015-06-03 20:23:09 +00:00