summaryrefslogtreecommitdiff
path: root/src/user/tests/stress.c
diff options
context:
space:
mode:
authordzwdz2022-07-24 15:07:57 +0200
committerdzwdz2022-07-24 15:07:57 +0200
commit9f3fdb830f61cd8c8c1f1db9d03cba1c546c1a7e (patch)
treef5ec030c736f5201332c51cb99169b288185b84b /src/user/tests/stress.c
parent0228be3fd404cdebecf6d21b8964f6063f12dfbe (diff)
user: change the directory structure to prepare for multiple binaries
Diffstat (limited to 'src/user/tests/stress.c')
-rw-r--r--src/user/tests/stress.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/user/tests/stress.c b/src/user/tests/stress.c
deleted file mode 100644
index 5d29e87..0000000
--- a/src/user/tests/stress.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#define TEST_MACROS
-#include <user/lib/stdlib.h>
-#include <user/tests/main.h>
-#include <shared/flags.h>
-#include <shared/syscalls.h>
-
-static void run_forked(void (*fn)()) {
- if (!fork()) {
- fn();
- _syscall_exit(0);
- } else {
- /* successful tests must return 0
- * TODO add a better fail msg */
- if (_syscall_await() != 0) test_fail();
- }
-}
-
-
-static void stress_fork(void) {
- for (size_t i = 0; i < 2048; i++) {
- if (!fork()) _syscall_exit(0);
- _syscall_await();
- }
-}
-
-void stress_all(void) {
- run_forked(stress_fork);
-}