Skip to content

Commit

Permalink
Initial tests and target for ASST3, checkpoint 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaseley committed Apr 7, 2016
1 parent 5821a08 commit 1600e40
Show file tree
Hide file tree
Showing 17 changed files with 290 additions and 3 deletions.
51 changes: 51 additions & 0 deletions test161/commands/vm.tc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
templates:
#Single tests - everything has the default output
- name: /testbin/bigfork
- name: /testbin/ctest
- name: /testbin/huge
- name: /testbin/matmult
- name: /testbin/palin
- name: /testbin/parallelvm
- name: /testbin/sbrktest
- name: /testbin/sort
- name: /testbin/zero

#Triples
- name: /testbin/triplehuge
output:
- {text: /testbin/huge, external: true, trusted: true}
- {text: /testbin/huge, external: true, trusted: true}
- {text: /testbin/huge, external: true, trusted: true}
- name: /testbin/triplemat
output:
- {text: /testbin/matmult, external: true, trusted: true}
- {text: /testbin/matmult, external: true, trusted: true}
- {text: /testbin/matmult, external: true, trusted: true}
- name: /testbin/triplesort
output:
- {text: /testbin/sort, external: true, trusted: true}
- {text: /testbin/sort, external: true, trusted: true}
- {text: /testbin/sort, external: true, trusted: true}

#Quints
- name: /testbin/quinthuge
output:
- {text: /testbin/huge, external: true, trusted: true}
- {text: /testbin/huge, external: true, trusted: true}
- {text: /testbin/huge, external: true, trusted: true}
- {text: /testbin/huge, external: true, trusted: true}
- {text: /testbin/huge, external: true, trusted: true}
- name: /testbin/quintmat
output:
- {text: /testbin/matmult, external: true, trusted: true}
- {text: /testbin/matmult, external: true, trusted: true}
- {text: /testbin/matmult, external: true, trusted: true}
- {text: /testbin/matmult, external: true, trusted: true}
- {text: /testbin/matmult, external: true, trusted: true}
- name: /testbin/quintsort
output:
- {text: /testbin/sort, external: true, trusted: true}
- {text: /testbin/sort, external: true, trusted: true}
- {text: /testbin/sort, external: true, trusted: true}
- {text: /testbin/sort, external: true, trusted: true}
- {text: /testbin/sort, external: true, trusted: true}
48 changes: 45 additions & 3 deletions test161/targets/asst3.tt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ print_name: ASST3
description: >
In this assignment you will add support for virtual memory to your OS/161
kernel.
version: 1
points: 100
version: 2
points: 200
type: asst
kconfig: ASST3
userland: false
userland: true
tests:
# Checkpoint 1 (100 points)

- id: coremap/not-dumbvm.t
points: 20
- id: coremap/km1.t
Expand All @@ -27,3 +29,43 @@ tests:
points: 10
- id: coremap/coremap-tight.t
points: 15

# Checkpoint 2 (100 points)

# Basic paging (30 points)
- id: vm/not-dumbvm2.t
points: 5
- id: vm/sort.t
points: 5
- id: vm/palin.t
points: 5
- id: vm/matmult.t
points: 5
- id: vm/ctest.t
points: 5
- id: vm/stacktest.t
points: 5

# Concurrent paging (40 points)
- id: vm/bigfork.t
points: 8
- id: vm/parallelvm.t
points: 8
- id: vm/quintsort.t
points: 8
- id: vm/quintmat.t
points: 8
- id: vm/quinthuge.t
points: 8

# Heap (10 points)
- id: vm/sbrktest.t
points: 8
- id: vm/sbrk-badcall.t
points: 2

