Commit Graph

995 Commits

Author SHA1 Message Date
Ronnie Sahlberg
a3283fbafd TESTS: Add a test that SANITIZE fails when SWP is on. 2013-07-09 02:27:30 -07:00
Ronnie Sahlberg
6e5a5745aa TESTS: Add a test that SANITIZE commands fail when there is a RESERVATION 2013-07-09 01:51:00 -07:00
Ronnie Sahlberg
9e9ca71247 Modesense6 decoding bugs, start preparing for modesense10 decoding 2013-07-08 01:31:03 -07:00
Ronnie Sahlberg
e31e0ce58d TESTS: Log when we skip tests on normal log level, not just for -V 2013-07-08 00:23:39 -07:00
Ronnie Sahlberg
ebb1f06830 Add parameter list length error sense code 2013-07-06 23:35:03 -07:00
Ronnie Sahlberg
a51d706d32 Add invalid field in parameter list sense code 2013-07-06 22:35:36 -07:00
Ronnie Sahlberg
6b93af26a9 Add utility to get/set the software write protect flag 2013-07-06 21:59:03 -07:00
Ronnie Sahlberg
7895fb700c Add MODESELECT6 support
Add support for MODESELECT6 and add marshalling functions for the
mode pages we support so far.
2013-07-06 16:11:17 -07:00
Ronnie Sahlberg
b6e5af558d Unmarshall support for Control modepage 2013-07-05 22:38:45 -07:00
Ronnie Sahlberg
03ce9dc4b1 TESTS: Verify that SANITIZE does wipe the data 2013-07-05 20:15:52 -07:00
Ronnie Sahlberg
b1983aeec1 TESTS: UNMAP make sure we read the blocks back as 0 after unmap 2013-07-05 19:34:56 -07:00
Ronnie Sahlberg
b2e3fc6e6f TESTS: SANITIZE OVERWRITE add tests for OVERWRITE COUNT and INIT PATTERN LEN 2013-07-05 17:41:32 -07:00
Ronnie Sahlberg
705bc27ed5 TESTS: Verify that WACEREQ is 0 if SANITIZE CRYPTO ERASE is not supported 2013-07-05 16:43:28 -07:00
Ronnie Sahlberg
accdad5b1a TESTS: Rename the tests and strip off the redundant prefix for the individual tests
We dont need to repeat the opcode all the time so remove it from the indiviual tests

SCSI.Read10.Read10Simple -> SCSI.Read10.Simple
2013-07-05 16:37:04 -07:00
Ronnie Sahlberg
6a65874dd9 TESTS: Add helper function for READ10 that returns a task* 2013-07-05 16:14:21 -07:00
Ronnie Sahlberg
d8d10c0a44 TESTS: Sanitize check that after block erase all blocks are unmapped 2013-07-05 16:04:29 -07:00
Ronnie Sahlberg
e3a29c0fed TESTS:SANITIZE verify that if BLOCK_ERASE is available we have LBPME==1 2013-07-05 14:52:51 -07:00
Ronnie Sahlberg
3edd40953e TESTS: SANITIZE, Add tests for WABEREQ/WACEREQ 2013-07-05 14:25:43 -07:00
Ronnie Sahlberg
cee82ad135 TESTS: Add tests for the reserved bits/bytes in SANITIZE 2013-07-05 13:32:49 -07:00
Ronnie Sahlberg
3e2729bcfa Merge pull request #66 from bonzini/master
scsi-lowlevel: do not use unsafe pointer casts
2013-07-01 12:42:17 -07:00
Paolo Bonzini
0a7c084603 scsi-lowlevel: do not use unsafe pointer casts
Casting unsigned char * pointers to uint32_t * may cause wrong
results if the pointers are not correctly aligned.  Instead,
build up the big-endian values from each byte with multiple
dereferences of the original pointer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-01 16:00:25 +02:00
Ronnie Sahlberg
1ead8d9d28 TESTS: Some targets just discard a command with "unexpected" r/w flags
Set timeout for the read10 invalid test for a read10 with w flag set
and fail the test if we have not received any reply at all within 3 seconds.
2013-06-29 13:49:13 -07:00
Ronnie Sahlberg
dcb223badc Use PRIu64 for format string 2013-06-29 12:23:55 -07:00
Ronnie Sahlberg
ff8226a9af README Update readme and indicate solaris 11 needs gmake, not make 2013-06-29 12:17:22 -07:00
Ronnie Sahlberg
027ff2fdca Solaris: older versions of solaris needs to link with nsl/socket 2013-06-29 12:16:16 -07:00
Ronnie Sahlberg
b73e91c89a Don't use -Wwrite-strings on Solaris
They have a weirdass struct option {} so we can't use this warning.
2013-06-29 12:10:43 -07:00
Ronnie Sahlberg
8140c5b726 Flag another argument as _U_ 2013-06-29 11:20:23 -07:00
Ronnie Sahlberg
bc7b1dc600 Add _U_ to some variables that might be unused 2013-06-29 11:14:46 -07:00
Ronnie Sahlberg
b555bbebdd Add a cast to ssize_t 2013-06-29 11:12:41 -07:00
Ronnie Sahlberg
9f88ea2e9a Change a u_int32_t to uint32_t
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2013-06-25 20:23:21 -07:00
Ronnie Sahlberg
21a6a08814 Update libiscsi.def/.syms for iscsi_set_bind_interfaces
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2013-06-25 20:15:35 -07:00
Ronnie Sahlberg
e061cba1b9 URL encoded Targetnames
Assume target names are URL encoded with '%' as the special character.

