diff options
author | dzwdz | 2023-08-14 18:51:07 +0200 |
---|---|---|
committer | dzwdz | 2023-08-14 18:51:07 +0200 |
commit | 642b5fb0007b64c77d186fcb018d571152ee1d47 (patch) | |
tree | 1c466461f3602d306be309a053edae558ef2568e /src/user/app/tests/stress.c | |
parent | 8050069c57b729c18c19b1a03ab6e4bf63b4735e (diff) |
reorganization: first steps
Diffstat (limited to 'src/user/app/tests/stress.c')
-rw-r--r-- | src/user/app/tests/stress.c | 28 |
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); -} |