Ronnie Sahlberg
20b4f9a3fb
tests: remove deprecated test tool iscsi-test
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2014-05-20 18:05:57 -07:00
Ronnie Sahlberg
e66b50f8ec
tests: use alloca when allocating scratch buffer for writesame
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2014-05-20 17:52:23 -07:00
Ronnie Sahlberg
b7089d64e1
Merge pull request #111 from jpocas/upstream
...
- test_unmap_simple: was assuming that zero buffer was already cleared, ...
2014-05-20 17:48:17 -07:00
jpocas
69c466a6c9
- writesame10 and writesame16 were looking at the datalen, when they wanted to be looking at the number of blocks
2014-05-07 13:49:25 -04:00
jpocas
b0c57802bc
- test_unmap_simple: was assuming that zero buffer was already cleared, which is not guaranteed and resulted in spurious failures
...
- writesame10_unmap_until_end, writesame16_unmap, writesame16_unmap_until_end were doing an CU_ASSERT *PER-BYTE* in the verification phase,
which was very CPU-intensive. This change uses memcmp on a whole block which finishes much quicker.
2014-05-07 13:32:21 -04:00
Ronnie Sahlberg
717b95cb8a
slist.h: rename SLIST_ to ISCSI_LIST_ to avoid clash on *BSD
...
Rename the macros for managing the linked lists from SLIST_* to ISCSI_LIST_*
to avoid a clash on *BSD which already have other macros SLIST_*
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2014-05-07 06:44:19 -07:00
Ronnie Sahlberg
91156cffe9
TESTS: Allow specifying a file instead of a test glob pattern
...
Allow specifying a --test <file> in which case the tests listed in the file
will be executed.
This makes it easier than having to specify a potentially huge number
of tests on the command line.
2014-03-26 19:10:12 -07:00
Ronnie Sahlberg
458764a77d
TESTS: Add support to specify multiple test glob expressions
2014-03-26 18:35:07 -07:00
Ronnie Sahlberg
68610bd7cf
TESTS: The SCSI test is called TestUnitReady, not UnitReady
2014-03-26 18:20:27 -07:00
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