Ronnie Sahlberg
8bc3d51cd4
TESTS: improve verify tests to detect/abort on opcode not supported furthter
2012-08-30 20:22:16 -07:00
Ronnie Sahlberg
b4594c1ff3
TESTS: Add check and skip tests for targets that do not implement VERIFY*
2012-08-30 20:09:53 -07:00
Ronnie Sahlberg
dcc41d5c43
Merge branch 'master' of github.com:sahlberg/libiscsi
2012-08-30 16:08:57 -07:00
Ronnie Sahlberg
01d3450ef5
Merge pull request #13 from bonzini/master
...
iscsi-test improvements
2012-08-30 16:08:10 -07:00
Paolo Bonzini
e4377e7d91
iscsi-test: return -2 when skipping tests
...
This lets a test driver distinguish failure from skipping unsupported
tests.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2012-08-30 17:39:00 +02:00
Paolo Bonzini
c7b519524c
iscsi-test: prepare to return exit status 77 for skipped tests
...
Teach the test harness to distinguish skipped tests from failed tests.
Return -2 from a skipped test and, if no test was failed but some were
skipped, return 77 from the main program.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2012-08-30 17:38:12 +02:00
Paolo Bonzini
f04471d642
iscsi-test: do not test read-only for non-SBC devices
...
The device-specific parameter is not defined in MMC.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2012-08-30 17:38:05 +02:00
Paolo Bonzini
418058e52a
iscsi-test: do not test DPO/FUA for non-SBC devices
...
These bits are not defined in MMC.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2012-08-30 17:37:53 +02:00
Paolo Bonzini
560241b494
iscsi-test: avoid declaring struct inside parameter list
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2012-08-30 17:37:50 +02:00
Paolo Bonzini
778aacb47f
fix building out-of-tree
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2012-08-30 17:37:38 +02:00
Ronnie Sahlberg
7b3c04a43c
Use a better iqn name for ld_iscsi.so
2012-08-17 14:50:40 +10:00
Ronnie Sahlberg
d1c7b17cf5
TEST: Start adding tests for invalid BUFFEROFFSET in DATA-IN
2012-08-12 12:51:37 +10:00
Ronnie Sahlberg
7c2fada513
TEST: Add test that DATASN in reverse order is detected as an error
2012-08-12 11:12:12 +10:00
Ronnie Sahlberg
5754851b9d
TESTS: More tests for invalid DATASN
2012-08-10 16:48:17 +10:00
Ronnie Sahlberg
6412834754
TEST: Add test that invalid DATASN for DATAIN is detected as an error
...
Send a write containing two DATA-IN PDUs in a sequence but both PDUs have DATASN==0
This is an error and the target should react to this as an invalid command
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-08-10 16:08:55 +10:00
Ronnie Sahlberg
0cf42c3662
TESTS: Add a test for ISCSI CMDSN out of range
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-08-10 15:36:10 +10:00
Ronnie Sahlberg
1a387632a9
TEST: Use better default iscsi name for the test tool
2012-08-10 11:27:10 +10:00
Ronnie Sahlberg
b7f342906f
Change to proper default IQN names for the iscsi-ls/-inq utilities
...
Change the default iqn name for the utilities to
iqn.2007-10.com.github:sahlberg:libiscsi:iscsi-ls/-inq
2012-08-10 10:17:47 +10:00
Ronnie Sahlberg
8eedcfed60
Merge pull request #12 from bonzini/libiscsi-tarball
...
include lib/libiscsi.syms in tarball
2012-08-09 14:17:27 -07:00
Paolo Bonzini
b5d6a9ff6f
include lib/libiscsi.syms in tarball
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2012-08-09 15:38:46 +02:00
Ronnie Sahlberg
185649144d
Update the MTX patch for libiscsi.
...
MTX sets XFER-direction to "WRITE" even if the xfer length is 0
Catch this condition so that we pass XFER-direction==NONE to libiscsi for this case
2012-08-09 20:46:54 +10:00
Ronnie Sahlberg
08034c3335
SYNC CONNECT: make sure state is non-NULL before we dereference it
2012-08-09 08:46:29 +10:00
Ronnie Sahlberg
06cc2d2ece
CONNECT: connect data is not always malloc()ed so we can demand it is free()able
...
After a sync connection, make sure to clear connect_data since it will otherwise
point to a structure on the stack.
2012-08-09 08:27:48 +10:00
Ronnie Sahlberg
a98b6e63f0
MAXCMDSN: Stop sending new PDUs to the target when maxcmdsn is reached
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-08-02 09:46:42 +10:00
Ronnie Sahlberg
71be26ad03
Add tracking of MAXCMDSN
2012-08-02 09:09:22 +10:00
Ronnie Sahlberg
439f68e555
CONNECTION: Track the connection state and callback via the context structure
...
Dont free the connection state when login is finished, instead track it via the
iscsi context structure and free it once the context is destroyed
2012-08-02 08:51:25 +10:00
Ronnie Sahlberg
d5d062a494
TESTS: For the invalid tests, treat the target dropping the session as OK
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-08-01 16:38:30 +10:00
Ronnie Sahlberg
77d8e41be7
TESTS: Add a mechanism to temporarily disable the session reconnect
...
Some tests may cause a target to drop the session.
For these tests we DO want the test tool to detect that the command
failed and later reconnect the session again when we proceed to the next subtest
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-08-01 16:32:40 +10:00
Ronnie Sahlberg
98b0a757b2
R2T: Reset datasn to 0 everytime we start a new sequence from r2t
2012-08-01 13:44:03 +10:00
Ronnie Sahlberg
1f98c40edf
DATASN: We have to increment DATASN in each DATA-OUT PDU in a sequence.
...
For writes that span across multiple DATA-OUT segments we have to
increment the DATASN field for each segment.
We didnt use to, and most targets were perfectly happy, ignoring that the DATASN was constant 0 for every DATAOUT we sent.
LIO however does check this and did cause it to reject the libiscsi test tool.
(This is something we should write a iscsi test for so we can flag all non-LIO targets as broken and needing to be fixed)
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-08-01 13:30:13 +10:00
Ronnie Sahlberg
2a15e39460
Add a new sense code
2012-07-30 07:38:38 +10:00
Ronnie Sahlberg
9986cd85d7
ISCSI: Support devices with more than 255 LUNs
2012-07-25 13:24:55 +10:00
Ronnie Sahlberg
fbc4f3584b
TEST: Add initial test for "test that all mandatory SBC commands are there"
...
Some tests are just stubs since we underlying vommands have not been
implemented in libiscsi yet.
2012-07-22 08:52:25 +10:00
Ronnie Sahlberg
458c342839
typo
2012-07-22 07:37:04 +10:00
Ronnie Sahlberg
94cd6bf3b1
TEST: Add test that PREVENTs on different IT_Nexuses do not interfere
2012-07-21 15:04:53 +10:00
Ronnie Sahlberg
af9d3eab79
fix a typo
2012-07-21 12:27:51 +10:00
Ronnie Sahlberg
d8ed7d4053
TESTS, After a target/lun reset, wait until the lun stabilizes before continuing the tests
2012-07-21 12:26:24 +10:00
Ronnie Sahlberg
9205a71135
fix typo in test, we try to reset the LUN, not the target
2012-07-21 12:09:59 +10:00
Ronnie Sahlberg
313d579464
TEST: Add a test that a LUN reset will clear PREVENTALLOW
2012-07-21 12:05:25 +10:00
Ronnie Sahlberg
ca046ab342
TEST: add a test that a Cold Reset will clear PREVENTALLOW
2012-07-21 11:59:34 +10:00
Ronnie Sahlberg
7d0393452c
TEST: Add a test that PREVENTALLOW is cleared byb a warm reset
2012-07-21 11:53:26 +10:00
Ronnie Sahlberg
44bf8a5a3a
TEST: Add a test that a I_T_Nexus loss clears the PREVENTALLOW on that nexus
2012-07-21 11:17:09 +10:00
Ronnie Sahlberg
5953607743
TEST: add test that we can not eject media when PREVENTALLOW is set on the I_T_nexus
2012-07-21 10:43:33 +10:00
Ronnie Sahlberg
43bf059fca
Add ASCQ for MEDIUM_REMOVAL_PREVENTED
2012-07-21 10:28:32 +10:00
Ronnie Sahlberg
5cf3ccca75
TEST: Add simple test for PREVENTYALLLOWMEDIUMREMOVAL
2012-07-21 10:04:37 +10:00
Ronnie Sahlberg
b8e08a355d
TESTS: Add test for all media access commands that they fail correctly on ejected media
2012-07-18 08:03:29 +10:00
Ronnie Sahlberg
16da01ed4e
Add PREVENTALLOWMEDIUMREMOVAL support
2012-07-17 18:12:03 +10:00
Ronnie Sahlberg
4a3935770d
TEST Add test for powercondition and eject
2012-07-16 21:43:27 +10:00
Ronnie Sahlberg
db68e68f6d
TEST: add simple test for STARTSTOPUNIT
2012-07-16 21:06:52 +10:00
Ronnie Sahlberg
1f40de8858
compiler warnings
2012-07-15 08:13:40 +10:00