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
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
6c16f9e322
Add tests for WRITE_ATOMIC_16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-09-08 10:17:15 -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
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
ed17e17f8e
Fix broken makefile
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-06-16 07:06:43 -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
Craig Rodrigues
7fe7891e84
reserve6 tests: fix login parameters
2015-06-03 20:23:09 +00:00
Craig Rodrigues
1995298914
test_modesense6_control_swp: skip test if target cannot change swp
...
Signed-off-by: Vadim Finkelstein <vadim@pi-coral.com >
2015-06-03 18:54:29 +00:00
Craig Rodrigues
ff7a73360a
test_reserve6_target_cold_reset: fix login parameters
...
Signed-off-by: Vadim Finkelstein <vadim@pi-coral.com >
2015-06-03 02:30:31 +00:00
Ronnie Sahlberg
a8e42680ed
MULTIPATH TESTS: Remove the iscsi-only restriction. The tests work for /dev/* too
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-06-01 21:28:49 -07:00
Ronnie Sahlberg
2388db9f12
MULTIPATH TEST: use READ10/WRITE10 instead of READ16/WRITE16
...
Many small devices do not implement the 16 version of these commands.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-06-01 21:27:51 -07:00
Ronnie Sahlberg
3601799a1b
MULTIPATH TESTS: fix another bug where we did an inquiry for the wrong page
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-06-01 21:18:28 -07:00
Ronnie Sahlberg
95d763d9f9
TESTS: Add comment to describe why we keep a pointer around for iscsi_queue_pdu
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-06-01 21:16:39 -07:00
Ronnie Sahlberg
86a42c8b3a
MULTIPATH TESTS: pass the right pointer back when copying a des
...
Else we will double free and crash.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-06-01 19:39:13 -07:00
Ronnie Sahlberg
86df6c9a20
MULTIPATH TESTS: We need to pass the correct evpv/pagecode when we reissue an inquiry
...
When we reissue an inquiry due to the firast attempt not containing
all of the data, make sure to ask for the same page once we know the
proper size and ask again.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-06-01 19:30:19 -07:00
David Disseldorp
34dea87a69
test: add simple multipath IO test
...
Write data to device via one path, then read back using a different
path. Confirm that data is correct.
Signed-off-by: David Disseldorp <ddiss@suse.de >
2015-05-28 19:27:21 +02:00
David Disseldorp
43b47cf1fb
test/multipath: add MPATH_SKIP_IF_UNAVAILABLE macro
...
Check whether multiple SCSI device paths are available, if not then skip
the test.
Signed-off-by: David Disseldorp <ddiss@suse.de >
2015-05-28 16:56:21 +02:00
David Disseldorp
024fe873e3
iscsi-test-cu: support multiple iSCSI URLs for multipath
...
Connect to each iSCSI URL provided, and confirm that they all correspond
to the same multipathed logical unit by using the previously added
mpath_check_matching_ids() helper.
Signed-off-by: David Disseldorp <ddiss@suse.de >
2015-05-28 16:56:18 +02:00
David Disseldorp
a291c2b308
test: add multipath helper functions
...
mpath_check_matching_ids() walks the list of scsi devices, and confirms
that all entries share one common device identification designator or
unit serial number.
Signed-off-by: David Disseldorp <ddiss@suse.de >
2015-05-28 16:52:54 +02:00
Ronnie Sahlberg
2f10f05084
TESTS: improve text output for test_report_supported_opcodes_rctd
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-05-13 19:54:50 -07:00
Ronnie Sahlberg
6e4a84f815
TESTS Add the modesense tests to the linux family
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-05-13 19:50:24 -07:00
Ronnie Sahlberg
d9352865c2
TESTS: Skip the test with a warning if BlockDevChar VPD page is missing
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-05-12 20:30:04 -07:00
Ronnie Sahlberg
2a6264f76e
TESTS: Change ModeSense6.Control D_SENSE test to work with /dev/* devices
...
Stop calling out to libiscsi specific interfaces for faling a command
and checking the sense data. Use the now generic read16() which now works
also for normal device nodes.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-05-12 20:25:29 -07:00
Ronnie Sahlberg
b2b474f3ad
TESTS: Allow inquiry(block dev characteristics) to fail
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-05-12 20:25:11 -07:00