summaryrefslogtreecommitdiff
path: root/src/user/app/tests/stress.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/app/tests/stress.c')
-rw-r--r--src/user/app/tests/stress.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/user/app/tests/stress.c b/src/user/app/tests/stress.c
deleted file mode 100644
index 1ef018c..0000000
--- a/src/user/app/tests/stress.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "tests.h"
-#include <camellia/flags.h>
-#include <camellia/syscalls.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-static void run_forked(void (*fn)()) {
- if (!fork()) {
- fn();
- exit(0);
- } else {
- /* successful tests must return 0
- * TODO add a better fail msg */
- if (_sys_await() != 0) test_fail();
- }
-}
-
-
-static void stress_fork(void) {
- for (size_t i = 0; i < 2048; i++) {
- if (!fork()) exit(0);
- _sys_await();
- }
-}
-
-void stress_all(void) {
- run_forked(stress_fork);
-}