From 1f2ee09b27736f748c03a3d318ea55f96cf06c5e Mon Sep 17 00:00:00 2001 From: Remzi Arpaci-Dusseau Date: Fri, 29 Mar 2019 06:57:56 -0500 Subject: [PATCH] init tests for simple xv6 project --- initial-xv6/test-getreadcount.sh | 10 ++++++++++ initial-xv6/tests/1.desc | 1 + initial-xv6/tests/1.err | 0 initial-xv6/tests/1.out | 1 + initial-xv6/tests/1.rc | 1 + initial-xv6/tests/1.run | 1 + initial-xv6/tests/2.desc | 1 + initial-xv6/tests/2.err | 0 initial-xv6/tests/2.out | 1 + initial-xv6/tests/2.rc | 1 + initial-xv6/tests/2.run | 1 + 11 files changed, 18 insertions(+) create mode 100755 initial-xv6/test-getreadcount.sh create mode 100644 initial-xv6/tests/1.desc create mode 100644 initial-xv6/tests/1.err create mode 100644 initial-xv6/tests/1.out create mode 100644 initial-xv6/tests/1.rc create mode 100644 initial-xv6/tests/1.run create mode 100644 initial-xv6/tests/2.desc create mode 100644 initial-xv6/tests/2.err create mode 100644 initial-xv6/tests/2.out create mode 100644 initial-xv6/tests/2.rc create mode 100644 initial-xv6/tests/2.run diff --git a/initial-xv6/test-getreadcount.sh b/initial-xv6/test-getreadcount.sh new file mode 100755 index 0000000..0057808 --- /dev/null +++ b/initial-xv6/test-getreadcount.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +if ! [[ -d src ]]; then + echo "src dir does not exist" + exit 1 +fi + +../tester/run-tests.sh $* + + diff --git a/initial-xv6/tests/1.desc b/initial-xv6/tests/1.desc new file mode 100644 index 0000000..10b499a --- /dev/null +++ b/initial-xv6/tests/1.desc @@ -0,0 +1 @@ +simple test of system call diff --git a/initial-xv6/tests/1.err b/initial-xv6/tests/1.err new file mode 100644 index 0000000..e69de29 diff --git a/initial-xv6/tests/1.out b/initial-xv6/tests/1.out new file mode 100644 index 0000000..1385cb1 --- /dev/null +++ b/initial-xv6/tests/1.out @@ -0,0 +1 @@ +XV6_TEST_OUTPUT 0 1 1000 diff --git a/initial-xv6/tests/1.rc b/initial-xv6/tests/1.rc new file mode 100644 index 0000000..573541a --- /dev/null +++ b/initial-xv6/tests/1.rc @@ -0,0 +1 @@ +0 diff --git a/initial-xv6/tests/1.run b/initial-xv6/tests/1.run new file mode 100644 index 0000000..7b9fd24 --- /dev/null +++ b/initial-xv6/tests/1.run @@ -0,0 +1 @@ +cd src; ../../tester/run-xv6-command.sh CPUS=1 Makefile.test test_1 | grep XV6_TEST_OUTPUT; cd .. diff --git a/initial-xv6/tests/2.desc b/initial-xv6/tests/2.desc new file mode 100644 index 0000000..9f16de7 --- /dev/null +++ b/initial-xv6/tests/2.desc @@ -0,0 +1 @@ +concurrency test; did you protect the counter with a lock? diff --git a/initial-xv6/tests/2.err b/initial-xv6/tests/2.err new file mode 100644 index 0000000..e69de29 diff --git a/initial-xv6/tests/2.out b/initial-xv6/tests/2.out new file mode 100644 index 0000000..561fc4c --- /dev/null +++ b/initial-xv6/tests/2.out @@ -0,0 +1 @@ +XV6_TEST_OUTPUT 200000 diff --git a/initial-xv6/tests/2.rc b/initial-xv6/tests/2.rc new file mode 100644 index 0000000..573541a --- /dev/null +++ b/initial-xv6/tests/2.rc @@ -0,0 +1 @@ +0 diff --git a/initial-xv6/tests/2.run b/initial-xv6/tests/2.run new file mode 100644 index 0000000..b83d0be --- /dev/null +++ b/initial-xv6/tests/2.run @@ -0,0 +1 @@ +cd src; ../../tester/run-xv6-command.sh CPUS=2 Makefile.test test_2 | grep XV6_TEST_OUTPUT; cd ..