summaryrefslogtreecommitdiff
path: root/src/init/tests
AgeCommit message (Collapse)Author
2022-07-10init/tests: semaphore pipe-based testdzwdz
2022-07-10syscalls: implement dupdzwdz
2022-07-10init/lib: implement "evil semaphores"dzwdz
I started implementing native semaphores in the kernel, but then I've realized that I can implement them in userland using pipes. Thus, this hot garbage was born.
2022-07-09kernel/pipes: process queueingdzwdz
2022-07-09init/test: mostly clean up the existing testsdzwdz
2022-07-09syscalls/pipe: turn into a POSIX-style api with separate rw endsdzwdz
Without separate read/write ends you can't tell when there are no more writers left if you have multiple readers. Consider this piece of code: int fd = pipe(); fork(); // execution continues in 2 processes while (read(fd, &some_buf, sizeof somebuf) >= 0) { ... } Once both processes call `read()`, it's obvious that no writes are possible - all the processes that hold a reference to the pipe are currently stuck on a `read()` call, so the kernel could just make it return an error in both. But, what then? It's still possible to write to the pipe, and you can't know if the other process will do that. Thus, if you don't want to miss any output, you have to keep reading the pipe. Forever. Both processes end up stuck. Having separate read/write ends prevents that.
2022-07-06kernel: don't panic on nonexistent syscallsdzwdz
2022-07-06kernel/pipes: read & write supportdzwdz
2022-07-05kernel: initial partial pipe supportdzwdz
2022-06-29kernel/vfs: add the OPEN_CREATE flagdzwdz
2022-05-26syscalls/memflag: FINDFREE flagdzwdz
2022-05-26init: dead simple mallocdzwdz
2022-05-21syscall/memflag: implement freeing memorydzwdz
2022-05-06syscalls: merge fork() and fs_fork2()dzwdz
2022-05-02syscalls: fork() noreap flagdzwdz
2022-05-02shared: fix some stuff i broke + compiler warningsdzwdz
2022-05-02kernel/vfs: pass `close()` calls to fs handlersdzwdz
2022-04-28kernel/proc: simplify `process_seed`dzwdz
2022-04-15kernel/vfs: don't hang on orphaned vfs callsdzwdz
2022-04-15kernel/vfs: don't hang waiting for a vfs backend after it exit()sdzwdz
2022-04-13init/test: add a fork() stress testdzwdz
this currently crashes the kernel. the point is to stop it from doing that
2021-11-04init/tests: ensure that tests exit successfullydzwdz
2021-10-15init/tests: write some actual tests - test_await and test_faultsdzwdz
2021-10-15init/tests: make the test(s) staticdzwdz
2021-10-15init/tests: remove test_fs, as it doesn't even test anythingdzwdz
2021-10-15init/tests: implement a run_forked wrapperdzwdz
2021-10-15init: only run tests when prompted from the shelldzwdz
2021-10-15init: move the tests to their own directorydzwdz