Commit Graph

1445 Commits

Author SHA1 Message Date
Ronnie Sahlberg ca6875e69d TESTS: Add tests for the flags for PREFETCH10/16 2012-09-05 19:17:16 -07:00
Ronnie Sahlberg e78c5ae8a4 Merge pull request #14 from bonzini/iscsi-test
test-tool: 0214 was reading twice from -1
2012-09-04 19:15:18 -07:00
Paolo Bonzini 0abacf8fa4 test-tool: 0214 was reading twice from -1
It should read once from -1, once from 2^31.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-09-04 18:34:38 +02:00
Ronnie Sahlberg 61488fd381 New version 1.0.6 2012-09-03 10:17:43 -07:00
Ronnie Sahlberg d6bbe8fe44 TESTS: PREFETCH10/16, add test for prefetch-lengt==0 2012-09-03 10:00:53 -07:00
Ronnie Sahlberg 81e935ffb0 TESTS: PREFETCH10/16 are optional. Skip test if not supported on target 2012-09-03 09:52:43 -07:00
Ronnie Sahlberg 116af01156 TYPO: Change periperal_device_type to just device_type
but leave the old name as a define for backward compatibility
2012-09-03 09:45:59 -07:00
Ronnie Sahlberg 77fc2497f7 TESTS: Change all tests to use 'block_size' instead of hardcoded 512
This should allow the testst to work corectly on block devices with 4k blocksize too.
2012-09-03 08:58:56 -07:00
Ronnie Sahlberg 5639b92d95 Improve documentation for when tasks may be cancelled 2012-08-31 16:18:59 -07:00
Ronnie Sahlberg 6ef4bbd3e1 TEST: add back extra test for invalid buffer offsets 2012-08-31 16:15:53 -07:00
Ronnie Sahlberg 6a24b283f8 TEST: If we timeout a test, drop all wait/out pdus from the list
we dont want the callbacks anymore.
2012-08-31 16:12:21 -07:00
Ronnie Sahlberg c526b9e954 TESTS: remove compiler warnings 2012-08-31 15:26:23 -07:00
Ronnie Sahlberg 09573068ad TESTS: Skipped tests should return -2 2012-08-31 14:19:11 -07:00
Ronnie Sahlberg 4df1525415 TESTS: Additional checks for missing opcodes and skipping tests 2012-08-31 11:42:44 -07:00
Ronnie Sahlberg f3aacb3a5d TESTS: skip COMPARE-AND-WRITE tests on targets missing this opcode 2012-08-31 11:18:55 -07:00
Ronnie Sahlberg 98d18d5c42 TESTS: Add remaining checks for *verify* opcode not implemented skip test 2012-08-30 20:30:28 -07:00
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