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:
committed by
Ronnie Sahlberg
parent
0241fe8014
commit
e5296920e9
@@ -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 { \
|
||||
|
||||
Reference in New Issue
Block a user