]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
test: expand smoke suite to 89 tests + fix SMP orphan reparenting
authorTulio A M Mendes <[email protected]>
Mon, 16 Feb 2026 22:56:49 +0000 (19:56 -0300)
committerTulio A M Mendes <[email protected]>
Mon, 16 Feb 2026 22:56:49 +0000 (19:56 -0300)
commit5dd7bc86d4e77a17b6d30af8d0e5ec418f47490c
tree75d855247281e3220f2d69ed6741cb4b7685e528
parent69b12c7adcb163b911bd7e70f7efe2a1761c128b
test: expand smoke suite to 89 tests + fix SMP orphan reparenting

New userspace tests in init.c:
- E1: setuid/setgid/seteuid/setegid credential manipulation
- E2: fcntl F_GETFL/F_SETFL (O_NONBLOCK toggle)
- E3: fcntl F_GETFD/F_SETFD (FD_CLOEXEC)
- E4: sigsuspend (block SIGUSR1, self-signal, sigsuspend unblocks)
- E5: orphan reparenting (grandchild reparented to init after middle exits)
- Boot-time LZ4 Frame decompression pattern check

Kernel fix — SMP orphan reparenting:
- process_exit_notify() hardcoded parent_pid=1 for reparenting, but with
  SMP the AP idle processes consume PIDs 1-3 before the init userspace
  process is created (PID 4+).
- Added sched_set_init_pid() to register the actual init process PID.
- arch_platform.c calls sched_set_init_pid(current_process->pid) before
  entering userspace, so orphan reparenting targets the correct process.

89/89 smoke tests pass (9s), cppcheck clean.
src/arch/x86/arch_platform.c
src/kernel/scheduler.c
tests/smoke_test.exp
user/init.c