209 Commits

Author SHA1 Message Date
Ronnie Sahlberg
2535eaed47 TEST add simple UNMAP test 2013-01-21 19:38:51 -08:00
Ronnie Sahlberg
d7be22fa2f TESTS: add READCAPACITY16 tests 2013-01-21 17:13:48 -08:00
Ronnie Sahlberg
ab3dfae005 TESTS add tests for VERIFY10 and VERIFY12 2013-01-21 14:50:40 -08:00
Ronnie Sahlberg
0e4e2e91bd TESTS: Add VERIFY16 tests 2013-01-21 14:27:14 -08:00
Ronnie Sahlberg
9799e04cd5 TESTS: Add WRITE10 tests 2013-01-21 11:49:26 -08:00
Ronnie Sahlberg
8de444bb87 TESTS Add WRITE12 tests 2013-01-21 11:43:50 -08:00
Ronnie Sahlberg
2f90e02395 TESTS: Add tests for WRITE16 to new framework 2013-01-21 11:19:43 -08:00
Ronnie Sahlberg
0c124ce3cc TESTS Add READ16 tests to the new framework 2013-01-21 08:36:23 -08:00
Ronnie Sahlberg
d1641b762b TESTS: Add READ12 tests to the new test framework 2013-01-21 08:22:26 -08:00
Ronnie Sahlberg
192ee4d61b TESTS: convert READ6 tests to the new framework 2013-01-20 17:02:13 -08:00
Ronnie Sahlberg
2a1a7bc2bb TESTS: convert readcapacity10 test to new framework 2013-01-20 16:22:31 -08:00
Ronnie Sahlberg
d21ad441bf Add check for libcunit and only build the test suite if libcunit is available 2013-01-06 11:28:07 -08:00
Lee Duncan
d3324decd2 CUnit tests now working for first 2 suites, but
Makefile.am not correct yet.
2013-01-04 18:11:36 -08:00
Lee Duncan
fb4724c813 Added guts of new cunit-based main routine 2013-01-03 19:57:09 -08:00
Lee Duncan
ee5000ba9d Moved support routines from iscsi-test to iscsi-support,
in preperation for sharing non-main functions.
2013-01-02 17:15:48 -08:00
Lee Duncan
d9664cb26a Added test for other 5 PGR reservation types. 2012-12-28 11:21:37 -08:00
Lee Duncan
fbf8b5e426 - Made PGR test more verbose (naming initiator).
- Added test for Exclusive Access PGR reservation access testing.
2012-12-27 12:51:38 -08:00
Lee Duncan
474cec5556 Added new 1130* test file for PGR simple reserve testing.
Added infrastructure to support reading, setting, and
clearing reservations.
2012-12-22 13:50:55 -08:00
Ronnie Sahlberg
0338e4edd0 TEST: Change the last test to be a more simple REGISTER/UNREGISTER test for persisntet registrations. 2012-12-18 20:30:03 -08:00
Ronnie Sahlberg
2a74fc00bc Initial support for PERSISTENT_RESERVER_OUT and add a simple test to show the api 2012-12-17 21:25:46 -08:00
Ronnie Sahlberg
d324a94051 Add test for the range of service actions for PERSISTENT_RESERVE_IN 2012-12-17 19:42:30 -08:00
Ronnie Sahlberg
c60093eafe Add support for PERSISTENT_RESERVE_IN and add a simple test for READ_KEYS 2012-12-17 19:01:50 -08:00
Ronnie Sahlberg
f1d5510e9c TESTS: Add test that we can talk to a target with IMMEDIATE_DATA==NO and INITIAL_R2T==NO 2012-12-01 11:40:07 -08:00
Ronnie Sahlberg
04970ef95e TESTS: Add a new test that does a one block write using unsilicited immediate data
As part of the test also validate the PDU that libiscsi generates and verify that
1, the PDU we send has the F flag set
2, that datasegmentlength for the PDU is one block
2012-12-01 10:45:42 -08:00
Ronnie Sahlberg
efc556e2e9 TESTS: Create a test that tries to overflow the maxcmdsn counter
so that i/o from the initiator stops flowing and are just queued locally
until teh cmdsn window opens up again.

