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
Bart Van Assche
be9b803334
test-tool: Avoid that using receive_copy_results() triggers a use-after-free
...
Move the scsi_free_scsi_task() call from receive_copy_results() to the
callers of this function to avoid that accessing the unmarshalled data
triggers a use-after-free.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-12-24 10:38:38 -08:00
Bart Van Assche
cacc144a29
test-tool: Initialize parameter buffers
...
This patch avoids that Valgrind reports that an uninitialized buffer
is passed to writev():
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x5557D07: writev (in /lib64/libc-2.19.so)
by 0x5269BFD: iscsi_iovector_readv_writev (socket.c:509)
by 0x526A7A9: iscsi_write_to_socket (socket.c:727)
by 0x526AE47: iscsi_service (socket.c:888)
by 0x526B632: event_loop (sync.c:67)
by 0x526D925: iscsi_scsi_command_sync (sync.c:1223)
by 0x405970: send_scsi_command (iscsi-support.c:276)
by 0x40B190: extendedcopy (iscsi-support.c:2673)
by 0x40E9FE: test_extendedcopy_param (test_extendedcopy_param.c:63)
by 0x503E260: ??? (in /usr/lib64/libcunit.so.1.0.1)
by 0x503E56E: ??? (in /usr/lib64/libcunit.so.1.0.1)
by 0x503E8A5: CU_run_all_tests (in /usr/lib64/libcunit.so.1.0.1)
Address 0xffefff864 is on thread 1's stack
in frame #8 , created by test_extendedcopy_param (test_extendedcopy_param.c:31)
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-12-24 10:36:55 -08:00
Ronnie Sahlberg
7b8363827b
libiscsi: Fix RECEIVE COPY RESULTS response unmarshalling
...
Allocate the correct amount of memory for the scsi_copy_results_copy_status
and scsi_copy_results_op_params structures.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-12-24 10:36:04 -08:00
Bart Van Assche
9ab1cc8baa
test-tool/*_dpofua: Fix memory leaks in error paths
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-12-24 08:55:25 -08:00
Bart Van Assche
e9536d3333
test-tool: Avoid that login failure causes a segmentation fault
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-12-24 08:54:40 -08:00