MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / test_kill_invalid_pid

Function test_kill_invalid_pid

tests/system_test/signal_test.cpp:348–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346// ---------------------------------------------------------------------------
347
348void test_kill_invalid_pid(void* /*arg*/) {
349 klog::Info("=== Signal: Kill Invalid PID Test ===");
350 bool passed = true;
351
352 int ret = sys_kill(99999, signal_number::kSigTerm);
353 if (ret != -1) {
354 klog::Err(
355 "test_kill_invalid_pid: sys_kill(99999) returned {} (expected -1)",
356 ret);
357 passed = false;
358 }
359
360 if (!passed) {
361 g_tests_failed++;
362 }
363 g_tests_completed++;
364 klog::Info("Signal Kill Invalid PID Test: {}", passed ? "PASSED" : "FAILED");
365 sys_exit(passed ? 0 : 1);
366}
367
368} // namespace
369

Callers

nothing calls this directly

Calls 4

InfoFunction · 0.85
sys_killFunction · 0.85
ErrFunction · 0.85
sys_exitFunction · 0.85

Tested by

no test coverage detected