TESTS: Fix the writeatomic tests for targets where atomic granularity != 1

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-09-10 17:20:06 -07:00
parent fd55600d39
commit fa9df7fdd3
6 changed files with 78 additions and 48 deletions

View File

@@ -61,11 +61,7 @@ test_writeatomic16_vpd(void)
logging(LOG_VERBOSE, "Check if WRITEATOMIC16 is supported");
if (bl->atomic_gran) {
gran = bl->atomic_gran;
} else {
gran = 1;
}
gran = inq_bl->atomic_gran ? inq_bl->atomic_gran : 1;
buf = alloca(block_size * gran);
memset(buf, 0x00, block_size * gran);
ret = writeatomic16(sd, 0, block_size * gran,