Commit Graph

898 Commits

Author SHA1 Message Date
Ronnie Sahlberg f2a5ccb4f5 TEST: Allow --info to work when --list is used
iscsi-test --list --info
thus lists both all the major tests as well as all sub-tests
2012-07-10 17:27:24 +10:00
Ronnie Sahlberg 213918a2f3 LS --SHOW-LUNS Dont treat NOT_READY/MEDIUM_NOT_PRESENT as an error
Detect this sensecode and just print (No media) for that LUN
2012-07-10 16:50:16 +10:00
Ronnie Sahlberg cadc1650e1 Add ASCQ for MEDIUM_NOT_PRESENT 2012-07-10 16:40:58 +10:00
Ronnie Sahlberg fbd6a9a960 Fix incorrect prontout on test failure. Wrong sense printed 2012-07-10 16:29:34 +10:00
Ronnie Sahlberg 9e0e910810 New version 1.5.0 2012-07-09 15:19:25 +10:00
Ronnie Sahlberg e94504e1d0 Merge pull request #10 from aredlich/master
Please pull from my fork of libiscsi
2012-07-08 14:27:53 -07:00
Arne Redlich 6edf993507 Make headers in include/ digestible for C++
Also removes trailing whitespace in these files.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-07-08 13:38:41 +02:00
Arne Redlich 121e555897 slist.h: add include guards
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-07-08 13:34:22 +02:00
Ronnie Sahlberg 55a10b1534 Merge pull request #9 from yuripankov/master
FreeBSD and illumos do not define SOL_TCP
2012-06-30 14:05:22 -07:00
Chris Webb e671ba4699 Update examples/iscsi-dd.c to new iscsi_read10_task() API
Signed-off-by: Chris Webb <chris@arachsys.com>
2012-06-24 18:32:52 +10:00
Ronnie Sahlberg ecbff226b8 Improve tests for READ10/READ12/READ16 2012-06-24 07:55:49 +10:00
Ronnie Sahlberg 27ea207fd4 Improve WRITE10/12/16 tests 2012-06-24 07:43:28 +10:00
Ronnie Sahlberg 7e0e732128 Add tests for writing 0 blocks with WRITESAME10/16 2012-06-24 07:30:03 +10:00
Ronnie Sahlberg e7c8a173ab Add tests for the WRPROTECT bits for WRITESAME10/16 2012-06-23 21:40:58 +10:00
Ronnie Sahlberg 124b71bd80 READ10 tests. Add tests fopr lba 2^31 an lba -1 2012-06-23 21:25:39 +10:00
Ronnie Sahlberg 14a70127ce Add tests for WRITESAME10/16 for writing beyond the end of the device 2012-06-23 21:18:38 +10:00
Yuri Pankov 2a0ad3bd2d FreeBSD and illumos do not define SOL_TCP 2012-06-20 02:54:34 +04:00
Ronnie Sahlberg 04b5fc86d2 WRITE_SAME16 Tests update
Update the tests for write same 16 unmap to cover more cases
2012-06-17 21:32:56 +10:00
Ronnie Sahlberg 620ba234c3 WRITESAME10 UNMAP Tests updates
Make the WS10 tests more accurate for unmap operations and check for proper sense for invalid conditions,  like unmap=0 and anchor=1
2012-06-17 21:27:22 +10:00
Ronnie Sahlberg b23547546f LOGIN commands NEVER use header digest since even if the login is spanning multiple PDU sequences it is still treated as one logical operation.
Dont update the header_digest setting until we have finished login and are transitioning to the full-feature phase.
2012-06-17 12:37:13 +10:00
Ronnie Sahlberg 1d3e910769 TESTS: Add tests for WRITE10
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-05 19:36:25 +10:00
Ronnie Sahlberg d5f646099d READ10/WRITE10: Change these functions to sue the same signatures as the other READ/WRITE
Harmonize the signatures for READ10/WRITE10 to match the ones for READ12/16 and WRITE12/16

