#define ROOT_DIR_SECTOR 1 /* Root directory file inode sector. */
/* Block device that contains the file system. */
-struct block *fs_device;
+extern struct block *fs_device;
void filesys_init (bool format);
void filesys_done (void);
#include "tests/lib.h"
#include "tests/filesys/base/syn-read.h"
-const char *test_name = "child-syn-read";
-
static char buf[BUF_SIZE];
int
int fd;
size_t i;
+ test_name = "child-syn-read";
quiet = true;
CHECK (argc == 2, "argc must be 2, actually %d", argc);
#include "tests/filesys/extended/syn-rw.h"
#include "tests/lib.h"
-const char *test_name = "child-syn-rw";
-
static char buf1[BUF_SIZE];
static char buf2[BUF_SIZE];
int fd;
size_t ofs;
+ test_name = "child-syn-rw";
quiet = true;
CHECK (argc == 2, "argc must be 2, actually %d", argc);
#include <syscall.h>
#include "tests/lib.h"
-const char *test_name = "child-close";
-
int
main (int argc UNUSED, char *argv[])
{
+ test_name = "child-close";
+
msg ("begin");
if (!isdigit (*argv[1]))
fail ("bad command-line arguments");
#include <syscall.h>
#include "tests/lib.h"
-const char *test_name = "child-rox";
-
static void
try_write (void)
{
int
main (int argc UNUSED, char *argv[])
{
+ test_name = "child-rox";
+
msg ("begin");
try_write ();
#include <stdio.h>
#include "tests/lib.h"
-const char *test_name = "child-simple";
-
int
main (void)
{
+ test_name = "child-simple";
+
msg ("run");
return 81;
}
#include <syscall.h>
#include "tests/lib.h"
-const char *test_name = "multi-recurse";
-
int
main (int argc UNUSED, char *argv[])
{
int n = atoi (argv[1]);
+ test_name = "multi-recurse";
+
msg ("begin %d", n);
if (n != 0)
{
static const int EXPECTED_DEPTH_TO_PASS = 30;
static const int EXPECTED_REPETITIONS = 10;
-const char *test_name = "multi-oom";
-
enum child_termination_mode { RECURSE, CRASH };
/* Spawn a recursive copy of ourselves, passing along instructions
{
int n;
+ test_name = "multi-oom";
+
n = argc > 1 ? atoi (argv[1]) : 0;
bool is_at_root = (n == 0);
if (is_at_root)
#include "tests/lib.h"
#include "tests/main.h"
-const char *test_name = "child-linear";
-
#define SIZE (1024 * 1024)
static char buf[SIZE];
struct arc4 arc4;
size_t i;
+ test_name = "child-linear";
+
/* Encrypt zeros. */
arc4_init (&arc4, key, strlen (key));
arc4_crypt (&arc4, buf, SIZE);
#include "tests/main.h"
#include "tests/vm/qsort.h"
-const char *test_name = "child-qsort-mm";
-
int
main (int argc UNUSED, char *argv[])
{
int handle;
unsigned char *p = (unsigned char *) 0x10000000;
+ test_name = "child-qsort-mm";
quiet = true;
CHECK ((handle = open (argv[1])) > 1, "open \"%s\"", argv[1]);
#include "tests/main.h"
#include "tests/vm/qsort.h"
-const char *test_name = "child-qsort";
-
int
main (int argc UNUSED, char *argv[])
{
unsigned char buf[128 * 1024];
size_t size;
+ test_name = "child-qsort";
quiet = true;
CHECK ((handle = open (argv[1])) > 1, "open \"%s\"", argv[1]);
#include "tests/lib.h"
#include "tests/main.h"
-const char *test_name = "child-sort";
-
unsigned char buf[128 * 1024];
size_t histogram[256];
size_t size;
size_t i;
+ test_name = "child-sort";
quiet = true;
CHECK ((handle = open (argv[1])) > 1, "open \"%s\"", argv[1]);