Commit Graph

827 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
1daddebdb2 Merge remote-tracking branch 'upstream/master' 2013-10-13 15:28:52 +02:00
Edward Tomasz Napierala
5f46119899 Fix segv. 2013-10-12 23:51:16 +02:00
Bart Van Assche
e5ba667cea test_writesame16_unmap: Do not leak memory if WRITESAME16 is not supported
Detected by Valgrind.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-01 06:27:50 -07:00
Bart Van Assche
1337185fe9 test_read6_simple: Avoid triggering a use-after-free
Do not use the 'task' pointer after the memory it points at has been freed.
Detected via valgrind.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-01 06:24:55 -07:00
Bart Van Assche
bd948c959e Port to CUnit version 2
Linux distributions like openSUSE 12.3 include CUnit version 2.
Apparently libiscsi uses some CUnit version 1 data structures that
have been modified in CUnit version 2. This causes the libiscsi
build to fail against CUnit version 2. Fix this by detecting the
CUnit version during the configure step.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-01 06:22:06 -07:00
Sitsofe Wheeler
69867d23a8 Fix incorrect second initiator
Use the second initiator name in all files found by
ack "iscsic2 = "
2013-09-25 23:05:01 +01:00
Ronnie Sahlberg
8aa6d9de8f TESTS: Add a test for COMPARE_AND_WRITE when the data to verify does not match 2013-09-23 21:58:55 -07:00
Edward Tomasz Napierala
ae298ec940 Fix test to actually do what the comment says and send too low CmdSN. 2013-09-23 13:14:43 +02:00
Edward Tomasz Napierala
f9d4c742a2 Replace alloca.h with stdlib.h; the former doesn't exist on FreeBSD. 2013-09-23 11:34:06 +02:00
Ronnie Sahlberg
9f1a28f753 TESTS: Add an initial simple test for COMPARE_AND_WRITE
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2013-09-22 17:02:30 -07:00
Bart Van Assche
31f40b2e53 test-tool/1120_persistent_register_simple.c: Spelling fix
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-09-21 14:57:00 -07:00
Ronnie Sahlberg
657a7a4f7f Merge branch 'master' of github.com:sahlberg/libiscsi 2013-09-17 09:17:53 -07:00
Ronnie Sahlberg
158f2226c0 TEST: read10invalid use the reported blocksize instead of a hardcoded value 2013-09-17 09:16:59 -07:00
Sitsofe Wheeler
221e1fef76 TESTS: Fix READ6 test
Commit 45a3752d16 skips all tests from
read-at-eol onwards when the LUN is large. Fix this by only skipping the
read-at-eol tests in this scenario.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2013-09-10 09:52:06 +01:00
Sitsofe Wheeler
0b6b12ba53 TESTS: Fix COMPAREANDWRITE tests to send write data
Previously COMPAREANDWRITE was only sending verify instance data which
can cause targets to generate COMMAND ABORTED/NOT ENOUGH UNSOLICITED
DATA errors due to the buffer being obviously too small to contain
verify AND write instance data.

The buffer size check has been modified and compareandwrite tests
updated to pass a larger buffer with interesting write instance data.
2013-09-09 17:48:13 +01:00
Ronnie Sahlberg
45a3752d16 TESTS: Abort READ6 test if lun is bigger than what READ6 can address 2013-09-02 12:19:24 -07:00
Sitsofe Wheeler
489f9b27e3 Fix incorrect second initiator. 2013-08-30 09:14:37 +01:00
Ronnie Sahlberg
daac72a8f9 TESTS more writesame1* test fixes 2013-08-25 16:39:38 -07:00
Ronnie Sahlberg
ab600e39b0 TESTS: Fixes to the WRITESAME tests 2013-08-25 15:26:36 -07:00
Ronnie Sahlberg
7772b9fafd TESTS: Fix memory leak in the VERIFY16 Mismatch test 2013-08-04 14:07:06 -07:00
Paolo Bonzini
3916872d27 use scsi_get/set_uint16/32/64 in tests
Fixes ARM problems too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-08-02 17:30:24 +02:00
Ronnie Sahlberg
e7df1af3b9 TESTS: READ10 and STARTSTOPUNIT should fail while sanitize is in progress
Other commands should fail too  but we dont need to test them all
2013-07-21 14:33:22 -07:00
Ronnie Sahlberg
03f03ce518 TESTS: Inquiry is still allowed while SANITIZE is running 2013-07-21 14:21:16 -07:00
Ronnie Sahlberg
d901700633 Add a test that a sanitize operation will continue across resets
Verify that abort task/abort task set/lun reset/warm reset/cold reset
and full blown session failures will not affect a sanitize that is in
progress
2013-07-21 14:11:13 -07:00
Ronnie Sahlberg
b1b3c603af TESTS: clear unit attention after changing SWP settings in the readonly test 2013-07-21 09:20:00 -07:00
Ronnie Sahlberg
52a83e91af Add POWER_CONDITION modepage marshalling/unmarshalling 2013-07-20 15:35:38 -07:00
Ronnie Sahlberg
c172e12968 UTILS: Check that an iscsi url was provided on the command line before strdup()ing it 2013-07-20 09:01:38 -07:00
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
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
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
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
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
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