-
Notifications
You must be signed in to change notification settings - Fork 0
/
grade-lab2
executable file
·53 lines (38 loc) · 1.43 KB
/
grade-lab2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
from gradelib import *
r = Runner(save('jos.out'),
stop_breakpoint('readline'))
@test(0, 'running JOS')
def test_jos():
r.run_qemu()
@test(10, 'Page table permissions', parent=test_jos)
def test_ptbl_flags():
r.match(r'\[LAB 2\] check_ptbl_flags\(\) succeeded!')
@test(10, 'No eXecute bit', parent=test_jos)
def test_nx():
r.match(r'\[LAB 2\] check_nx\(\) succeeded!')
@test(10, 'W^X violations', parent=test_jos)
def test_wx():
r.match(r'\[LAB 2\] check_wx\(\) succeeded!')
@test(10, '4K paging', parent=test_jos)
def test_4k_paging():
r.match(r'\[LAB 2\] check_4k_paging\(\) succeeded!')
@test(10, '2M paging', parent=test_jos)
def test_2m_paging():
r.match(r'\[LAB 2\] check_2m_paging\(\) succeeded!')
@test(10, 'Transparent 2M paging', parent=test_jos)
def test_transparent_2m_paging():
r.match(r'\[LAB 2\] check_transparent_2m_paging\(\) succeeded!')
@test(10, 'Order violations', parent=test_jos)
def test_order():
r.match(r'\[LAB 2\] check_free_list_order\(\) succeeded!')
@test(10, 'Memory layout', parent=test_jos)
def test_memory_layout():
r.match(r'\[LAB 2\] check_memory_layout\(\) succeeded!')
@test(10, 'Buddy consistency', parent=test_jos)
def test_memory_layout():
r.match(r'\[LAB 2\] check_buddy_consistency\(\) succeeded!')
@test(10, 'Virtual address space', parent=test_jos)
def test_memory_layout():
r.match(r'\[LAB 2\] check_vas\(\) succeeded!')
run_tests()