# Stress tests/misc (20 points)
- id: vm/zero.t
points: 5
- id: vm/stability/vm-stability.t
points: 15
15 changes: 15 additions & 0 deletions test161/tests/vm/bigfork.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "Big Fork"
description: >
Stress tests your VM by performing various matrix computations in
multiple concurrent processes. This test is a cross between parallelvm
and forktest.
tags: [vm]
depends: [not-dumbvm-paging, /syscalls/forktest.t]
sys161:
cpus: 4
ram: 8M
---
khu
$ /testbin/bigfork
khu
11 changes: 11 additions & 0 deletions test161/tests/vm/ctest.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "Link Hopper"
description: >
Turn a huge array into a linked list and hop along the list triggering
an interesting page fault pattern.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
ram: 4M
---
| p /testbin/ctest
10 changes: 10 additions & 0 deletions test161/tests/vm/matmult.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: "Matrix Multiplication"
description: >
Test page faults by performing matrix multiplication on a large array.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
ram: 2M
---
| p /testbin/matmult
11 changes: 11 additions & 0 deletions test161/tests/vm/not-dumbvm2.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "Smarter VM 2"
description: >
Test whether you are using dumbvm by running the huge program,
which dumbvm cannot run.
tags: [vm, not-dumbvm-paging]
depends: [console, not-dumbvm]
sys161:
ram: 4M
---
| p /testbin/huge
9 changes: 9 additions & 0 deletions test161/tests/vm/palin.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "Taco cat"
description: >
Test page faults by ensuring a known palindrone stored in static
memory is actually a palindrone.
tags: [vm]
depends: [not-dumbvm-paging]
---
| p /testbin/palin
12 changes: 12 additions & 0 deletions test161/tests/vm/parallelvm.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: "Parallel VM"
description: >
Stress tests your VM by performing various matrix computations in
multiple concurrent processes.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
cpus: 2
ram: 4M
---
| p /testbin/parallelvm
13 changes: 13 additions & 0 deletions test161/tests/vm/quinthuge.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "Quint Huge"
description: >
Run five concurent copies of huge.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
cpus: 2
ram: 12M
---
khu
$ /testbin/quinthuge
khu
13 changes: 13 additions & 0 deletions test161/tests/vm/quintmat.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "Quint Matrix Mult"
description: >
Run five concurent copies of matmult.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
cpus: 2
ram: 8M
---
khu
$ /testbin/quintmat
khu
13 changes: 13 additions & 0 deletions test161/tests/vm/quintsort.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "Quint Sort"
description: >
Run five concurent copies of sort.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
cpus: 2
ram: 8M
---
khu
$ /testbin/quintsort
khu
8 changes: 8 additions & 0 deletions test161/tests/vm/sbrk-badcall.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: "sbrk Badcall"
description: >
"Tests sbrk error conditions"
tags: [sbrk]
depends: [not-dumbvm-paging, shell]
---
$ /testbin/badcall h
26 changes: 26 additions & 0 deletions test161/tests/vm/sbrktest.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: "sbrk Test"
description: >
"Test various properites of your vm's heap management using
the sbrk() system call."
tags: [sbrk]
depends: [not-dumbvm-paging, shell]
sys161:
ram: 4M
---
khu
$ /testbin/sbrktest 1
$ /testbin/sbrktest 2
$ /testbin/sbrktest 3
$ /testbin/sbrktest 4
$ /testbin/sbrktest 5
$ /testbin/sbrktest 6
$ /testbin/sbrktest 7
$ /testbin/sbrktest 8
$ /testbin/sbrktest 11
$ /testbin/sbrktest 12
$ /testbin/sbrktest 13
$ /testbin/sbrktest 14
$ /testbin/sbrktest 15
$ /testbin/sbrktest 16
khu
10 changes: 10 additions & 0 deletions test161/tests/vm/sort.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: "Sort Test"
description: >
Test page fault handling by sorting a large array.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
ram: 2M
---
| p /testbin/sort
21 changes: 21 additions & 0 deletions test161/tests/vm/stability/vm-stability.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "VM Stability Test"
description:
Runs various VM tests to test for synchronization issues.
tags: [stability]
depends: [shell, not-dumbvm-paging]
sys161:
ram: 8M
cpus: 4
---
khu
$ /testbin/forktest
$ /testbin/quintmat
$ /testbin/forktest
$ /testbin/sort
$ /testbin/bigfork
$ /testbin/parallelvm
$ /testbin/quintmat
$ /testbin/forktest
$ /testbin/zero
khu
10 changes: 10 additions & 0 deletions test161/tests/vm/stacktest.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: "Stack Test"
description: >
Tests your VM stack handling by running the bigexec test from ASST2.
tags: [vm]
depends: [not-dumbvm-paging, shell]
sys161:
ram: 4M
---
$ /testbin/bigexec
12 changes: 12 additions & 0 deletions test161/tests/vm/zero.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: "Zero Test"
description: >
Tests that static memory regions are properly initialized.
tags: [vm]
depends: [not-dumbvm-paging]
sys161:
ram: 4M
---
$ /testbin/huge
$ /testbin/sort
$ /testbin/zero

0 comments on commit 1600e40

Please sign in to comment.