From 8c2e0ce946012a4275e8dfa9d8dfd1d5a68d6e3e Mon Sep 17 00:00:00 2001 From: sotech117 Date: Sat, 2 Mar 2024 23:05:26 +0000 Subject: decent coding session --- kernel/test/proctest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/test') diff --git a/kernel/test/proctest.c b/kernel/test/proctest.c index ab69512..e8b8ba8 100644 --- a/kernel/test/proctest.c +++ b/kernel/test/proctest.c @@ -273,7 +273,6 @@ void test_out_of_order_termination() "Expected: %d, Actual: %d number of processes have been cleaned up\n", 3, count); } - /* Test threads' cancellation fields. */ @@ -299,6 +298,7 @@ void test_cancellation() int status; int ret = do_waitpid(new_proc1->p_pid, &status, 0); test_assert(ret != -ECHILD, "Should have found the process"); + test_assert(ret == new_proc1->p_pid, "Should have found the correct process"); test_assert(status == 1, "Returned status not set correctly"); test_assert(did_run == 0, "Thread should not have run if it was cancelled"); } -- cgit v1.2.3-70-g09d2