This breaks the API/ABI so this forces the next version of the library to bump the major version to 2.0

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-05 19:20:02 +10:00
Ronnie Sahlberg 5ccf2f4d87 Add tests for verify10/16 for lba out of range
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-04 20:45:59 +10:00
Ronnie Sahlberg 9130d2eb45 Add support for VERIFY12 and tests
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-04 20:35:15 +10:00
Ronnie Sahlberg 6003000809 Add VERIFY16 support and tests
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-04 20:16:44 +10:00
Ronnie Sahlberg f6fd18ee3a TEST: Fix cutnpaster typo
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-03 14:42:04 +10:00
Ronnie Sahlberg 34778d353c TEST: Add test for READ16 at LBA 2^63.
Surprisingly many targets do a LBA << 9 to covert to file offset internally
and thus return data from LBA==0   instead of returning a check condition and lba out of range

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-03 14:35:33 +10:00
Ronnie Sahlberg d908c1a642 TESTS: Improve the tests when reading from LBA -1
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-03 10:16:18 +10:00
Ronnie Sahlberg 26873ea6ce TESTS: Improve tests for reading at LBA -1
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-03 10:05:42 +10:00
Ronnie Sahlberg 5eca632542 TEST-TOOL: Allow wildcards for the test name.
So that you can run for example all read10 tests using
./bin/iscsi-test --test='*read10*' iscsi://127.0.0.1/iqn.ronnie.test/1

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-03 09:15:09 +10:00
Ronnie Sahlberg 288fd5e9fe TEST-TOOL: Add a --info argument to print more detailed infor what a test does
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-03 09:08:12 +10:00
Ronnie Sahlberg 9e09a46ddd LOGIN: Once the login phase has finished, bump ITT by one
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-02 17:51:10 +10:00
Ronnie Sahlberg 819248a519 LOGIN: Dont increment the ITT if the target wants another round of LOGIN
If the login phase takes multiple login requests we should keep the ITT the same for all login requets and not increment it.
A multi-phase login is only a single task eventhough it may be spread across multiple login requetst.

While most targets are forgiving and still work if we increment the ITT for each login command, some targets such as SOLARIS/COMSTAR is NOT forgiving if we break the protocol in this situation.

Fix the ITT handling so that we dont make SOLARIS/COMSTAR upset.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-06-02 15:41:38 +10:00
Ronnie Sahlberg a0a4677dfa TEST: Add GET_LBA_STATUS test for LBA out of range 2012-05-30 19:07:39 +10:00
Ronnie Sahlberg 812df62bfd SBC: Add GET_LBA_STATUS support and simple test 2012-05-30 18:41:12 +10:00
Ronnie Sahlberg 6be4a82407 Remove some unused variables 2012-05-30 18:23:15 +10:00
Ronnie Sahlberg 824a33c834 win32 set the socket to nonblocking moe for win32 2012-05-15 22:08:10 +10:00
Ronnie Sahlberg db8dadab21 win32 updat ethe example app iscsiclient to compile and link with the compatibility functions 2012-05-15 21:59:59 +10:00
Ronnie Sahlberg e4739d639f win32: build the library with win32_compat functions and also link the dll with kernel32 to get Sleep() 2012-05-15 21:57:05 +10:00
Ronnie Sahlberg dafa186868 win32: connect.c needs the compatibility functions 2012-05-15 21:54:10 +10:00
Ronnie Sahlberg 201d6c3b54 win32: sinc.c need the compatibility header so it finds the replacement for poll() 2012-05-15 21:51:53 +10:00
Ronnie Sahlberg 7215a917f2 win32: create a compatibility macro for sleep() 2012-05-15 21:49:29 +10:00
Ronnie Sahlberg 6c23b6acc1 win32: remove some definitions we dont need in the win32 compatibility header 2012-05-15 21:47:45 +10:00
Ronnie Sahlberg 05d2f81a84 win32: unistd.h is not available under win32 2012-05-15 21:45:30 +10:00
Ronnie Sahlberg ec0d9682a7 Dont use FIONREAD just rely on the fact the socket is nonblocking and look for EAGAIN when we reach the end of available data.
From Paolo Bonzini <pbonzini@redhat.com>
2012-05-15 20:32:37 +10:00
Michael Tokarev bb685e91f1 include stdlib.h for random declaration in test-tool/0132_verify10_mismatch_no_cmp.c
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-05-15 17:18:52 +10:00
Michael Tokarev 23b40111fc ignore m4/ directory and (re)create it in autogen.sh
m4/ is used by auto* tools to store (mostly libtool)
generated files.  Without it being present, autoreconf&Co
does not work, and with it present, git mentions untracked
files.  Fix both.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-05-15 17:18:11 +10:00
Ronnie Sahlberg 83730f7d4c w32: dont export our version of poll. 2012-05-13 17:21:53 +10:00
Ronnie Sahlberg 1c63b55e20 W32: update libiscsi.def with all new and missing symbols 2012-05-13 17:05:25 +10:00
Ronnie Sahlberg bd48629c8b W32: copy the compatibility functions for poll (and some others) from libnfs so win32 can use a porper poll emulation in the future. 2012-05-13 16:48:50 +10:00