test-tool: Refactoring residuals write tests
Looking at test_write10_residuals.c, test_write12_residuals.c and test_write16_residuals.c tests the similarity of the testing scenario can be found. There are several EDTL and SPDTL combinations which are the same for different length write command tests. They form the core of testing scenario of these commands. There aren't so much differences in the way of testing these combinations itself either. It is possible to move the main parameters describing the testing scenario into a separate structure and move the scenario itself into a separate function. It will increase the readability and reduce the duplicate code of these tests.
This commit is contained in:
@@ -37,6 +37,9 @@ extern "C" {
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
#define ISCSI_RAW_HEADER_SIZE 48
|
||||
#define ISCSI_DIGEST_SIZE 4
|
||||
|
||||
Reference in New Issue
Block a user