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:
Ronnie Sahlberg
2016-02-21 07:56:47 -08:00
parent b4e4649ae5
commit f88bcf61cc
89 changed files with 454 additions and 545 deletions

View File

@@ -32,8 +32,8 @@ void
test_orwrite_verify(void)
{
int i, ret;
unsigned char *buf = alloca(256 * block_size);
unsigned char *readbuf = alloca(256 * block_size);
unsigned char *buf = &scratch[0];
unsigned char *readbuf = &scratch[256 * block_size];
CHECK_FOR_DATALOSS;