fputc(0xff, fpt);
fclose(fpt);
for (int i = 0; i < PAGE_COUNT; i++)
fputc(0xff, fpt);
fclose(fpt);
for (int i = 0; i < PAGE_COUNT; i++)
- ref[i] = PAGE_COUNT - i - 1;
testCheck(disk, ref);
kprintf("Test1: passed\n");
testCheck(disk, ref);
kprintf("Test1: passed\n");
for (int i = PAGE_COUNT / 2; i < PAGE_COUNT; i++)
{
for (int i = PAGE_COUNT / 2; i < PAGE_COUNT; i++)
{
- ref[i] = PAGE_COUNT + PAGE_COUNT / 2 - i - 1;
kprintf("Test3: passed\n");
}
kprintf("Test3: passed\n");
}
static void test4(BattFsSuper *disk)
{
pgcnt_t ref[PAGE_COUNT];
static void test4(BattFsSuper *disk)
{
pgcnt_t ref[PAGE_COUNT];
testCheck(disk, ref);
kprintf("Test5: passed\n");
}
testCheck(disk, ref);
kprintf("Test5: passed\n");
}
static void test6(BattFsSuper *disk)
{
static void test6(BattFsSuper *disk)
{
battfs_writeTestBlock(disk, 0, 0, 0, 0, 0);
battfs_writeTestBlock(disk, 1, 0, 0, 0, 1);
battfs_writeTestBlock(disk, 2, 0, 1, 0, 1);
battfs_writeTestBlock(disk, 0, 0, 0, 0, 0);
battfs_writeTestBlock(disk, 1, 0, 0, 0, 1);
battfs_writeTestBlock(disk, 2, 0, 1, 0, 1);
- battfs_writeTestBlock(disk, 3, 0, 0, 0, 0);
+ disk->erase(disk, 3);
+
test1(&disk);
test2(&disk);
test3(&disk);
test1(&disk);
test2(&disk);
test3(&disk);
- test4(&disk);
- test5(&disk);
+ //test4(&disk);
+ //test5(&disk);
test6(&disk);
test7(&disk);
test8(&disk);
test6(&disk);
test7(&disk);
test8(&disk);