Commit Graph

145 Commits

Author SHA1 Message Date
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
Paolo Bonzini
d155231341 test-tool: 0171 is using different 0-block semantics than other tests
0171 is expecting a 0-block unmap at end-of-volume (i.e. start block
one beyond what READ CAPACITY returns) to pass, while every other 0blocks
test is expecting that address to be invalid.
2012-09-06 16:58:21 +02:00
Paolo Bonzini
a60c23887c test-tool: return SKIPPED exit code from 0191 when LBPPB = 1
Missed on my previous round.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-09-06 16:58:21 +02: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
0abacf8fa4 test-tool: 0214 was reading twice from -1
It should read once from -1, once from 2^31.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-09-04 18:34:38 +02:00
Ronnie Sahlberg
d6bbe8fe44 TESTS: PREFETCH10/16, add test for prefetch-lengt==0 2012-09-03 10:00:53 -07:00
Ronnie Sahlberg
81e935ffb0 TESTS: PREFETCH10/16 are optional. Skip test if not supported on target 2012-09-03 09:52:43 -07:00
Ronnie Sahlberg
116af01156 TYPO: Change periperal_device_type to just device_type
but leave the old name as a define for backward compatibility
2012-09-03 09:45:59 -07:00
Ronnie Sahlberg
77fc2497f7 TESTS: Change all tests to use 'block_size' instead of hardcoded 512
This should allow the testst to work corectly on block devices with 4k blocksize too.
2012-09-03 08:58:56 -07:00
Ronnie Sahlberg
6ef4bbd3e1 TEST: add back extra test for invalid buffer offsets 2012-08-31 16:15:53 -07:00
Ronnie Sahlberg
6a24b283f8 TEST: If we timeout a test, drop all wait/out pdus from the list
we dont want the callbacks anymore.
2012-08-31 16:12:21 -07:00
Ronnie Sahlberg
c526b9e954 TESTS: remove compiler warnings 2012-08-31 15:26:23 -07:00
Ronnie Sahlberg
09573068ad TESTS: Skipped tests should return -2 2012-08-31 14:19:11 -07:00
Ronnie Sahlberg
4df1525415 TESTS: Additional checks for missing opcodes and skipping tests 2012-08-31 11:42:44 -07:00
Ronnie Sahlberg
f3aacb3a5d TESTS: skip COMPARE-AND-WRITE tests on targets missing this opcode 2012-08-31 11:18:55 -07:00
Ronnie Sahlberg
98d18d5c42 TESTS: Add remaining checks for *verify* opcode not implemented skip test 2012-08-30 20:30:28 -07:00
Ronnie Sahlberg
8bc3d51cd4 TESTS: improve verify tests to detect/abort on opcode not supported furthter 2012-08-30 20:22:16 -07:00
Ronnie Sahlberg
b4594c1ff3 TESTS: Add check and skip tests for targets that do not implement VERIFY* 2012-08-30 20:09:53 -07:00
Paolo Bonzini
e4377e7d91 iscsi-test: return -2 when skipping tests
This lets a test driver distinguish failure from skipping unsupported
tests.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-30 17:39:00 +02:00
Paolo Bonzini
c7b519524c iscsi-test: prepare to return exit status 77 for skipped tests
Teach the test harness to distinguish skipped tests from failed tests.
Return -2 from a skipped test and, if no test was failed but some were
skipped, return 77 from the main program.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-30 17:38:12 +02:00
Paolo Bonzini
f04471d642 iscsi-test: do not test read-only for non-SBC devices
The device-specific parameter is not defined in MMC.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-30 17:38:05 +02:00
Paolo Bonzini
418058e52a iscsi-test: do not test DPO/FUA for non-SBC devices
These bits are not defined in MMC.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-30 17:37:53 +02:00
Paolo Bonzini
560241b494 iscsi-test: avoid declaring struct inside parameter list
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-30 17:37:50 +02:00
Ronnie Sahlberg
d1c7b17cf5 TEST: Start adding tests for invalid BUFFEROFFSET in DATA-IN 2012-08-12 12:51:37 +10:00
Ronnie Sahlberg
7c2fada513 TEST: Add test that DATASN in reverse order is detected as an error 2012-08-12 11:12:12 +10:00
Ronnie Sahlberg
5754851b9d TESTS: More tests for invalid DATASN 2012-08-10 16:48:17 +10:00
Ronnie Sahlberg
6412834754 TEST: Add test that invalid DATASN for DATAIN is detected as an error
Send a write containing two DATA-IN PDUs in a sequence but both PDUs have DATASN==0
This is an error and the target should react to this as an invalid command

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-08-10 16:08:55 +10:00
Ronnie Sahlberg
0cf42c3662 TESTS: Add a test for ISCSI CMDSN out of range
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-08-10 15:36:10 +10:00
Ronnie Sahlberg
1a387632a9 TEST: Use better default iscsi name for the test tool 2012-08-10 11:27:10 +10:00