Any sequence of '%' followed by two bytes in the target name will be replaced
with the byte that the second two bytes represent in hexadecimal.

Example
iqn.ronnie.test%3A1234
will be translated to iqn.ronnie.test:1234
2013-06-16 11:35:14 -07:00
Bart Van Assche
12f93b60c7 Retry RESERVE6/RELEASE6 upon BUS RESET UA
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-06-08 07:45:18 -07:00
Bart Van Assche
49d1145a10 Next to BUS RESET, also accept NEXUS LOSS unit attention after login
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-06-08 07:44:43 -07:00
Ronnie Sahlberg
8cc2915a17 Merge pull request #63 from cardoe/werror
Allow users to disable -Werror at configure time
2013-06-05 20:17:47 -07:00
Doug Goldstein
2d43a056a9 Allow users to disable -Werror at configure time
Some users and distro packagers might not want to build with -Werror,
this allows them to disable using -Werror but enables it in the default
case so as to maintain the current behavior.
2013-06-05 14:28:48 -05:00
Ronnie Sahlberg
12a7d2f60d TEST: update SANITIZE test output 2013-06-02 16:37:56 -07:00
Ronnie Sahlberg
dd44a62994 typo 2013-06-01 09:02:04 -07:00
Ronnie Sahlberg
44e64fb8cf TESTS: SANITIZE. Produce warnings if WABEREQ does not match BLOCK ERASE support status 2013-06-01 08:59:37 -07:00
Ronnie Sahlberg
804ab643a3 TESTS: SANITIZE tests. Print additional warnings.
If SANITIZE is supported but we dont have the BlockDeviceCharacteristics
page we produce a warning.
If OVERWRITE is supported on SSDs we warn.
If BLOCK ERASE is supported on HDDs we warn.
2013-06-01 08:53:54 -07:00
Ronnie Sahlberg
7d413da22c TESTS: Print NORMAL log level by default 2013-06-01 08:47:05 -07:00
Ronnie Sahlberg
cb793f01f3 TESTS: Fix typo. s/allow_sanitize/allow-sanitize/g 2013-06-01 08:40:43 -07:00
Ronnie Sahlberg
595b7043b7 TESTS: fix test for modesense6 residuals. We never get overflow
but we get underflow if less than EDTL was returned
2013-06-01 07:57:31 -07:00
Ronnie Sahlberg
a16dd132db TESTS: Add a test and verify we dont get residuals for MODE SENSE 6 2013-05-30 22:01:25 -07:00
Ronnie Sahlberg
3766067328 TESTS: Add a simple test for MODESENSE6 that we can read it and we get at least 3 bydet of mode data (minimum size, header only) 2013-05-30 21:40:52 -07:00
Ronnie Sahlberg
dcb9504ec0 READ6, make the truncation from a potantial 9-bit value (0-256) to 8 bits
explicit by masking it with 0xff instead of relying on obscure truncation
rules.
2013-05-30 19:29:53 -07:00
Ronnie Sahlberg
5494580b4a TEST: READ6 add a test to verify that READ6 with transferlength
gets 256 blocks of data back from the target.
2013-05-30 19:16:57 -07:00
Ronnie Sahlberg
5713c2d363 TESTS: Initialize is_usb or else it will be very seldom that is_usb==0 and thus we dont truncate the transferlengths 2013-05-30 19:04:58 -07:00
Ronnie Sahlberg
b95f44a4ff Type: print correct sizes we test for for std inquiry page 2013-05-29 19:26:11 -07:00
Ronnie Sahlberg
c9a01c4c1f TESTS: For the inquiry test for whether a target only looks at the low
order byte of the two byte transfer length field or not.
Since the maximum size of a std vpd page takes 260 bytes to transfer
and some targets send this much,  testing and comparing the returned buffer
between allocation length == 255 and == 256 doesnt work.
Instead change test to verify that allocation length 511 and 512 returns the same amount and content of data.

This test then still allows finding targets that only look at the low order byte
(which is 0xff for 511   but is 0 for 512)
2013-05-29 19:21:39 -07:00