projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
904bbd6
)
Add explanatory comments to vm tests.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 8 Jan 2006 18:02:41 +0000
(18:02 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 8 Jan 2006 18:02:41 +0000
(18:02 +0000)
13 files changed:
src/tests/vm/page-linear.c
patch
|
blob
|
history
src/tests/vm/page-merge-par.c
patch
|
blob
|
history
src/tests/vm/page-merge-seq.c
patch
|
blob
|
history
src/tests/vm/page-parallel.c
patch
|
blob
|
history
src/tests/vm/page-shuffle.c
patch
|
blob
|
history
src/tests/vm/pt-bad-addr.c
patch
|
blob
|
history
src/tests/vm/pt-bad-read.c
patch
|
blob
|
history
src/tests/vm/pt-big-stk-obj.c
patch
|
blob
|
history
src/tests/vm/pt-grow-bad.c
patch
|
blob
|
history
src/tests/vm/pt-grow-pusha.c
patch
|
blob
|
history
src/tests/vm/pt-grow-stack.c
patch
|
blob
|
history
src/tests/vm/pt-write-code-2.c
patch
|
blob
|
history
src/tests/vm/pt-write-code.c
patch
|
blob
|
history
diff --git
a/src/tests/vm/page-linear.c
b/src/tests/vm/page-linear.c
index 85aeab6c1f4382553a8ee7b9f3bdcab7f11a1823..12375a7774231c7a083e7ec3a8fcb311f2caae08 100644
(file)
--- a/
src/tests/vm/page-linear.c
+++ b/
src/tests/vm/page-linear.c
@@
-1,3
+1,6
@@
+/* Encrypts, then decrypts, 1 MB of memory and verifies that the
+ values are as they should be. */
+
#include <string.h>
#include "tests/arc4.h"
#include "tests/lib.h"
#include <string.h>
#include "tests/arc4.h"
#include "tests/lib.h"
diff --git
a/src/tests/vm/page-merge-par.c
b/src/tests/vm/page-merge-par.c
index 0c2cc7f03b33c7d6266c433c8174029b4679671d..d588bb0a0794dccc751498194e32b67493c61127 100644
(file)
--- a/
src/tests/vm/page-merge-par.c
+++ b/
src/tests/vm/page-merge-par.c
@@
-1,3
+1,8
@@
+/* Generates about 1 MB of random data that is then divided into
+ 16 chunks. A separate subprocess sorts each chunk; the
+ subprocesses run in parallel. Then we merge the chunks and
+ verify that the result is what it should be. */
+
#include <stdio.h>
#include <syscall.h>
#include "tests/arc4.h"
#include <stdio.h>
#include <syscall.h>
#include "tests/arc4.h"
diff --git
a/src/tests/vm/page-merge-seq.c
b/src/tests/vm/page-merge-seq.c
index f41de2bb7b800359b0e5425a1ce1b74db775a0ab..12e388093fd9b77b2f09e31ac70e4f1829bf72d4 100644
(file)
--- a/
src/tests/vm/page-merge-seq.c
+++ b/
src/tests/vm/page-merge-seq.c
@@
-1,3
+1,8
@@
+/* Generates about 1 MB of random data that is then divided into
+ 16 chunks. A separate subprocess sorts each chunk in
+ sequence. Then we merge the chunks and verify that the result
+ is what it should be. */
+
#include <syscall.h>
#include "tests/arc4.h"
#include "tests/lib.h"
#include <syscall.h>
#include "tests/arc4.h"
#include "tests/lib.h"
diff --git
a/src/tests/vm/page-parallel.c
b/src/tests/vm/page-parallel.c
index c7dd8291d5c5e981263e73f1e065d70cb2cd5a6a..69ec619a23665539d24a58a3f508dd4240dfd048 100644
(file)
--- a/
src/tests/vm/page-parallel.c
+++ b/
src/tests/vm/page-parallel.c
@@
-1,3
+1,5
@@
+/* Runs 3 child-linear processes at once. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
diff --git
a/src/tests/vm/page-shuffle.c
b/src/tests/vm/page-shuffle.c
index c0caa5791e112816eb2141c1550cd7274eb9d743..095a9da37909dd51ffe8d6271edd3349c30c8424 100644
(file)
--- a/
src/tests/vm/page-shuffle.c
+++ b/
src/tests/vm/page-shuffle.c
@@
-1,3
+1,6
@@
+/* Shuffles a 128 kB data buffer 10 times, printing the checksum
+ after each time. */
+
#include <stdbool.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
#include <stdbool.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
diff --git
a/src/tests/vm/pt-bad-addr.c
b/src/tests/vm/pt-bad-addr.c
index 048757502e4f984640f22ca37b338b8c2dee0c4b..3ca408409c6c53134d3047d9f17c24795102ab42 100644
(file)
--- a/
src/tests/vm/pt-bad-addr.c
+++ b/
src/tests/vm/pt-bad-addr.c
@@
-1,3
+1,6
@@
+/* Accesses a bad address.
+ The process must be terminated with -1 exit code. */
+
#include "tests/lib.h"
#include "tests/main.h"
#include "tests/lib.h"
#include "tests/main.h"
diff --git
a/src/tests/vm/pt-bad-read.c
b/src/tests/vm/pt-bad-read.c
index 6b7f008039e444d5e0504be10e8b3fa76c602d4c..ee791ffe79433a946b41276333950a6e3c33188f 100644
(file)
--- a/
src/tests/vm/pt-bad-read.c
+++ b/
src/tests/vm/pt-bad-read.c
@@
-1,3
+1,6
@@
+/* Reads from a file into a bad address.
+ The process must be terminated with -1 exit code. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
diff --git
a/src/tests/vm/pt-big-stk-obj.c
b/src/tests/vm/pt-big-stk-obj.c
index a417a7ef2f9f1c9957eadf727ef239b3a3a0411d..6b630ecec0255068c020eb6afd1eab1b731d719c 100644
(file)
--- a/
src/tests/vm/pt-big-stk-obj.c
+++ b/
src/tests/vm/pt-big-stk-obj.c
@@
-1,3
+1,6
@@
+/* Allocates and writes to a 64 kB object on the stack.
+ This must succeed. */
+
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
diff --git
a/src/tests/vm/pt-grow-bad.c
b/src/tests/vm/pt-grow-bad.c
index d83890fb7c0252579d38c6fff77015d6d6e67a86..d4beba22ff50e06ff6a31bc4783061ce2abd92b3 100644
(file)
--- a/
src/tests/vm/pt-grow-bad.c
+++ b/
src/tests/vm/pt-grow-bad.c
@@
-1,3
+1,6
@@
+/* Read from an address 4,096 bytes below the stack pointer.
+ The process must be terminated with -1 exit code. */
+
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
@@
-7,7
+10,5
@@
void
test_main (void)
{
void
test_main (void)
{
- /* Read from an address 4,096 bytes below the stack pointer.
- Must kill the program. */
asm volatile ("movl -4096(%esp), %eax");
}
asm volatile ("movl -4096(%esp), %eax");
}
diff --git
a/src/tests/vm/pt-grow-pusha.c
b/src/tests/vm/pt-grow-pusha.c
index 759688066c05464eba2dc19f7f21264c6c6b4328..b6b165fa185e9d29cb469df9517748d95d469821 100644
(file)
--- a/
src/tests/vm/pt-grow-pusha.c
+++ b/
src/tests/vm/pt-grow-pusha.c
@@
-1,3
+1,7
@@
+/* Expand the stack by 32 bytes all at once using the PUSHA
+ instruction.
+ This must succeed. */
+
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
diff --git
a/src/tests/vm/pt-grow-stack.c
b/src/tests/vm/pt-grow-stack.c
index d9b708a72d705f4ad8956dfd830cd21319ba2301..0997a00e4f4069084948e3869079f90541d64298 100644
(file)
--- a/
src/tests/vm/pt-grow-stack.c
+++ b/
src/tests/vm/pt-grow-stack.c
@@
-1,3
+1,6
@@
+/* Demonstrate that the stack can grow.
+ This must succeed. */
+
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
diff --git
a/src/tests/vm/pt-write-code-2.c
b/src/tests/vm/pt-write-code-2.c
index 282667ad629ab8422f652f9fb2fde381ceeac324..83bcc2c3b620e416f4736d013f3ce8b7af89b564 100644
(file)
--- a/
src/tests/vm/pt-write-code-2.c
+++ b/
src/tests/vm/pt-write-code-2.c
@@
-1,3
+1,6
@@
+/* Try to write to the code segment using a system call.
+ The process must be terminated with -1 exit code. */
+
#include "tests/lib.h"
#include "tests/main.h"
#include "tests/lib.h"
#include "tests/main.h"
diff --git
a/src/tests/vm/pt-write-code.c
b/src/tests/vm/pt-write-code.c
index 4c580b562a7e2a92ff908f36e151bddcadaf068b..5072cec10ea5914b3ed68e6f60dae23361f252e3 100644
(file)
--- a/
src/tests/vm/pt-write-code.c
+++ b/
src/tests/vm/pt-write-code.c
@@
-1,3
+1,6
@@
+/* Try to write to the code segment.
+ The process must be terminated with -1 exit code. */
+
#include "tests/lib.h"
#include "tests/main.h"
#include "tests/lib.h"
#include "tests/main.h"