test_multipathio_simple: Only compare if READ10 succeeded

Since the data in the read buffer is not valid if READ10() failed,
only compare the data in the read buffer if READ10() succeeded.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
Bart Van Assche
2017-02-21 17:10:18 -08:00
committed by Ronnie Sahlberg
parent 0241fe8014
commit e5296920e9
2 changed files with 17 additions and 11 deletions

View File

@@ -320,7 +320,7 @@ do { \
} while (0);
#define READ10(...) \
do { \
({ \
int _r; \
_r = read10(__VA_ARGS__); \
if (_r == -2) { \
@@ -331,7 +331,8 @@ do { \
return; \
} \
CU_ASSERT_EQUAL(_r, 0); \
} while (0);
_r; \
})
#define READ12(...) \
do { \
@@ -602,7 +603,7 @@ do { \
} while (0);
#define WRITE10(...) \
do { \
({ \
int _r; \
_r = write10(__VA_ARGS__); \
if (_r == -2) { \
@@ -613,7 +614,8 @@ do { \
return; \
} \
CU_ASSERT_EQUAL(_r, 0); \
} while (0);
_r; \
})
#define WRITE12(...) \
do { \