]> 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)
commitc67bb0d532a7331361e5ed7cac0eb7ecfcd10119
tree34267cb92cff2adda7c8e5aca739926022c31a11
parentf4905d0f2ce29d56ee71aabad15c552682539fca
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