A number of existing tests create a secondary iSCSI session by logging
into the target specified in the base sd during the test.
With multipath sessions now connected during iscsi-test-cu startup
(when launched with multiple URIs), secondary sessions can be
provided via multipath when available, rather than reconnecting.
This change adds a helper that conditionally returns the secondary
multipath device if available, or falls back to creating a new session
via the base sd target details.
Signed-off-by: David Disseldorp <ddiss@suse.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>