From b4bcf45932721505ce925010765dd2250483128c Mon Sep 17 00:00:00 2001 From: Scott Haseley Date: Fri, 25 Mar 2016 11:13:31 -0400 Subject: [PATCH] Initial tests, commands, and target for asst3.1 --- test161/commands/coremap.tc | 6 ++++++ test161/targets/asst3.1.tt | 27 +++++++++++++++++++++++++++ test161/tests/coremap/coremap-loose.t | 14 ++++++++++++++ test161/tests/coremap/coremap-tight.t | 14 ++++++++++++++ test161/tests/coremap/km1.t | 8 ++++++++ test161/tests/coremap/km2.t | 8 ++++++++ test161/tests/coremap/km3.t | 8 ++++++++ test161/tests/coremap/km4.t | 8 ++++++++ test161/tests/coremap/not-dumbvm.t | 8 ++++++++ 9 files changed, 101 insertions(+) create mode 100644 test161/commands/coremap.tc create mode 100644 test161/targets/asst3.1.tt create mode 100644 test161/tests/coremap/coremap-loose.t create mode 100644 test161/tests/coremap/coremap-tight.t create mode 100644 test161/tests/coremap/km1.t create mode 100644 test161/tests/coremap/km2.t create mode 100644 test161/tests/coremap/km3.t create mode 100644 test161/tests/coremap/km4.t create mode 100644 test161/tests/coremap/not-dumbvm.t diff --git a/test161/commands/coremap.tc b/test161/commands/coremap.tc new file mode 100644 index 0000000..e276925 --- /dev/null +++ b/test161/commands/coremap.tc @@ -0,0 +1,6 @@ +templates: + - name: km1 + - name: km2 + - name: km3 + - name: km4 + - name: km5 diff --git a/test161/targets/asst3.1.tt b/test161/targets/asst3.1.tt new file mode 100644 index 0000000..6c785a2 --- /dev/null +++ b/test161/targets/asst3.1.tt @@ -0,0 +1,27 @@ +name: asst3.1 +print_name: ASST3.1 +description: > + In this assignment you will add support for virtual memory to your OS/161 kernel. +version: 1 +points: 100 +type: asst +kconfig: ASST3 +tests: + - id: coremap/not-dumbvm.t + points: 20 + - id: coremap/km1.t + points: 10 + mem_leak_points: 2 + - id: coremap/km2.t + points: 10 + mem_leak_points: 2 + - id: coremap/km3.t + points: 10 + mem_leak_points: 2 + - id: coremap/km4.t + points: 25 + mem_leak_points: 2 + - id: coremap/coremap-loose.t + points: 10 + - id: coremap/coremap-tight.t + points: 15 diff --git a/test161/tests/coremap/coremap-loose.t b/test161/tests/coremap/coremap-loose.t new file mode 100644 index 0000000..c241451 --- /dev/null +++ b/test161/tests/coremap/coremap-loose.t @@ -0,0 +1,14 @@ +--- +name: "Coremap Test (Loose Bounds)" +description: + "This tests allocates and frees all physical memory multiple times, checking that the amount it was able to allocate is within a reasonable bound" +tags: [coremap] +depends: [not-dumbvm.t] +sys161: + ram: 4M + disk1: + bytes: 8M + disk2: + bytes: 8M +--- +|km5 --avail 32 --kernel 125 diff --git a/test161/tests/coremap/coremap-tight.t b/test161/tests/coremap/coremap-tight.t new file mode 100644 index 0000000..c0746fe --- /dev/null +++ b/test161/tests/coremap/coremap-tight.t @@ -0,0 +1,14 @@ +--- +name: "Coremap Test (Tight Bounds)" +description: + "This tests allocates and frees all physical memory multiple times, checking that the amount it was able to allocate is within a reasonable bound" +tags: [coremap] +depends: [not-dumbvm.t] +sys161: + ram: 4M + disk1: + bytes: 8M + disk2: + bytes: 8M +--- +|km5 --avail 20 --kernel 105 diff --git a/test161/tests/coremap/km1.t b/test161/tests/coremap/km1.t new file mode 100644 index 0000000..76a323f --- /dev/null +++ b/test161/tests/coremap/km1.t @@ -0,0 +1,8 @@ +--- +name: "Basic kmalloc Test" +description: + "km1 tests the kernel's subpage allocator, allocating a large number of objects and freeing them somewhat later" +tags: [coremap] +depends: [not-dumbvm.t] +--- +|km1 diff --git a/test161/tests/coremap/km2.t b/test161/tests/coremap/km2.t new file mode 100644 index 0000000..9d392c4 --- /dev/null +++ b/test161/tests/coremap/km2.t @@ -0,0 +1,8 @@ +--- +name: "kmalloc Stress Test" +description: + "km2 stress tests the kernel subpage using the same approach as km1, but with multiple threads running concurrently." +tags: [coremap] +depends: [not-dumbvm.t] +--- +|km2 diff --git a/test161/tests/coremap/km3.t b/test161/tests/coremap/km3.t new file mode 100644 index 0000000..2b468f1 --- /dev/null +++ b/test161/tests/coremap/km3.t @@ -0,0 +1,8 @@ +--- +name: "Large kmalloc Test" +description: + This test stresses the subpage allocator by allocating and freeing a large number of objects of various sizes. +tags: [coremap] +depends: [not-dumbvm.t] +--- +|km3 5000 diff --git a/test161/tests/coremap/km4.t b/test161/tests/coremap/km4.t new file mode 100644 index 0000000..a54e72e --- /dev/null +++ b/test161/tests/coremap/km4.t @@ -0,0 +1,8 @@ +--- +name: "Multipage allococation Test" +description: + km4 allocates and frees large amounts of memory - between 1 and 5 pages - a number of times by a number of concurrent threads. +tags: [coremap] +depends: [not-dumbvm.t] +--- +|km4 diff --git a/test161/tests/coremap/not-dumbvm.t b/test161/tests/coremap/not-dumbvm.t new file mode 100644 index 0000000..1ed6993 --- /dev/null +++ b/test161/tests/coremap/not-dumbvm.t @@ -0,0 +1,8 @@ +--- +name: "Smarter VM" +description: + "A basic coremap test that makes sure you're not using dumbvm by allocating and freeing all physical memory multiple times" +tags: [coremap] +depends: [boot] +--- +|km5