Commit Graph

442 Commits

Author SHA1 Message Date
vn516726
262ac3b5c6 Corrected the log 2014-01-24 11:39:25 +08:00
Ronnie Sahlberg
25078d0d91 Old TESTS: Abort 0180 thin provisioning test early if the LUN does not have LBPME enabled 2014-01-06 18:36:48 -08:00
Ronnie Sahlberg
993be6c439 Free the correct inq task to avoid leaking memory during startup. 2014-01-06 18:26:03 -08:00
Ronnie Sahlberg
0a7d1407f0 Fix a segfault in the old T0184 WS10 test 2014-01-06 18:23:04 -08:00
Michael Tokarev
120b308741 Spelling fixes: Dont => Don't
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-16 18:19:24 -08:00
Ronnie Sahlberg
f08e68e52a Merge pull request #77 from sitsofe/read6
TESTS: Fix READ6 test
2013-11-03 16:39:21 -08:00
Bart Van Assche
29f3d33944 test-tool/0184_writesame10_0blocks.c: Include WSNZ bit in test
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:40:33 -07:00
Bart Van Assche
08ed1c2aea Add two additional READ16-beyond-eol tests
This helps testing SCSI target implementations that represent the
byte offset from the start of the device as a signed or unsigned
64-bit integer.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:39:05 -07:00
Bart Van Assche
ba8a8d0a4e test tool: Fix a memory leak in test_reserve6_lun_reset.c
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:37:55 -07:00
Bart Van Assche
b6b49e4a66 test tool: Fix memory leaks in test setup and teardown functions
Free read_write_buf and task after each test. Free iscsi2 after
each PGR test when using CUnit version 2. Note: CUnit version 1
doesn't support test setup and teardown functions.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:36:50 -07:00
Bart Van Assche
a1f32527d5 test tool: Fix a memory leak in test-tool/test_reserve6_logout.c
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:35:22 -07:00
Bart Van Assche
d6ecafa6f5 test tool: Fix a memory leak in test_preventallow_logout.c
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:35:01 -07:00
Bart Van Assche
9c7092e85c test tool: Fix a memory leak in testunitready_clear_ua()
Avoid leaking 'task' if task->status != SCSI_STATUS_GOOD.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:34:36 -07:00
Bart Van Assche
9f89f220f5 test tool, WRITESAME(16) UNMAP test: Avoid leaking 'buf' if a precondition fails
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:34:04 -07:00
Bart Van Assche
64e800a437 test tool, RESERVE(6) tests: Avoid leaking 'iscsi2'
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2013-10-23 05:33:35 -07:00
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