Commit Graph

1732 Commits

Author SHA1 Message Date
David Disseldorp
2b9abd9ac8 examples/dd: validate block count and max in flight params
Signed-off-by: David Disseldorp <ddiss@suse.de>
2017-01-04 19:32:05 +01:00
Ronnie Sahlberg
e8afafb32d Merge pull request #229 from ddiss/xcopy
TESTS: fix ExtendedCopy.ValidTgtDescr for SPC-4
2016-12-29 12:38:53 -08:00
David Disseldorp
14cc8facc1 TESTS: fix ExtendedCopy.ValidTgtDescr for SPC-4
With SPC-4, the 0xE4 descriptor LU ID TYPE field should be ignored, and
the NUL bit is obsolete. Update the ValidTgtDescr accordingly.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-12-29 20:49:12 +01:00
Ronnie Sahlberg
9b585dd558 Merge pull request #227 from ddiss/xcopy_limits_v2
TESTS: exceed Maximum Descriptor List Length
2016-12-26 10:16:35 -08:00
David Disseldorp
e427a813ad TESTS: exceed Maximum Descriptor List Length
ExtendedCopy.DescrLimits currently attempts to test Maximum Descriptor
List Length bounds checking by issuing a request with
(max_target_desc_count + 1 + max_segment_desc_count + 1) descriptors.

Maximum Descriptor List Length is a separately advertised field, that
may not be exceeded with the above logic, e.g. LIO advertises:
- Max Target Desc Count = 2
- Max Segment Desc Count = 1
- Max Desc List Len = 1024

Calculate the number of descriptors using the advertised Maximum
Descriptor List Length value, to explicitly test bounds checking.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-12-23 02:36:43 +01:00
Ronnie Sahlberg
8000a14d55 Add a test that a (future) single call to iscsi_service() will process all queued PDUs
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-12-12 17:47:17 -08:00
Ronnie Sahlberg
3a598ea846 TESTS: Unmap. Clamp max number of unmap blocks to 256 if the target reports
no limit

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-11-15 18:37:59 -08:00
Ronnie Sahlberg
04b029dc88 TESTS: Allow iser:// style URLs
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-11-15 18:21:35 -08:00
Ronnie Sahlberg
727faa6fc4 Merge branch 'master' of github.com:sahlberg/libiscsi 2016-11-15 18:09:13 -08:00
Ronnie Sahlberg
8c9519b145 TESTS: Setup and use iovectors for ALL data transfers in send_scsi_command
We need to use iovectors for iSER to work as it requires that the vectors
are attached to the task before we queue the task.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-11-15 18:07:23 -08:00
Ronnie Sahlberg
d7809374e1 Merge pull request #219 from vriera/master
Do not use -I/usr/include. This is unsafe when cross-compiling.
2016-11-14 17:12:36 -08:00
Ronnie Sahlberg
5228631a60 Merge pull request #220 from mimusato/unmap
adds max block descriptor count control to Unmap; skips Verify on LBA…
2016-11-14 17:11:39 -08:00
Ronnie Sahlberg
b89e1c87a4 Merge pull request #221 from hramrach/master
Fix 32bit build.
2016-11-14 12:40:03 -08:00
Michal Suchanek
a239423a0f Fix 32bit build.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2016-11-14 17:28:31 +01:00
Mihai Musatoiu
1a92fbcc12 adds max block descriptor count control to Unmap; skips Verify on LBA 2^31 if that LBA is valid (not outside the LUN) 2016-10-27 09:42:14 +00:00
Vicente Olivert Riera
f27bdf64f0 Do not use -I/usr/include. This is considered unsafe when cross-compiling
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
2016-10-16 10:53:13 +01:00
Ronnie Sahlberg
8cc8fb98a7 TESTS: Skip the whole startstopunit test if the medium is not removable
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-09 15:10:01 -07:00
Ronnie Sahlberg
8ef4dc8f3a Add tests for sending/receiving each opcode end-to-end using iscsi-test-cu
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-09 14:38:33 -07:00
Ronnie Sahlberg
4d0c7559c0 TEST: Improve simple startstopunit test
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-09 14:31:09 -07:00
Ronnie Sahlberg
b8eb923009 New version 1.18.0
- Various updates to the test utility
- Add transport abstraction
- Add support for iSER
- Add iscsi_discovery_sync()

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-09 11:54:10 -07:00
David Disseldorp
e6f7d5328c TESTS: simple LU RESET TMF test
Dispatch a write and subsequently reset the logical unit via iSCSI TMF.
This is based on the AbortTaskSimpleAsync test.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-10-09 11:54:10 -07:00
Ronnie Sahlberg
d3ef192021 Add synchronous function iscsi_discovery_sync()
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-09 11:54:10 -07:00
David Disseldorp
4694c4ec95 TESTS: drop /dev/sg device path check for iSCSI
When run against an iSCSI target sd->sgio_dev may be NULL, so the
strncmp() coredumps.

