Tests: Create a global scratch buffer and avoid allocating memory in the tests
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
void
|
||||
test_writeverify16_flags(void)
|
||||
{
|
||||
unsigned char *buf = alloca(block_size);
|
||||
|
||||
CHECK_FOR_DATALOSS;
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
@@ -39,7 +37,7 @@ test_writeverify16_flags(void)
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY16 with BYTCHK==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
WRITEVERIFY16(sd, 0, block_size, block_size, 0, 0, 1, 0, buf,
|
||||
memset(scratch, 0xa6, block_size);
|
||||
WRITEVERIFY16(sd, 0, block_size, block_size, 0, 0, 1, 0, scratch,
|
||||
EXPECT_STATUS_GOOD);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user