Send a lot of writes that block until we have processed the R2T
back from the target and verify we can still make process when we
have saturated the cmdsn window and are also blocked waiting for R2Ts.
2012-11-27 19:51:22 -08:00
Peter Lieven
b1374b42ed Rename scsi-command.c to iscsi-command.c 2012-11-12 16:12:29 +01:00
Ronnie Sahlberg
50e7c682bb Add a logging subsystem and change all DPRINTF to ISCSI_LOG
Add a mechanism where we can set a logging subsystem that libiscsi can use.
Create an example 'log to stderr' that utilities can use for convenience.
2012-11-07 06:34:38 -08:00
Ronnie Sahlberg
9e9c6946c0 TESTS: Add a test that a target handles an unsolicited DATA-OUT correctly.
Send a large number of DATA-OUT PDUs that do not have a matching SCSI-COMMAND
PDU and verify that the target responds correctly. Either by terminating the
session or by just ignoring the data.

Verify also that the target is not "surprised" and crashes.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-10-30 18:44:35 -07:00
Jon Grimm
b81bdd3932 Merge with upstream 2012-10-25 12:56:26 -05:00
Jon Grimm
1eaca70a52 Add MaintenanceIn: Report Supported Opcodes (all) and testcase. 2012-10-25 12:48:37 -05:00
Ronnie Sahlberg
b700d44f03 TESTS: Add a simple test to check that a target survives huge imemdiate data
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-10-24 21:19:27 -07:00
Peter Lieven
fec061ac68 Add iscsi-readcapacity16 binary
This patch adds a small binary to read the size of an iscsi target. The value
is returned on stdout.
2012-10-23 15:59:28 +02:00
Ronnie Sahlberg
676bf2372c TEST: Add test that target reset will release a RESERVE6 2012-10-04 21:37:41 -07:00
Ronnie Sahlberg
06e925f2fd TEST: Add a test to verify that reservation are dropped on session termination 2012-10-01 18:41:08 -07:00
Ronnie Sahlberg
30a32b4335 TESTS: Add two tests that RESERVE6 is dropped on LUN-reset as well as session logout 2012-09-30 09:25:39 -07:00
Jon Grimm
26d090e191 Add testcase for RESERVE6/RELEASE6 2012-09-27 14:17:24 -05:00
Jon Grimm
d6bea3db52 merge fixup 2012-09-24 10:22:58 -05:00
Jon Grimm
e55ec72f36 Add Read TOC (0x43) Command Support (and basic testcase). 2012-09-24 10:15:00 -05:00
Ronnie Sahlberg
ba14452dc2 TEST: Add a test that reads all reported VPD pages and validates qualifier, type and page-code in the returned data 2012-09-21 20:15:04 -07:00
Ronnie Sahlberg
be4f2fdf66 TESTS: Add a test that all mandatory SPC pages are supported by the target 2012-09-21 18:52:51 -07:00
Ronnie Sahlberg
703d9120bc TEST: Add test for TESTUNITREADY
Add an explicit test for this opcode. We already have plenty of implicit tests via the normal iscsi login functions.
2012-09-20 19:38:30 -07:00
Ronnie Sahlberg
6e2f04455f TEST: Add a test that INQUIRY where EVPD==0 but PAGE_CODE!=0 is an error 2012-09-20 18:27:04 -07:00
Ronnie Sahlberg
641027283b TESTS: Add a new test to check standard INQ alloclen
Add a test for the standard INQUIRY data. The iscsi/scsi target should complete
the request successfully for all values of buffersize/allocation_length
of 1 to 255 bytes.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-09-18 19:45:42 -07:00
Ronnie Sahlberg
6b28465a46 TESTS: Add basic test of standard INQUIRY data 2012-09-12 06:55:51 -07:00
Ronnie Sahlberg
ed70ced748 TEST: Add test for the flags in STARTSTOPUNIT
Implement a test similar to the SSU flags tests from the Microsoft scsi
compliance test suite.
2012-09-10 21:24:35 -07:00
Ronnie Sahlberg
9fdb2b16b4 TESTS: Add a test for READCAPACITY16 with allocation-length == 0
Add a READCAPACITY16 testcase from the Microsoft scsi compliance test suite.
2012-09-10 20:35:09 -07:00
Ronnie Sahlberg
3af45a0677 TEST: add test for prefetching 0 blocks from a device 2012-09-05 20:17:50 -07:00
Ronnie Sahlberg
8f11b127fe TEST: Add test for PREFETCH10/16 beyond eol 2012-09-05 19:42:14 -07:00
Ronnie Sahlberg
ca6875e69d TESTS: Add tests for the flags for PREFETCH10/16 2012-09-05 19:17:16 -07:00
Paolo Bonzini
778aacb47f fix building out-of-tree
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-30 17:37:38 +02:00