瀏覽代碼

Add tests in lab4_result:swap_fifo.c

main
ArchStacker 9 年之前
父節點
當前提交
dd1aea7641
共有 1 個檔案被更改,包括 7 行新增0 行删除
  1. +7
    -0
      labcodes_answer/lab4_result/kern/mm/swap_fifo.c

+ 7
- 0
labcodes_answer/lab4_result/kern/mm/swap_fifo.c 查看文件

@ -110,6 +110,13 @@ _fifo_check_swap(void) {
cprintf("write Virt Page d in fifo_check_swap\n"); cprintf("write Virt Page d in fifo_check_swap\n");
*(unsigned char *)0x4000 = 0x0d; *(unsigned char *)0x4000 = 0x0d;
assert(pgfault_num==9); assert(pgfault_num==9);
cprintf("write Virt Page e in fifo_check_swap\n");
*(unsigned char *)0x5000 = 0x0e;
assert(pgfault_num==10);
cprintf("write Virt Page a in fifo_check_swap\n");
assert(*(unsigned char *)0x1000 == 0x0a);
*(unsigned char *)0x1000 = 0x0a;
assert(pgfault_num==11);
return 0; return 0;
} }

Loading…
取消
儲存