Tests: Add helper for READCAPACITY10
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -335,6 +335,20 @@ do { \
|
|||||||
CU_ASSERT_EQUAL(_r, 0); \
|
CU_ASSERT_EQUAL(_r, 0); \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
#define READCAPACITY10(...) \
|
||||||
|
do { \
|
||||||
|
int _r; \
|
||||||
|
_r = readcapacity10(__VA_ARGS__); \
|
||||||
|
if (_r == -2) { \
|
||||||
|
logging(LOG_NORMAL, "[SKIPPED] READCAPACITY10 " \
|
||||||
|
"is not implemented."); \
|
||||||
|
CU_PASS("[SKIPPED] Target does not support " \
|
||||||
|
"READCAPACITY10. Skipping test"); \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
CU_ASSERT_EQUAL(_r, 0); \
|
||||||
|
} while (0);
|
||||||
|
|
||||||
#define READCAPACITY16(...) \
|
#define READCAPACITY16(...) \
|
||||||
do { \
|
do { \
|
||||||
int _r; \
|
int _r; \
|
||||||
|
|||||||
@@ -29,13 +29,9 @@
|
|||||||
void
|
void
|
||||||
test_readcapacity10_simple(void)
|
test_readcapacity10_simple(void)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
|
|
||||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||||
logging(LOG_VERBOSE, "Test basic READCAPACITY10");
|
logging(LOG_VERBOSE, "Test basic READCAPACITY10");
|
||||||
|
|
||||||
ret = readcapacity10(sd, NULL, 0, 0,
|
READCAPACITY10(sd, NULL, 0, 0,
|
||||||
EXPECT_STATUS_GOOD);
|
EXPECT_STATUS_GOOD);
|
||||||
CU_ASSERT_EQUAL(ret, 0);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user