+/* Child process for mmap-inherit test.
+ Tries to write to a mapping present in the parent.
+ The process must be terminated with -1 exit code. */
+
#include <string.h>
#include "tests/vm/sample.inc"
#include "tests/lib.h"
+/* Child process of page-parallel.
+ Encrypts 128 kB of zeros, then decrypts it, and ensures that
+ the zeros are back. */
+
#include <string.h>
#include "tests/arc4.h"
#include "tests/lib.h"
+/* Child process of mmap-exit.
+ Mmaps a file and writes to it via the mmap'ing, then exits
+ without calling munmap. The data in the mapped region must be
+ written out at program termination. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Reads a 128 kB file and "sorts" the bytes in it, using
+ counting sort. The sorted data is written back to the same
+ file in-place. */
+
#include <debug.h>
#include <syscall.h>
#include "tests/lib.h"
+/* Tries to mmap an invalid fd,
+ which must either fail silently or terminate the process with
+ exit code -1. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Verifies that mmap'd regions are only written back on munmap
+ if the data was actually modified in memory. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Verifies that memory mappings persist after file close. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Executes child-mm-wrt and verifies that the writes that should
+ have occurred really did. */
+
#include <syscall.h>
#include "tests/vm/sample.inc"
#include "tests/lib.h"
+/* Maps a file into memory and runs child-inherit to verify that
+ mappings are not inherited. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Verifies that misaligned memory mappings are disallowed. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Verifies that memory mappings at address 0 are disallowed. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Verifies that mapping over the code segment is disallowed. */
+
#include <stdint.h>
#include <round.h>
#include <syscall.h>
+/* Verifies that mapping over the data segment is disallowed. */
+
#include <stdint.h>
#include <round.h>
#include <syscall.h>
+/* Verifies that mapping over the stack segment is disallowed. */
+
#include <stdint.h>
#include <round.h>
#include <syscall.h>
+/* Verifies that overlapping memory mappings are disallowed. */
+
#include <syscall.h>
#include "tests/vm/sample.inc"
#include "tests/lib.h"
+/* Uses a memory mapping to read a file. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Deletes and closes file that is mapped into memory
+ and verifies that it can still be read through the mapping. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Creates a 128 kB file and repeatedly shuffles data in it
+ through a memory mapping. */
+
#include <stdio.h>
#include <string.h>
#include <syscall.h>
+/* Maps the same file into memory twice and verifies that the
+ same data is readable in both. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Maps and unmaps a file and verifies that the mapped region is
+ inaccessible afterward. */
+
#include <syscall.h>
#include "tests/vm/sample.inc"
#include "tests/lib.h"
+/* Writes to a file through a mapping, and unmaps the file,
+ then reads the data in the file back using the read system
+ call to verify. */
+
#include <string.h>
#include <syscall.h>
#include "tests/vm/sample.inc"
+/* Tries to map a zero-length file, which may or may not work but
+ should not terminate the process or crash.
+ Then dereferences the address that we tried to map,
+ and the process must be terminated with -1 exit code. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"