+/* Child process for syn-read test.
+ Reads the contents of a test file a byte at a time, in the
+ hope that this will take long enough that we can get a
+ significant amount of contention in the kernel filesystem
+ code. */
+
#include <random.h>
#include <stdio.h>
#include <stdlib.h>
+/* Child process for syn-read test.
+ Writes into part of a test file. Other processes will be
+ writing into other parts at the same time. */
+
#include <random.h>
#include <stdlib.h>
#include <syscall.h>
+/* Tests that create properly zeros out the contents of a fairly
+ large file. */
+
#define TEST_SIZE 75678
#include "tests/filesys/create.inc"
+/* Writes out the contents of a fairly large file all at once,
+ and then reads it back to make sure that it was written
+ properly. */
+
#define TEST_SIZE 75678
#include "tests/filesys/base/full.inc"
+/* Writes out the content of a fairly large file in random order,
+ then reads it back in random order to verify that it was
+ written properly. */
+
#define BLOCK_SIZE 512
#define TEST_SIZE (512 * 150)
#include "tests/filesys/base/random.inc"
+/* Writes out a fairly large file sequentially, one fixed-size
+ block at a time, then reads it back to verify that it was
+ written properly. */
+
#define TEST_SIZE 75678
#define BLOCK_SIZE 513
#include "tests/filesys/base/seq-block.inc"
+/* Writes out a fairly large file sequentially, one random-sized
+ block at a time, then reads it back to verify that it was
+ written properly. */
+
#define TEST_SIZE 75678
#include "tests/filesys/base/seq-random.inc"
+/* Tests that create properly zeros out the contents of a fairly
+ small file. */
+
#define TEST_SIZE 5678
#include "tests/filesys/create.inc"
+/* Writes out the contents of a fairly small file all at once,
+ and then reads it back to make sure that it was written
+ properly. */
+
#define TEST_SIZE 5678
#include "tests/filesys/base/full.inc"
+/* Writes out the content of a fairly small file in random order,
+ then reads it back in random order to verify that it was
+ written properly. */
+
#define BLOCK_SIZE 13
#define TEST_SIZE (13 * 123)
#include "tests/filesys/base/random.inc"
+/* Writes out a fairly small file sequentially, one fixed-size
+ block at a time, then reads it back to verify that it was
+ written properly. */
+
#define TEST_SIZE 5678
#define BLOCK_SIZE 513
#include "tests/filesys/base/seq-block.inc"
+/* Writes out a fairly large file sequentially, one random-sized
+ block at a time, then reads it back to verify that it was
+ written properly. */
+
#define TEST_SIZE 5678
#include "tests/filesys/base/seq-random.inc"
+/* Spawns 10 child processes, all of which read from the same
+ file and make sure that the contents are what they should
+ be. */
+
#include <random.h>
#include <stdio.h>
#include <syscall.h>
+/* Verifies that a deleted file may still be written to and read
+ from. */
+
#include <random.h>
#include <string.h>
#include <syscall.h>
+/* Spawns several child processes to write out different parts of
+ the contents of a file and waits for them to finish. Then
+ reads back the file and verifies its contents. */
+
#include <random.h>
#include <stdio.h>
#include <string.h>
+/* Child process for syn-rw.
+ Reads from a file created by our parent process, which is
+ growing it. We loop until we've read the whole file
+ successfully. Many iterations through the loop will return 0
+ bytes, because the file has not grown in the meantime. That
+ is, we are "busy waiting" for the file to grow.
+ (This test could be improved by adding a "yield" system call
+ and calling yield whenever we receive a 0-byte read.) */
+
#include <random.h>
#include <stdlib.h>
#include <syscall.h>
+/* Tries to create a directory named as the empty string,
+ which must return failure. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Just runs lsdir(). */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Creates directories /0/0/0 through /3/2/2 and creates files in
+ the leaf directories. */
+
#include "tests/filesys/extended/mk-tree.h"
#include "tests/main.h"
+/* Creates a "vine" of directories /0/1/2/3/4/5/6/7/8/9
+ and changes directory into each of them,
+ then creates a test file in the bottommost
+ and verifies that it can be opened by absolute name. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Tests mkdir(). */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Tries to open a directory.
+ This is allowed to succeed or fail,
+ but if it succeeds then attempts to write to it must fail. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Tries to create a file with the same name as an existing
+ directory, which must return failure. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Tries to remove the current directory.
+ This is allowed to succeed or fail.
+ If it succeeds, then it must not be possible to chdir back to
+ the current directory by name (because it's been deleted).
+ If it fails, then it must be possible to chdir back to the
+ current directory by name (because it still exists). */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Tries to remove the current directory.
+ This is allowed to succeed or fail.
+ Then creates a file in the root to make sure that we haven't
+ corrupted any directory state. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Tries to remove the change of parents of the current
+ directory.
+ This can succeed or fail as long as it doesn't crash. 8/
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Try to remove the root directory.
+ This must return failure. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Creates directories /0/0/0 through /3/2/2 and files in the
+ leaf directories, then removes them. */
+
#include <stdarg.h>
#include <stdio.h>
#include <syscall.h>
+/* Creates a "vine" of directories /0/1/2/3/4/5/6/7/8/9
+ and changes directory into each of them,
+ then remove them. */
+
#include <string.h>
#include <syscall.h>
#include "tests/lib.h"
+/* Creates and removes a directory, then makes sure that it's
+ really gone. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Tries to create a directory with the same name as an existing
+ file, which must return failure. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Create a file of size 0. */
+
#define TEST_SIZE 0
#include "tests/filesys/create.inc"
+/* Creates a directory,
+ then creates 50 files in that directory. */
+
#define FILE_CNT 50
#define DIRECTORY "/x"
#include "tests/filesys/extended/grow-dir.inc"
+/* Grows a file from 0 bytes to 2,134 bytes, 37 bytes at a time,
+ and checks that the file's size is reported correctly at each
+ step. */
+
#include <syscall.h>
#include "tests/filesys/seq-test.h"
#include "tests/lib.h"
+/* Creates 50 files in the root directory. */
+
#define FILE_CNT 50
#include "tests/filesys/extended/grow-dir.inc"
+/* Creates 20 files in the root directory. */
+
#define FILE_CNT 20
#include "tests/filesys/extended/grow-dir.inc"
+/* Grows a file from 0 bytes to 72,943 bytes, 1,234 bytes at a
+ time. */
+
#define TEST_SIZE 72943
#include "tests/filesys/extended/grow-seq.inc"
+/* Grows a file from 0 bytes to 5,678 bytes, 1,234 bytes at a
+ time. */
+
#define TEST_SIZE 5678
#include "tests/filesys/extended/grow-seq.inc"
+/* Tests that seeking past the end of a file and writing will
+ properly zero out the region in between. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
+/* Checks that growing a file updates the file position
+ correctly. */
+
#include <syscall.h>
#include "tests/filesys/seq-test.h"
#include "tests/lib.h"
+/* Checks that trying to grow a file beyond the capacity of the
+ file system behaves reasonably (does not crash). */
+
#include <limits.h>
#include <syscall.h>
#include "tests/lib.h"
+/* Grows two files in parallel and checks that their contents are
+ correct. */
+
#include <random.h>
#include <syscall.h>
#include "tests/lib.h"
+/* Library function for creating a tree of directories. */
+
#include <stdio.h>
#include <syscall.h>
#include "tests/filesys/extended/mk-tree.h"
+/* Grows a file in chunks while subprocesses read the growing
+ file. */
+
#include <random.h>
#include <syscall.h>
#include "tests/filesys/extended/syn-rw.h"