Ross Judson
90b6658482
Match actual option name with usage
2014-03-26 12:14:33 -04:00
Ross Judson
81c71649e7
Fix usage to reflect options with underscore
2014-03-26 12:11:25 -04:00
Ronnie Sahlberg
ea790b2f75
AUTOTOOLS: Add Makefile.am to test-tool
2014-03-22 16:46:25 -07:00
Bart Van Assche
e8545d6a03
verify1[02]_invalidfieldincdb(): Fix an error message
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
2014-03-15 08:45:21 -07:00
Jon Hermansen
d34d61a782
add automated XML output option to iscsi-test-cu
2014-03-11 16:15:19 -07:00
Jon Hermansen
d348633763
fix capacity checks in READ(6) tests
2014-03-11 10:44:54 -07:00
Ronnie Sahlberg
270db13f7c
TESTS: Warn not fail if inquiry descriptors do not contain SPC* or SBC*
...
Only print a warning but do not fail if the standard inquire version
descriptors do not contain a SPC* or SBC* entry.
2014-03-06 20:30:00 -08:00
Ronnie Sahlberg
b0dbecaff7
TESTS: compare and write: Invalidfieldincdb is illegal-request, not miscompare
2014-03-06 17:30:46 -08:00
Ronnie Sahlberg
879f542ebf
TESTS: CompareAndWrite are bounded by the max block setting in BlockLimits
...
Make sure that we check that a target returns an error if we try to compare and write too much.
2014-03-05 18:47:24 -08:00
Ronnie Sahlberg
fc91b41b5a
TESTS: Clear iscsi_local_iscsi_queue_pdy pointer before we return from the test.
2014-03-03 17:25:24 -08:00
Ronnie Sahlberg
dbc9ffb5cb
TESTS: ReportSupportedOpcodes return the opcode itself as data[0], not 0xff
...
The first byte of CDB USAGE FIELD contains the opcode value itself, not
0xff.
From SPC4 :
...
The first byte of the CDB USAGE FIELD
field shall contain the operation code for the command being queried.
...
2014-02-24 19:04:58 -08:00
Ronnie Sahlberg
cc81b67620
TESTS: Add tests for invalid iSCSI DATASN values.
2014-01-26 09:35:17 -08:00
Ronnie Sahlberg
5eb9d8750b
Merge pull request #87 from sitsofe/oldtests
...
OLD TESTS: Fix use after free in unsolicited_[non]immediate_data tests.
2014-01-26 08:25:49 -08:00
Sitsofe Wheeler
b42a6ede19
OLD TESTS: Fix use after free in unsolicited_[non]immediate_data tests.
...
After destroying iscsi, nullify iscsi_url's reference to it to prevent a use
after free.
Detected by clang's AddressSanitizer.
2014-01-25 08:59:35 +00:00
Sitsofe Wheeler
e1659b1973
TESTS: Fix WRITESAME tests to handle targets that don't like datalen == 0
...
Recent SBC specs say (when the WSNZ bit is set to one and the NUMBER OF LOGICAL
BLOCKS field is set to zero) or (if MAXIMUM WRITE SAME LENGTH is greater than 0
and the number of logical blocks specified to be written exceeds the MAXIMUM
WRITE SAME LENGTH) the server should terminate with CHECK CONDITION, set the
sense key to ILLEGAL REQUEST and the additional sense code to INVALID FIELD IN
CDB.
Update the WRITESAME tests to cope with this.
2014-01-25 05:37:45 +00:00
Sitsofe Wheeler
38ba5b6c0e
Fix logging typo.
2014-01-24 18:56:54 +00:00
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