Tests: Create helper macros for the WriteVerify* commands
By creating a helper macros for WriteVerify we can save a lot of boilerplate code. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
void
|
||||
test_writeverify12_flags(void)
|
||||
{
|
||||
int ret;
|
||||
unsigned char *buf = alloca(block_size);
|
||||
|
||||
CHECK_FOR_DATALOSS;
|
||||
@@ -41,13 +40,6 @@ test_writeverify12_flags(void)
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY12 with BYTCHK==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
ret = writeverify12(sd, 0,
|
||||
block_size, block_size, 0, 0, 1, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
if (ret == -2) {
|
||||
logging(LOG_NORMAL, "[SKIPPED] WRITEVERIFY12 is not implemented.");
|
||||
CU_PASS("WRITEVERIFY12 is not implemented.");
|
||||
return;
|
||||
}
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
WRITEVERIFY12(sd, 0, block_size, block_size, 0, 0, 1, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user