diff options
Diffstat (limited to 'lib/ext2fs/tst_badblocks.c')
-rw-r--r-- | lib/ext2fs/tst_badblocks.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/ext2fs/tst_badblocks.c b/lib/ext2fs/tst_badblocks.c index 2453f472..358da209 100644 --- a/lib/ext2fs/tst_badblocks.c +++ b/lib/ext2fs/tst_badblocks.c @@ -2,7 +2,7 @@ * This testing program makes sure the badblocks implementation works. * * Copyright (C) 1996 by Theodore Ts'o. - * + * * %Begin-Header% * This file may be redistributed under the terms of the GNU Public * License. @@ -42,7 +42,7 @@ blk_t test4a[] = { 11, 0, 12, 1, 13, 1, - 14, 0, + 14, 0, 80, 0, 45, 0, 66, 1, @@ -60,7 +60,7 @@ blk_t test5a[] = { 1, DEL_BLK, 0 }; - + static int test_fail = 0; static int test_expected_fail = 0; @@ -70,7 +70,7 @@ static errcode_t create_test_list(blk_t *vec, badblocks_list *ret) errcode_t retval; badblocks_list bb; int i; - + retval = ext2fs_badblocks_list_create(&bb, 5); if (retval) { com_err("create_test_list", retval, "while creating list"); @@ -95,7 +95,7 @@ static void print_list(badblocks_list bb, int verify) badblocks_iterate iter; blk_t blk; int i, ok; - + retval = ext2fs_badblocks_list_iterate_begin(bb, &iter); if (retval) { com_err("print_list", retval, "while setting up iterator"); @@ -156,7 +156,7 @@ static void do_test_seq(badblocks_list bb, blk_t *vec) ext2fs_badblocks_list_del(bb, vec[i]); match = ext2fs_badblocks_list_test(bb, vec[i]); printf("Removing block %u --- now %s\n", vec[i], - ext2fs_badblocks_list_test(bb, vec[i]) ? + ext2fs_badblocks_list_test(bb, vec[i]) ? "present" : "absent"); if (match) { printf("FAILURE!\n"); @@ -254,7 +254,7 @@ int file_test_invalid(badblocks_list bb) printf("Expected test failure didn't happen!\n"); test_fail++; } - + if (ext2fs_badblocks_equal(bb, new_bb)) { printf("Block bitmap matched after reading and writing.\n"); @@ -278,7 +278,7 @@ int main(int argc, char **argv) if (retval == 0) print_list(bb1, 1); printf("\n"); - + printf("test2: "); retval = create_test_list(test2, &bb2); if (retval == 0) @@ -290,7 +290,7 @@ int main(int argc, char **argv) if (retval == 0) print_list(bb3, 1); printf("\n"); - + printf("test4: "); retval = create_test_list(test4, &bb4); if (retval == 0) { @@ -315,31 +315,31 @@ int main(int argc, char **argv) if (bb1 && bb2 && bb3 && bb4 && bb5) { printf("Comparison tests:\n"); equal = ext2fs_badblocks_equal(bb1, bb2); - printf("bb1 and bb2 are %sequal.\n", equal ? "" : "NOT "); + printf("bb1 and bb2 are %sequal.\n", equal ? "" : "NOT "); if (equal) test_fail++; equal = ext2fs_badblocks_equal(bb1, bb3); - printf("bb1 and bb3 are %sequal.\n", equal ? "" : "NOT "); + printf("bb1 and bb3 are %sequal.\n", equal ? "" : "NOT "); if (!equal) test_fail++; - + equal = ext2fs_badblocks_equal(bb1, bb4); - printf("bb1 and bb4 are %sequal.\n", equal ? "" : "NOT "); + printf("bb1 and bb4 are %sequal.\n", equal ? "" : "NOT "); if (equal) test_fail++; equal = ext2fs_badblocks_equal(bb4, bb5); - printf("bb4 and bb5 are %sequal.\n", equal ? "" : "NOT "); + printf("bb4 and bb5 are %sequal.\n", equal ? "" : "NOT "); if (!equal) test_fail++; printf("\n"); } - + file_test(bb4); file_test_invalid(bb4); - + if (test_fail == 0) printf("ext2fs library badblocks tests checks out OK!\n"); |