For failing writes, show what is in the sector instead

This commit is contained in:
Folkert van Heusden
2024-10-18 08:05:53 +02:00
parent 12bfcd778c
commit aed7faf4db

View File

@@ -229,7 +229,7 @@ write_residuals_test(const struct residuals_test_data *tdata,
for (i = 0; i < expected_write_size; i++) {
if (scratch[i] != 'a') {
logging(LOG_NORMAL, "Blocks were overwritten "
"and no longer contain 'a'");
"and no longer contain 'a': %c", scratch[i]);
CU_FAIL("Blocks were incorrectly overwritten");
break;
}
@@ -250,7 +250,7 @@ write_residuals_test(const struct residuals_test_data *tdata,
for (i = expected_write_size; i < max_len; i++) {
if (scratch[i] != 'a') {
logging(LOG_NORMAL, "Data was overwritten "
"and no longer contain 'a'");
"and no longer contain 'a': %c", scratch[i]);
CU_FAIL("Data was incorrectly overwritten");
break;
}