Peter Lieven
a7c94a7af5
connect: invoke all callbacks for dropped PDUs
...
if we drop a PDU which has a callback we should invoke it otherwise
the caller may wait infinetely for a command completion.
Signed-off-by: Peter Lieven <pl@kamp.de >
2016-03-17 12:08:26 +01:00
Peter Lieven
97406c5b36
Revert "Fail pending LOGOUT commands on session reconnect"
...
This seriously breaks qemu NOP timeouts and probably other things.
The reason is that the
define ISCSI_PDU_ERROR_ON_RECONNECT 0x00000016
is masking bits 0x2 and 0x4 as well.
Correctly it should read:
define ISCSI_PDU_ERROR_ON_RECONNECT 0x00000010
However, the better solution for this approach is invoke all callbacks
of PDUs which carry the ISCSI_PDU_DROP_ON_RECONNECT flag. This will
make sure that callbacks of whatever sync tasks are invoked.
This reverts commit 0407cf6aed .
2016-03-17 12:08:20 +01:00
Ronnie Sahlberg
d6e76e8ba4
Merge pull request #191 from ddiss/test-async
...
Tests: Asynchronous iSCSI
2016-03-14 19:42:22 -07:00
David Disseldorp
9ae5a64662
Tests: Asynchronous iSCSI Multipath Compare And Write
...
Dispatch a number of Compare And Write requests simultaneously via
separate iSCSI sessions and await all responses.
Signed-off-by: David Disseldorp <ddiss@suse.de >
2016-03-11 19:16:10 +01:00
David Disseldorp
51da17c41f
Tests: Asynchronous iSCSI write test
...
Dispatch a number of WRITE10 requests simultaneously, and await all
responses.
Signed-off-by: David Disseldorp <ddiss@suse.de >
2016-03-11 18:53:24 +01:00
David Disseldorp
ebeca19480
Tests: Asynchronous iSCSI read test
...
Dispatch a number of READ10 requests simultaneously, and await all
responses.
The iscsi-support test helper functions are currently all synchronous,
so this test mostly uses the bare libiscsi API. As new async tests are
added, we can make a more informed decision on which boilerplate code
can be split out.
Signed-off-by: David Disseldorp <ddiss@suse.de >
2016-03-10 18:20:37 +01:00
Ronnie Sahlberg
83a4f54cb8
Remove a trailing CU_ASSERT_EQUAL(ret we no longer need
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-24 18:11:14 -08:00
Ronnie Sahlberg
c5bc0a49b0
Tests: Fix the retry loop for the reserve6 helpers.
...
We should exit the loop once we have a command that is NOT
aborted with unit attention.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-23 21:34:34 -08:00
David Disseldorp
2feb4d40db
TESTS: add 4MB overlap test to write10_simple
...
Ceph RADOS block devices split images into 4MB objects. This test
ensures that cross object IOs are successful.
Signed-off-by: Daniel Oliveira <doliveira@suse.com >
Signed-off-by: David Disseldorp <ddiss@suse.de >
2016-02-23 21:00:25 -08:00
Ronnie Sahlberg
8a44851128
Tests: Add a helper for the all_zero checker
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-23 19:26:15 -08:00
Ronnie Sahlberg
b4320bd76c
Tests: convert tabs to 8 spaces
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 16:17:18 -08:00
Ronnie Sahlberg
5a80c7b581
Fix some clang warnings
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 16:13:53 -08:00
Ronnie Sahlberg
efedc02224
Test: Add helper for MODESENSE6
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:52:26 -08:00
Ronnie Sahlberg
b5402d55c2
Tests: Make readonly-sbc tests use the new helpers
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:52:15 -08:00
Ronnie Sahlberg
ce0a22e040
Tests: Use the helpers in NoMedia tests
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:52:03 -08:00
Ronnie Sahlberg
1deee0898a
Tests: Add a test that RC16 must be supported when SBC3 is claimed
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:51:53 -08:00
Ronnie Sahlberg
9f81ae91fe
Tests: Add helper for READCAPACITY10
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:51:42 -08:00
Ronnie Sahlberg
80e06cae30
Tests: Add helped for UNMAP
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:51:34 -08:00
Ronnie Sahlberg
d3913ee864
Tests: add helpers for synchronizecache
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:51:20 -08:00
Ronnie Sahlberg
ea8e4c4115
Tests: add helper for TESTUNITREADY
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:51:11 -08:00
Ronnie Sahlberg
05fb882e19
Tests: add getlbastatus helper
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:50:58 -08:00
Ronnie Sahlberg
23a9278e23
Tests: Add helpers fro preventallow/startstopunit
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:49:22 -08:00
Ronnie Sahlberg
d910bab852
Tests: add helpers for PREFETCH*
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:48:53 -08:00
Ronnie Sahlberg
9d7103e5ac
Tests: helpers for READ6
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:48:22 -08:00
Ronnie Sahlberg
935c2cba22
Tests: helper for READCAPACITY16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:47:59 -08:00
Ronnie Sahlberg
c48283fe75
Tests: add helpers for read*
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:45:23 -08:00
Ronnie Sahlberg
0a814db48f
Tests: Add helpers for ORWRITE
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:40:59 -08:00
Ronnie Sahlberg
69f4dc76ca
Tests: Convert remaining write16 to new helpers
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:40:32 -08:00
Ronnie Sahlberg
b01780b9ee
Tests: Add helpers for ExtendedCopy and ReceiveCopyResults
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:39:59 -08:00
Ronnie Sahlberg
9afd4a4412
Test: add helpers for reserve6/release6
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:36:18 -08:00
Ronnie Sahlberg
39d128db6d
Tests: Add helpers for SANITIZE
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:34:54 -08:00
Ronnie Sahlberg
d18dbe49aa
Tests: add helper for WRITEATOMIC16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:32:41 -08:00
Ronnie Sahlberg
0b5b724f17
Tests: Add helpers for WRITESAME
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:28:59 -08:00
Ronnie Sahlberg
4d1e3aecd0
Tests: add helper macro for REPORT_SUPPORTED_OPCODES
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:25:21 -08:00
Ronnie Sahlberg
f699503f8c
Tests: Create helper macro for COMPAREANDWRITE
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:21:46 -08:00
Ronnie Sahlberg
f88bcf61cc
Tests: Create a global scratch buffer and avoid allocating memory in the tests
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:17:43 -08:00
Ronnie Sahlberg
b4e4649ae5
Tests: Add helper macros for Verify*
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:14:06 -08:00
Ronnie Sahlberg
eba1ac059a
Tests: Add helper macros for Write*
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:07:55 -08:00
Ronnie Sahlberg
bd29dab95b
Tests: Create helper macros for the WriteVerify* commands
...
By creating a helper macros for WriteVerify we can save a lot of boilerplate
code.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 15:04:36 -08:00
Ronnie Sahlberg
72cfdbb5f1
Tests: Make null pointer asserts abort the test
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-21 14:55:54 -08:00
Ronnie Sahlberg
0f886b7d3a
TaskMgmt: Remove null pointer check
...
We do not need to check the pointer for null here since it is guaranteed
to never be.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-20 14:36:32 -08:00
Ronnie Sahlberg
b240bf1a2c
Don't free() things allicated through scsi_malloc()
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-20 14:27:52 -08:00
Ronnie Sahlberg
0629d44e83
Remove C99 style variable declarations
...
Make it slightly more portable and move the declarations to the start of the
function.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-18 21:50:35 -08:00
Ronnie Sahlberg
99a5f99527
Add some emacs defaults. Tabs are 8 spaces.
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-18 21:34:43 -08:00
Ronnie Sahlberg
da4496a232
Add create/remove lun helpers to the test suite
...
Add better helpers to allow creating multiple LUNs for the tests and to
set the size of the luns.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2016-02-18 21:33:33 -08:00
Ronnie Sahlberg
e805db8793
Merge pull request #188 from sitsofe/socket-perf-fixes
...
Socket and iscsi-perf fixes
2016-02-11 06:53:49 -08:00
Sitsofe Wheeler
403ec4493a
iscsi-perf: Add ULL suffix to large integer literals
...
Add ULL to all the large integer literals. Without this they can be
treated as being signed by the compiler (at least on 32 bit machines)
leading to underflow problems and strange output when calculating the
elapsed time.
2016-01-30 09:44:45 +00:00
Sitsofe Wheeler
831b222917
iscsi-perf: Allow a better clock to be used
...
7c6a3e4a0b wound up always forcing the
usage of gettimeofday (even when the more accurate CLOCK_MONOTONIC was
available) because the define to indicate its availability is in
config.h which wasn't included.
Fix this by including config.h, correct the misnamed variable in the
CLOCK_MONOTONIC branch and rename VERSION to PERF_VERSION to avoid the
naming conflict.
2016-01-30 09:44:34 +00:00
Sitsofe Wheeler
6ea30f9fb2
socket: Simplify SOL_TCP check
...
Rather than checking for the names of OSes that don't implement it
just check whether the define is available directly.
2016-01-30 08:12:28 +00:00
Sitsofe Wheeler
4714e12e8f
socket: Use alternatives if MSG_NOSIGNAL is unavailable
...
Only Linux has MSG_NOSIGNAL as a socket flag (see
http://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly
) which makes compilation fail on other OSes. The BSDs and OS X have
SO_NOSIGPIPE which implements the same thing but others like
Solaris don't even have that (see
http://stackoverflow.com/questions/2205455/detecting-broken-pipe-in-solaris-send-call
)...
Work around this by checking using MSG_NOSIGNAL or SO_NOSIGPIPE if
available otherwise don't set anything at all so we at least continue
to compile.
2016-01-30 07:50:50 +00:00