Commit Graph

1722 Commits

Author SHA1 Message Date
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
Peter Lieven
9ecc8184fe socket: do not leak addrinfo in iscsi_connect_async
Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 11:53:01 +02:00
Peter Lieven
f2850fdcc6 connect: do not leak transport struct on iscsi_reconnect_cb
Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 11:47:58 +02:00
Peter Lieven
1b3d3038bf init: do not leak transport struct on iscsi_destroy_context
Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 11:44:56 +02:00
Peter Lieven
765d492aa0 pdu: dump PDU header on ILLEGAL REQUEST sense
Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 11:38:21 +02:00
Peter Lieven
20e1182b3e scsi-lowlevel: add more pagecodes to scsi_inquiry_pagecode_to_str
add reverse mappings for all members of: enum scsi_inquiry_pagecode

Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 11:30:34 +02:00
Peter Lieven
d0943249f6 iscsi-inq: use right int types
the block limits vpd has unsinged values. casting them to signed can return negative results.

Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 11:24:50 +02:00
Peter Lieven
19a3412d58 iscsi-perf: add a logging parameter
if specified the perf output will log the perf data once per second.

Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 10:44:24 +02:00
Ronnie Sahlberg
334ab850c0 Merge pull request #209 from sitsofe/unused-symbol
lib: Remove unused iscsi_queue_pdu symbol
2016-06-07 06:32:21 -07:00
Sitsofe Wheeler
20a0969b15 lib: Remove unused iscsi_queue_pdu symbol
Remove iscsi_queue_pdu from the list of symbols otherwise clang on OSX
fails to compile with the following error:

Undefined symbols for architecture x86_64:
  "_iscsi_queue_pdu", referenced from:
     -exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2016-06-04 17:39:29 +01:00
Ronnie Sahlberg
01de246bdc Add a feature macro for ISER and bump api version
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-06-03 19:09:39 -07:00