From 9a74223f7df26090c3d4e91b00c78912e9d156f9 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 2 May 2010 19:38:23 +0000 Subject: Test more possible alignments in the Write & Verify test. Some ata drivers apply optimisations up to line size alignment. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25787 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/test_disk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 34cb94d9ae..9d186e04f9 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c @@ -134,9 +134,9 @@ static bool test_fs(void) total = TEST_SIZE; while (total > 0) { - current = rb->rand() % (audiobuflen - 4); + align = rb->rand() & 0xf; + current = rb->rand() % (audiobuflen - align); current = MIN(current, total); - align = rb->rand() & 3; rb->snprintf(text_buf, sizeof text_buf, "Wrt %dKB, %dKB left", current >> 10, total >> 10); log_text(text_buf, false); @@ -163,9 +163,9 @@ static bool test_fs(void) total = TEST_SIZE; while (total > 0) { - current = rb->rand() % (audiobuflen - 4); + align = rb->rand() & 0xf; + current = rb->rand() % (audiobuflen - align); current = MIN(current, total); - align = rb->rand() & 3; rb->snprintf(text_buf, sizeof text_buf, "Cmp %dKB, %dKB left", current >> 10, total >> 10); log_text(text_buf, false); -- cgit v1.2.3