Commit Graph

11 Commits

Author SHA1 Message Date
Bart Van Assche
b3783b961b test-tool: Avoid that Valgrind complains about uninitialized data
Avoid that Valgrind reports complaints similar to the following:

Syscall param writev(vector[...]) points to uninitialised byte(s)
   at 0x5567087: writev (writev.c:49)
   by 0x5265AE0: iscsi_iovector_readv_writev (socket.c:492)
   by 0x52666B5: iscsi_write_to_socket (socket.c:710)
   by 0x5266CCC: iscsi_service (socket.c:852)
   by 0x526751F: event_loop (sync.c:67)
   by 0x5269B41: iscsi_scsi_command_sync (sync.c:1153)
   by 0x4050F6: send_scsi_command (iscsi-support.c:245)
   by 0x408007: compareandwrite (iscsi-support.c:1512)
   by 0x40B6AD: test_compareandwrite_dpofua (test_compareandwrite_dpofua.c:69)
   by 0x503EC99: ??? (in /usr/lib/libcunit.so.1.0.1)
   by 0x503EF27: ??? (in /usr/lib/libcunit.so.1.0.1)
   by 0x503F2A5: CU_run_all_tests (in /usr/lib/libcunit.so.1.0.1)
 Address 0xffeffff10 is on thread 1's stack
 in frame #8, created by test_compareandwrite_dpofua (test_compareandwrite_dpofua.c:30)

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-04-11 08:49:59 -07:00
Ronnie Sahlberg
072291c852 TESTS: change the function signatures for the helpers
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-09-18 18:19:04 -07:00
Ronnie Sahlberg
9b768f7de9 TESTS: move the default url, lun and iscsi context into a structure
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-09-18 16:42:45 -07:00
Ronnie Sahlberg
398f03205d TESTS: update unmap to new api
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
2014-09-18 14:07:22 -07:00
Ronnie Sahlberg
9e75b10103 TESTS: change get_lba_status to new api
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
2014-09-18 14:07:22 -07:00
Ronnie Sahlberg
8ffd78c117 temp: redo the write10/12/16 commands to the new saner api
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
2014-09-18 12:07:57 -07:00
Peter Lieven
a2592bff3a test-tool: improve GetLBAStatus.UnmapSingle
the test became nearly useless when reverting most
of its contents in commit 7d96336.

This patch adds some useful stuff back. While
we can't check that unmapped blocks are deallocated
we still can check that the blocks surrounding the
unmapped area don't get dealloaced.

Signed-off-by: Peter Lieven <pl@kamp.de>
2014-08-13 17:55:09 +02:00
Ronnie Sahlberg
7d96336d52 TESTS: don't check that UNMAP actually unmapped the blocks
We can not test that UNMAP will actually unmap anything even if
it returned status GOOD from the device.
Devices are allowed to "do nothing and return status GOOD" whenever they
want to.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-07-23 17:22:16 -07:00
Ronnie Sahlberg
cefb6a6127 TESTS: update the get_lba_status + unmap test to account for lbppbe
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-07-16 05:37:34 -07:00
Ronnie Sahlberg
e09d5fcefc Typo
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-07-14 20:29:23 -07:00
Ronnie Sahlberg
a41ec1fe60 TESTS: Add tests that get_lba_status for a single range works
Add a test for unmapping a single range of blocks and that
get_lba_status returns correct data.

Test unmapping a single block at offsets 0-255

Test unmapping 1-255 blocks at offset 0 and verify that
get_lba_status at LBA 0 returns a descriptor of 1-255 blocks.
get_lba_status at the last block of the unmapped range returns
a descriptor for a single block.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-07-14 19:46:12 -07:00