diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-11-01 04:44:50 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-11-01 10:28:11 +0200 |
| commit | 9914b44878ca52cc615d2f4e47fec400dd55ab76 (patch) | |
| tree | 7678216d4049fa5d2a4a9e381daa4d34dc317c22 /tests/ipc-req-exhaustion | |
| parent | 89e162f3916de5a4faef5bd626590d004bdcdc39 (diff) | |
| download | kmi-9914b44878ca52cc615d2f4e47fec400dd55ab76.tar.gz kmi-9914b44878ca52cc615d2f4e47fec400dd55ab76.zip | |
test all ipc variants more-or-less properly
Diffstat (limited to 'tests/ipc-req-exhaustion')
| -rw-r--r-- | tests/ipc-req-exhaustion/init.c | 27 | ||||
| -rw-r--r-- | tests/ipc-req-exhaustion/source.mk | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/ipc-req-exhaustion/init.c b/tests/ipc-req-exhaustion/init.c new file mode 100644 index 0000000..6dd1a04 --- /dev/null +++ b/tests/ipc-req-exhaustion/init.c @@ -0,0 +1,27 @@ +#include <common/test.h> + +long counter = 0; + +START(pid, tid, d0, d1, d2, d3) +{ + (void)tid; + (void)d0; + (void)d1; + (void)d2; + (void)d3; + + check(pid == 0 || pid == 1, "illegal pid for init"); + printf("sending ipc req %zd to ourselves\n", counter++); + struct sys_ret r = sys_ipc_req4(1, 1, 2, 3, 4); + if (r.s) { + printf("ran out of stack space at %ld\n", counter); + printf("starting to unwind\n"); + } + + printf("unwinding at %ld\n", counter--); + + /* the final resp0 should fail, since we're back in our root process */ + sys_ipc_resp0(); + + ok(); +} diff --git a/tests/ipc-req-exhaustion/source.mk b/tests/ipc-req-exhaustion/source.mk new file mode 100644 index 0000000..3dc2ff3 --- /dev/null +++ b/tests/ipc-req-exhaustion/source.mk @@ -0,0 +1 @@ +TESTS += ipc-req-exhaustion |
