diff options
author | dzwdz | 2022-07-24 15:07:57 +0200 |
---|---|---|
committer | dzwdz | 2022-07-24 15:07:57 +0200 |
commit | 9f3fdb830f61cd8c8c1f1db9d03cba1c546c1a7e (patch) | |
tree | f5ec030c736f5201332c51cb99169b288185b84b /src/user/tests/stress.c | |
parent | 0228be3fd404cdebecf6d21b8964f6063f12dfbe (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.c | 28 |
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); -} |