Fixes: 698ae7a649

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-10-05 15:03:24 +02:00
Ronnie Sahlberg
698ae7a649 TESTS: Dont use BLKSECTGET for /dev/sg devices
As BLKSECTGET is so unreliable, skip using this to detect max transfer sizes
for any device path starting with "/dev/sg"
instead force the max to be 120k

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-04 21:21:25 -07:00
Ronnie Sahlberg
bf3e388ec2 TESTS: Abort Reserve6 tests if task mgmt functions are missing
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-04 20:21:16 -07:00
Ronnie Sahlberg
f6570e6f12 TESTS: Abort the cold/warm reset tests if the target support is missing.
Not all targets support cold/warm reset task management functions.
Abort these tests if the support is missing and the commands fail.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-02 15:35:46 -07:00
Ronnie Sahlberg
c27db02a30 TESTS: Fix startstopunit test
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-02 11:29:17 -07:00
Ronnie Sahlberg
73fe55596d TESTS: We need to clear local_iscsi_queue_pdu before each test
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-02 10:45:27 -07:00
Ronnie Sahlberg
714bad2153 TEST: add test for read/write using iovectors
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-01 16:31:13 -07:00
Ronnie Sahlberg
39001203b7 TESTS: simple support for READDEFECTDATA10/12
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-09-22 22:43:16 -07:00
Ronnie Sahlberg
01a8e22207 TESTS: COMPAREANDWRITE should fail if DATAOUT is not exactly 2*TL blocks
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-09-22 19:12:09 -07:00
Ronnie Sahlberg
2e947cc1de TESTS: WRITESAME1* with 0 DataOut should fail if WSNZ is set
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-09-22 18:44:44 -07:00
Ronnie Sahlberg
875c0222f2 Revert "TESTS: Fix writesame1* unmap until end tests"
This reverts commit 6aa8c17b59.
2016-09-22 06:26:12 -07:00
Ronnie Sahlberg
bb22ff71eb TESTS: Add tests that a target will reject WriteSame where DataOut has invalid size. 2016-09-21 19:53:22 -07:00
Ronnie Sahlberg
6aa8c17b59 TESTS: Fix writesame1* unmap until end tests
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-09-21 19:05:15 -07:00
Ronnie Sahlberg
e0fd6dc051 Allow iser:// style URLs
Let user specify iSER support by the protocol part of the URL.

I.e. support both
iser://127.0.0.1/iqn.ronnie.test/1

iscsi://127.0.0.1/iqn.ronnie.test/1?iser

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-09-02 16:40:24 -07:00
Ronnie Sahlberg
8f41a629ec Merge pull request #216 from plieven/for_upstream
iser: remove unnecessary checks for NULL
2016-08-22 19:13:40 -07:00
Peter Lieven
d34c3d29d4 iser: remove unnecessary checks for NULL
Signed-off-by: Peter Lieven <pl@kamp.de>
2016-08-22 11:55:51 +02:00
Ronnie Sahlberg
75e67ba852 Merge pull request #214 from plieven/static_drv
abstract transport to static driver functions and opaque driver speci…
2016-08-21 09:50:16 -07:00
Ronnie Sahlberg
4fef2cde62 Merge pull request #215 from jh86/master
Update a URL in README, fix a typo there too
2016-08-21 09:49:35 -07:00
Jon Hermansen
4ebc65deba fix a typo in README heading 2016-08-20 19:49:01 -07:00
Jon Hermansen
aecdbd0a0c update the URL to cunit-to-junit.pl. old URL was throwing 404 2016-08-20 19:48:32 -07:00
Ronnie Sahlberg
0e0e326f75 Merge pull request #213 from ddiss/caw_unwritten2
test Compare And Write against unwritten range
2016-08-05 10:31:12 -07:00
Peter Lieven
fa123fc397 abstract transport to static driver functions and opaque driver specific information.
This splits a transport into static driver specific functions for the common
iscsi commands. Optionally, a driver specific opaque memory is introduced
which is currently only used by iSER transport.
Last a lot of functions changed to static.

Signed-off-by: Peter Lieven <pl@kamp.de>
2016-08-05 11:28:43 +02:00
David Disseldorp
e6f2ce306c test: COMPARE AND WRITE against unwritten range
Simulate VMware ESXi behaviour in issuing COMPARE AND WRITE requests
against unwritten ranges.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-07-25 13:00:09 +02:00
David Disseldorp
871eb1b61b test: don't segfault in TMF callback on reconnect
Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-07-21 21:29:33 +02:00
Ronnie Sahlberg
df1dc08eb7 TESTS: cleanup and remove noise warnings for iscsi cmdsn tests
The iscsi cmdsn tests are noisy and generate a lot of [FAILURE]
warnings for things that are expected.
Fix this by do the plumbing to allow using a EXPECT_STATUS_TIMEOUT
for commands we expect will never be replied to and will thus time out.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-07-11 20:50:47 -07:00
Ronnie Sahlberg
37507c994a Add back iscsi_queue_pdu
We need a public symbol for iscsi_queue_pdu. This is now just a
simple wrapper around iscsi->t->queue_pdu

https://github.com/sahlberg/libiscsi/issues/212

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-07-11 18:37:25 -07:00
Ronnie Sahlberg
f639f858eb Merge pull request #211 from plieven/tegile_test
For Upstream
2016-07-11 18:26:37 -07:00
Peter Lieven
ab01692ea6 iscsi-ls: strip portal group tag in url output
we do not use it in libiscsi anyway, but e.g. Qemu does not support in in the URL.

Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 12:00:56 +02:00