#include <debug.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <syscall.h>
#include <random.h>
#include "tests/lib.h"
Go to the source code of this file.
Enumerations | |
enum | child_termination_mode { RECURSE, CRASH } |
Functions | |
static pid_t | spawn_child (int c, enum child_termination_mode mode) |
static void | consume_some_resources (void) |
static int NO_INLINE | consume_some_resources_and_die (int seed) |
int | main (int argc, char *argv[]) |
Variables | |
static const int | EXPECTED_DEPTH_TO_PASS = 30 |
static const int | EXPECTED_REPETITIONS = 10 |
const char * | test_name = "multi-oom" |
static void consume_some_resources | ( | void | ) | [static] |
Definition at line 49 of file multi-oom.c.
References open(), and test_name.
Referenced by consume_some_resources_and_die(), and main().
static int NO_INLINE consume_some_resources_and_die | ( | int | seed | ) | [static] |
Definition at line 66 of file multi-oom.c.
References consume_some_resources(), exit(), NOT_REACHED, NULL, open(), PHYS_BASE, random_init(), and random_ulong().
Referenced by main().
int main | ( | int argc | , | |
char * | argv[] | |||
) |
Definition at line 106 of file multi-oom.c.
References ASSERT, atoi(), consume_some_resources(), consume_some_resources_and_die(), CRASH, EXPECTED_DEPTH_TO_PASS, EXPECTED_REPETITIONS, fail(), msg(), NOT_REACHED, RECURSE, spawn_child(), strcmp(), and wait().
static pid_t spawn_child | ( | int | c, | |
enum child_termination_mode | mode | |||
) | [static] |
Definition at line 37 of file multi-oom.c.
References CRASH, exec(), snprintf(), and test_name.
Referenced by main().
const int EXPECTED_DEPTH_TO_PASS = 30 [static] |
const int EXPECTED_REPETITIONS = 10 [static] |
const char* test_name = "multi-oom" |
Definition at line 30 of file multi-oom.c.