+/* 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"
+/* 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"
+/* 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"
+/* Runs 3 child-linear processes at once. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* 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"
+/* Accesses a bad address.
+ The process must be terminated with -1 exit code. */
+
#include "tests/lib.h"
#include "tests/main.h"
+/* 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"
+/* 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"
+/* 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"
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");
}
+/* 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"
+/* Demonstrate that the stack can grow.
+ This must succeed. */
+
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
+/* 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"
+/* Try to write to the code segment.
+ The process must be terminated with -1 exit code. */
+
#include "tests/lib.h"
#include "tests/main.h"