Commit Graph

32 Commits

Author SHA1 Message Date
David Disseldorp
2714f7705a test-tool/build: link against libiscsipriv.la
libiscsipriv.la exposes all symbols, so allows tests to perform low
level PDU manipulation, etc. without duplicating code.
As a trade-off, this results in a larger iscsi-test-cu, with libiscsi.so
linking removed.

Link: https://github.com/sahlberg/libiscsi/issues/297
Signed-off-by: David Disseldorp <ddiss@suse.de>
2019-09-18 01:25:34 +02:00
David Disseldorp
ab0e40d689 test-tool: add PrinReadKeys.Truncate test
This test registers PR key and then sends a PR-In read-keys request with
an ALLOCATION LENGTH value that forces response truncation. Ensure that
the ADDITIONAL LENGTH is *not* modified as a result of the truncation.

This test currently passes against TGT but fails against LIO (fix
pending).

Signed-off-by: David Disseldorp <ddiss@suse.de>
2018-05-31 23:31:17 +02: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
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
bb22ff71eb TESTS: Add tests that a target will reject WriteSame where DataOut has invalid size. 2016-09-21 19:53:22 -07: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
3644504147 tests: add WRITESAME data verification tests
Based on the corresponding simple tests. Issue a WRITESAME request and
confirm that the data written matches the data read back.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-05-18 11:59:54 +02:00
David Disseldorp
bf9c7cb277 test: simple ABORT TASK TMF test
Dispatch a write and subsequently abort it.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-03-22 21:27:25 +01:00
David Disseldorp
9ae5a64662 Tests: Asynchronous iSCSI Multipath Compare And Write
Dispatch a number of Compare And Write requests simultaneously via
separate iSCSI sessions and await all responses.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-03-11 19:16:10 +01:00
David Disseldorp
51da17c41f Tests: Asynchronous iSCSI write test
Dispatch a number of WRITE10 requests simultaneously, and await all
responses.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-03-11 18:53:24 +01:00
David Disseldorp
ebeca19480 Tests: Asynchronous iSCSI read test
Dispatch a number of READ10 requests simultaneously, and await all
responses.

The iscsi-support test helper functions are currently all synchronous,
so this test mostly uses the bare libiscsi API. As new async tests are
added, we can make a more informed decision on which boilerplate code
can be split out.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-03-10 18:20:37 +01:00
Ronnie Sahlberg
1deee0898a Tests: Add a test that RC16 must be supported when SBC3 is claimed
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-02-21 15:51:53 -08:00
David Disseldorp
b9b414981c test/pr: PRout PREEMPT remove registration test
Check that the Persistent Reserve Out PREEMT request removes the
registration referenced by the service action key.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-09-30 11:00:25 +02:00
David Disseldorp
9aa5b55b41 test/pr: simple PRin REPORT CAPABILITIES test
Check that the Persistent Reserve In REPORT CAPABILITIES response
carries valid LENGTH, ALLOW COMMANDS, and PERSISTENT RESERVATION TYPE
MASK fields.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-09-30 11:00:19 +02: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
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
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
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
ed17e17f8e Fix broken makefile
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-06-16 07:06:43 -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
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
Chris Zankel
e186169064 build: fix 'out-of-tree' build
Prefix include paths with '${srcdir}' to allow 'out-of-tree' builds:

  cd $BUILD
  $LIBISCSI/configure
  make

Signed-off-by: Chris Zankel <chris@zankel.net>
2015-04-22 18:18:14 -07:00
Ronnie Sahlberg
b6fc366b5c TESTS: Add a test for D_SENSE in the CONTROL mode page
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-04-19 18:20:12 -07:00
Ronnie Sahlberg
ba120e4347 TESTS: Add a test for the SWP flag in the CONTROL mode page
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-04-18 08:27:03 -07:00
Ronnie Sahlberg
4e174f5d7c TESTS: Add basic test for CONTROL mode page
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-04-18 08:03:15 -07:00
Ronnie Sahlberg
d33a0438a4 TESTS: replace read* flags tests with dedicated dpo/fua tests
Remove the flags tests for READ* and replace them with a test for the DPO
and FUA bits.
IF the device claims DPOFUA support in modesense then the READ* CDBs
MUST allow these two flags. IF the device does NOT claim DPOFUA then any
READ* CDB with these flags must fail with invalod field in cdb.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-12-22 20:05:29 -08:00
Ronnie Sahlberg
a41ec1fe60 TESTS: Add tests that get_lba_status for a single range works
Add a test for unmapping a single range of blocks and that
get_lba_status returns correct data.

Test unmapping a single block at offsets 0-255

Test unmapping 1-255 blocks at offset 0 and verify that
get_lba_status at LBA 0 returns a descriptor of 1-255 blocks.
get_lba_status at the last block of the unmapped range returns
a descriptor for a single block.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-07-14 19:46:12 -07:00
Ronnie Sahlberg
20b4f9a3fb tests: remove deprecated test tool iscsi-test
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-05-20 18:05:57 -07:00
Ronnie Sahlberg
ea790b2f75 AUTOTOOLS: Add Makefile.am to test-tool 2014-03-22 16:46:25 -07:00