Commit Graph

725 Commits

Author SHA1 Message Date
Ronnie Sahlberg 1d56c2f970 Merge pull request #33 from jongrimm/master
Skip test for read supported ops, rather than failure
2012-10-30 18:50:48 -07: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
Peter Lieven 774ede1f46 ISCSI_URL change strings from dynamic to static 2012-10-30 11:41:51 +01:00
Peter Lieven e10a5a97be Merge remote-tracking branch 'jongrimm/master' 2012-10-30 11:09:38 +01:00
Jon Grimm f97cd4f816 Test: 0430_report_all_supported_ops: BUG: Need to set return_timeouts parm again after I know full_size. 2012-10-29 18:07:15 -05:00
Peter Lieven d989474a36 ISCSI-TEST free strings malloc'ed by libpopt 2012-10-29 22:07:58 +01:00
Jon Grimm 9f5a315e0c TEST: skip optional return op codes if not supported. 2012-10-29 10:55:02 -05: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
Peter Lieven 03528f3965 TEST: add skip command to skip individual tests
This patch adds a command to skip individual tests. It additionally accepts
more than one test separated by comma.
2012-10-25 10:27:09 +02:00
Peter Lieven 49947fe5e2 TEST: fix unitialized ret variable in T0000 2012-10-25 09:41:28 +02: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
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
Jon Grimm a5cc1fdbe8 Fix merge conflicts 2012-10-01 09:57:06 -05: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
Ronnie Sahlberg add9607244 TEST: Add readme for the test tool 2012-09-30 08:43:56 -07:00
Ronnie Sahlberg c57827fef4 TESTS: Add externs for the two initiator names 2012-09-30 08:31:15 -07:00
Ronnie Sahlberg b160b95060 TESTS: Add 'initiator2' variable so we can run tests with two different initiatir names
Update the 0420 test to use different initiator names for the two sessions to the target.
2012-09-30 08:25:23 -07:00
Jon Grimm 2b6bc6c687 test: Add test to release from second initiator when already reserved by first initiator. 2012-09-30 07:29:31 -07:00
Jon Grimm 2a2f246615 test: reserve_basic: mem leak cleanup 2012-09-28 11:27:20 -05:00
Jon Grimm 32d9f760d2 test: Add test to release from second initiator when already reserved by first initiator. 2012-09-28 10:09:14 -05:00
Ronnie Sahlberg da893b0cf9 TEST 0420 cosmetic printf change 2012-09-27 18:49:38 -07:00
Ronnie Sahlberg 0aa14bbe39 TEST: 0420 some cosmetic printf changes 2012-09-27 18:47:15 -07:00
Ronnie Sahlberg c3adf1d814 Merge pull request #20 from jongrimm/master
RESERVE6/RELEASE6 Commands + testcase.
2012-09-27 18:39:22 -07:00
Ronnie Sahlberg ce2db039a5 TEST: try to make 0410 nicer
0410 is the first test for the MMC commandset.
This commandset is in hindsight a bit more complex than other commandsets
in that we have to handle quite a lot of cases :
1, if it is not a MMC device, we should check we get INVALID_OPCODE and then
bail.
Then if it is a MMC device, there are at least three different cases we have to
handle:
2.a  If there is no medium in the device
2.b there is media, but the medium is blank
2.c there is readable medium

this makes MMC tests a lot more complex than other commandsets
so we have to try to get this one as nice and simple as possible so we can
reuse this test as the framework when adding other MMC tests.

(even the 2.b test is not 100% right,   since if the medium is BR, then a blank disk will fail with sense,  but blank pre-BD mediums will not fail the READTOC command)
2012-09-27 18:29:57 -07:00
Jon Grimm 602f89f060 TEST: reserve6_basic: Bail with success if command simply isn't supported. 2012-09-27 14:33:32 -05:00
Jon Grimm 26d090e191 Add testcase for RESERVE6/RELEASE6 2012-09-27 14:17:24 -05:00
Jon Grimm 1619d0e404 TEST: readtoc_basic: check that TOC of lba 0 matches TOC of lba 1 2012-09-24 13:49:18 -05:00
Jon Grimm 67f640f692 TEST: readtoc_basic: change copyright. Add readcapacity to see if media present, and test appropriate read toc behavior if not present. 2012-09-24 13:14:09 -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 3860520267 TESTS: fix typo 2012-09-21 20:26:40 -07: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 addc6e53d7 TEST: fix typo in test name 2012-09-21 19:32:00 -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 f5d8b61397 TESTS: Change INQ alloc_len test to also test the case where alloc_len is 0 2012-09-19 18:25:07 -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 6abb5ccc54 TEST: change to the SPC-4 definition of ASCII 2012-09-13 15:12:30 -07:00
Ronnie Sahlberg 2e33754228 TESTS: Expand the INQUIRY tests for the standard page 2012-09-12 07:29:40 -07:00
Ronnie Sahlberg 6b28465a46 TESTS: Add basic test of standard INQUIRY data 2012-09-12 06:55:51 -07:00
Ronnie Sahlberg 8a9970069f TESTS: STARTSTOPUNIT expand the basic tests to cover both immed==0 and immed==1
Expand the test to cover IMMED==0 as well as IMMED==1 to try to eject and load
removable media
2012-09-10 21:34:35 -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 ed1c3e1129 TESTS: Fix all 0block tests
Remove the test for accessing 0blocks (transfer length==0) at the end of the device since they were invalid.

SBC says that :
   If the LBA plus the transfer length exceeds the capacity
   of the medium, then the device server shall terminate the
   command with CHECK CONDITION status with the sense key
   set to ILLEGAL REQUEST and the additional sense code
   set to LOGICAL BLOCK ADDRESS OUT OF RANGE.

This means that if TL==0  then a LBA that is the first LBA beyond the end of
device is actually valid.

Improve output for error conditions and harminize all tests
2012-09-10 19:08:57 -07:00
Ronnie Sahlberg 9d15c1ea40 TESTS: 0100: change command names to upper-case in logging 2012-09-10 17:49:17 -07:00
Ronnie Sahlberg ca3ac9cafd TESTS: Improve error reporting for *beyondeol* tests
Beyondeol tests: Add missing checks for optional opcodes
to SKIP tests where the target does not implement the opcode.

Improve the error reporting and make sure we always show the Sense we
received from the target when we get an unexpected error.

Check the size of the LUN and skip the test for luns that are too big.
For example skip testing READ10 on LUNs > 2^31 blocks etc.
2012-09-10 08:38:21 -07:00
Ronnie Sahlberg ef5a1e20a4 Merge pull request #16 from bonzini/iscsi-test
Iscsi test
2012-09-09 16:34:49 -07:00