21 Commits

Author SHA1 Message Date
Bart Van Assche
33c66f2c39 test-tool, compare and write: Reduce maximum number of blocks from 256 to 255
Since the NUMBER OF LOGICAL BLOCKS field in the COMPARE AND WRITE command
is an 8 bit field, the maximum value that can be encoded is 255.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2020-05-21 18:39:49 -07:00
Tim Crawford
9347cfebf2 Replace file variables with .dir-locals.el
Signed-off-by: Tim Crawford <tcrawford@datto.com>
2019-02-21 11:54:02 -05:00
Bart Van Assche
8f2abea4de test-tool/test_compareandwrite_simple: Limit the number of blocks used
Make sure that 'maxbl' does not exceed the LUN capacity.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
2018-03-02 14:02:25 -08:00
Bart Van Assche
18de10174b test-tool/test_compareandwrite_simple(): Fix end-of-LUN test
Make sure that the end-of-LUN test happens at the end of the LUN instead
of at the start of the LUN.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
2018-03-02 14:02:22 -08:00
Bart Van Assche
8f468b14fc test-tool/test_compareandwrite_*: Stop at end of medium
Since the argument num_blocks - i is passed as the LBA argument
to COMPAREANDWRITE(), avoid that a negative number is passed.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
2018-03-02 14:02:18 -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
c48283fe75 Tests: add helpers for read*
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-02-21 15:45:23 -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
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
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
811c04f01a TESTS: read12/read16 change signature to return an optional task structure
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-12 20:25:04 -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
46eaa7dcc3 TESTS: convert compareandwrite to new api
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
2014-09-18 14:07:22 -07:00
Ronnie Sahlberg
28b0a0ab11 TESTS: update the READ tests to the new API
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
2014-09-18 13:12:58 -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
Bart Van Assche
bb8d01e093 test_compareandwrite_simple: Make error messages more verbose
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2014-08-04 16:05:09 -07:00
Ronnie Sahlberg
879f542ebf TESTS: CompareAndWrite are bounded by the max block setting in BlockLimits
Make sure that we check that a target returns an error if we try to compare and write too much.
2014-03-05 18:47:24 -08:00
Edward Tomasz Napierala
f9d4c742a2 Replace alloca.h with stdlib.h; the former doesn't exist on FreeBSD. 2013-09-23 11:34:06 +02:00
Ronnie Sahlberg
9f1a28f753 TESTS: Add an initial simple test for COMPARE_AND_WRITE
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2013-09-22 17:02:30 -07:00