Commit Graph

1520 Commits

Author SHA1 Message Date
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
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
Ronnie Sahlberg
3f73f00b25 Merge pull request #168 from rodrigc/fix1
test_reserve6_target_cold_reset: fix login parameters
2015-06-02 19:39:02 -07: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
Ronnie Sahlberg
73102aeddd Merge pull request #167 from ddiss/test-multipath-v2
test: multipath support v2
2015-06-01 07:06:29 -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
0630aa5ef0 Timeouts: Fix bugs in scsi task timeout code
Add a test to verify the pdu timeout handling.
Fix numerous bugs in the timeout handling. It was really broken.

Add test for non-SCSI task PDUs too and verify they works.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-24 14:34:06 -07:00
Ronnie Sahlberg
cb4ad5f774 Connect: Don't use the TUR checks on re-connects
Only use TUR to eat any pending unit attentions on the initial connect
but not during reconnect.

From Peter Lieven <pl@kamp.de>

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-19 19:21:26 -07: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