Skip to content
Snippets Groups Projects
Commit cf9cf9c4 authored by gback's avatar gback
Browse files

fixed more ODR violations for userspace tests

parent b1436404
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,6 @@
#include "tests/lib.h"
#include "tests/filesys/base/syn-read.h"
const char *test_name = "child-syn-read";
static char buf[BUF_SIZE];
int
......@@ -22,6 +20,7 @@ main (int argc, const char *argv[])
int fd;
size_t i;
test_name = "child-syn-read";
quiet = true;
CHECK (argc == 2, "argc must be 2, actually %d", argc);
......
......@@ -13,11 +13,11 @@
#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");
......
......@@ -10,8 +10,6 @@
#include <syscall.h>
#include "tests/lib.h"
const char *test_name = "child-rox";
static void
try_write (void)
{
......@@ -31,6 +29,8 @@ try_write (void)
int
main (int argc UNUSED, char *argv[])
{
test_name = "child-rox";
msg ("begin");
try_write ();
......
......@@ -5,11 +5,10 @@
#include <stdio.h>
#include "tests/lib.h"
const char *test_name = "child-simple";
int
main (void)
{
test_name = "child-simple";
msg ("run");
return 81;
}
......@@ -7,11 +7,11 @@
#include <syscall.h>
#include "tests/lib.h"
const char *test_name = "multi-recurse";
int
main (int argc UNUSED, char *argv[])
{
test_name = "multi-recurse";
int n = atoi (argv[1]);
msg ("begin %d", n);
......
......@@ -27,8 +27,6 @@
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
......@@ -108,6 +106,7 @@ main (int argc, char *argv[])
{
int n;
test_name = "multi-oom";
n = argc > 1 ? atoi (argv[1]) : 0;
bool is_at_root = (n == 0);
if (is_at_root)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment