From 44a73ecab6e91519627786a5101cd4f1a2f2b0d7 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 30 Oct 2024 00:57:33 +0200 Subject: most of the way to passing tests --- tests/create/init.c | 2 +- tests/fork-exhaustion/init.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/create/init.c b/tests/create/init.c index ca38c22..b596fe1 100644 --- a/tests/create/init.c +++ b/tests/create/init.c @@ -4,8 +4,8 @@ static int data = 0; void callback(id_t tid, int d0, int d1, int d2, int d3) { - UNUSED(tid); printf("hello from new thread\n"); + check(tid == 2, "wrond tid\n"); check(d0 == 1, "wrong d0\n"); check(d1 == 2, "wrond d1\n"); check(d2 == 3, "wrong d2\n"); diff --git a/tests/fork-exhaustion/init.c b/tests/fork-exhaustion/init.c index 0e330f4..7758613 100644 --- a/tests/fork-exhaustion/init.c +++ b/tests/fork-exhaustion/init.c @@ -11,8 +11,10 @@ START(pid, tid, d0, d1, d2, d3) check(pid == 0, "illegal pid for init\n"); id_t our_id = 0; + + int counter = 0; while (1) { - printf("forking\n"); + printf("forking %d\n", counter++); id_t new_id = sys_fork(&our_id); if (new_id < 0) break; -- cgit v1.3