From 1600e40d2249f1dfa1131abf7150e6f3004a8e84 Mon Sep 17 00:00:00 2001 From: Scott Haseley Date: Thu, 7 Apr 2016 10:16:33 -0400 Subject: [PATCH] Initial tests and target for ASST3, checkpoint 2. --- test161/commands/vm.tc | 51 +++++++++++++++++++++++ test161/targets/asst3.tt | 48 +++++++++++++++++++-- test161/tests/vm/bigfork.t | 15 +++++++ test161/tests/vm/ctest.t | 11 +++++ test161/tests/vm/matmult.t | 10 +++++ test161/tests/vm/not-dumbvm2.t | 11 +++++ test161/tests/vm/palin.t | 9 ++++ test161/tests/vm/parallelvm.t | 12 ++++++ test161/tests/vm/quinthuge.t | 13 ++++++ test161/tests/vm/quintmat.t | 13 ++++++ test161/tests/vm/quintsort.t | 13 ++++++ test161/tests/vm/sbrk-badcall.t | 8 ++++ test161/tests/vm/sbrktest.t | 26 ++++++++++++ test161/tests/vm/sort.t | 10 +++++ test161/tests/vm/stability/vm-stability.t | 21 ++++++++++ test161/tests/vm/stacktest.t | 10 +++++ test161/tests/vm/zero.t | 12 ++++++ 17 files changed, 290 insertions(+), 3 deletions(-) create mode 100644 test161/commands/vm.tc create mode 100644 test161/tests/vm/bigfork.t create mode 100644 test161/tests/vm/ctest.t create mode 100644 test161/tests/vm/matmult.t create mode 100644 test161/tests/vm/not-dumbvm2.t create mode 100644 test161/tests/vm/palin.t create mode 100644 test161/tests/vm/parallelvm.t create mode 100644 test161/tests/vm/quinthuge.t create mode 100644 test161/tests/vm/quintmat.t create mode 100644 test161/tests/vm/quintsort.t create mode 100644 test161/tests/vm/sbrk-badcall.t create mode 100644 test161/tests/vm/sbrktest.t create mode 100644 test161/tests/vm/sort.t create mode 100644 test161/tests/vm/stability/vm-stability.t create mode 100644 test161/tests/vm/stacktest.t create mode 100644 test161/tests/vm/zero.t diff --git a/test161/commands/vm.tc b/test161/commands/vm.tc new file mode 100644 index 0000000..9cca46c --- /dev/null +++ b/test161/commands/vm.tc @@ -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} diff --git a/test161/targets/asst3.tt b/test161/targets/asst3.tt index ea21d04..a5e3211 100644 --- a/test161/targets/asst3.tt +++ b/test161/targets/asst3.tt @@ -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 @@ -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 diff --git a/test161/tests/vm/bigfork.t b/test161/tests/vm/bigfork.t new file mode 100644 index 0000000..21f8c1d --- /dev/null +++ b/test161/tests/vm/bigfork.t @@ -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 diff --git a/test161/tests/vm/ctest.t b/test161/tests/vm/ctest.t new file mode 100644 index 0000000..8f0e42f --- /dev/null +++ b/test161/tests/vm/ctest.t @@ -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 diff --git a/test161/tests/vm/matmult.t b/test161/tests/vm/matmult.t new file mode 100644 index 0000000..1ab2b65 --- /dev/null +++ b/test161/tests/vm/matmult.t @@ -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 diff --git a/test161/tests/vm/not-dumbvm2.t b/test161/tests/vm/not-dumbvm2.t new file mode 100644 index 0000000..7dd9b42 --- /dev/null +++ b/test161/tests/vm/not-dumbvm2.t @@ -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 diff --git a/test161/tests/vm/palin.t b/test161/tests/vm/palin.t new file mode 100644 index 0000000..15ee552 --- /dev/null +++ b/test161/tests/vm/palin.t @@ -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 diff --git a/test161/tests/vm/parallelvm.t b/test161/tests/vm/parallelvm.t new file mode 100644 index 0000000..7b91be3 --- /dev/null +++ b/test161/tests/vm/parallelvm.t @@ -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 diff --git a/test161/tests/vm/quinthuge.t b/test161/tests/vm/quinthuge.t new file mode 100644 index 0000000..e7d2d30 --- /dev/null +++ b/test161/tests/vm/quinthuge.t @@ -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 diff --git a/test161/tests/vm/quintmat.t b/test161/tests/vm/quintmat.t new file mode 100644 index 0000000..5e75b72 --- /dev/null +++ b/test161/tests/vm/quintmat.t @@ -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 diff --git a/test161/tests/vm/quintsort.t b/test161/tests/vm/quintsort.t new file mode 100644 index 0000000..d255a0d --- /dev/null +++ b/test161/tests/vm/quintsort.t @@ -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 diff --git a/test161/tests/vm/sbrk-badcall.t b/test161/tests/vm/sbrk-badcall.t new file mode 100644 index 0000000..c0cdd5b --- /dev/null +++ b/test161/tests/vm/sbrk-badcall.t @@ -0,0 +1,8 @@ +--- +name: "sbrk Badcall" +description: > + "Tests sbrk error conditions" +tags: [sbrk] +depends: [not-dumbvm-paging, shell] +--- +$ /testbin/badcall h diff --git a/test161/tests/vm/sbrktest.t b/test161/tests/vm/sbrktest.t new file mode 100644 index 0000000..efb0a92 --- /dev/null +++ b/test161/tests/vm/sbrktest.t @@ -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 diff --git a/test161/tests/vm/sort.t b/test161/tests/vm/sort.t new file mode 100644 index 0000000..c698595 --- /dev/null +++ b/test161/tests/vm/sort.t @@ -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 diff --git a/test161/tests/vm/stability/vm-stability.t b/test161/tests/vm/stability/vm-stability.t new file mode 100644 index 0000000..edd6a89 --- /dev/null +++ b/test161/tests/vm/stability/vm-stability.t @@ -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 diff --git a/test161/tests/vm/stacktest.t b/test161/tests/vm/stacktest.t new file mode 100644 index 0000000..3ea3ee6 --- /dev/null +++ b/test161/tests/vm/stacktest.t @@ -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 diff --git a/test161/tests/vm/zero.t b/test161/tests/vm/zero.t new file mode 100644 index 0000000..80d33c5 --- /dev/null +++ b/test161/tests/vm/zero.t @@ -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