aboutsummaryrefslogtreecommitdiff
path: root/kernel/test
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2024-03-02 23:05:26 +0000
committersotech117 <michael_foiani@brown.edu>2024-03-02 23:05:26 +0000
commit8c2e0ce946012a4275e8dfa9d8dfd1d5a68d6e3e (patch)
tree1877a33c6488a5b16fb7962e1ffb0f72f13a5052 /kernel/test
parent9c90e73fda0d5df2e1f11b32d459d3bb07a63192 (diff)
decent coding session
Diffstat (limited to 'kernel/test')
-rw-r--r--kernel/test/proctest.c2
1 files changed, 1 insertions, 1 deletions
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");
}