]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commitdiff
docs: update all documentation for 80-test smoke suite + Rump Kernel status
authorTulio A M Mendes <[email protected]>
Mon, 16 Feb 2026 01:51:09 +0000 (22:51 -0300)
committerTulio A M Mendes <[email protected]>
Mon, 16 Feb 2026 01:51:09 +0000 (22:51 -0300)
- README.md: 44→80 smoke tests, add condition variables/TSC ns clock/IRQ chaining/
  FPU-SSE/Rump Kernel scaffold to features, update Status section, add src/rump/
  to directory structure
- POSIX_ROADMAP.md: 44→80 test count, update clock_gettime to TSC ns precision,
  update flock description, add Rump Kernel phases to Remaining Work
- TESTING_PLAN.md: 44→80 test count with expanded test categories
- SUPPLEMENTARY_ANALYSIS.md: add Rump Kernel to remaining enhancements,
  update test counts in conclusion

README.md
docs/POSIX_ROADMAP.md
docs/SUPPLEMENTARY_ANALYSIS.md
docs/TESTING_PLAN.md

index 54d76de44e058c2ba46d6ea194e4b4d1e2f2a710..50c0f523b3fbaa033457a6ff8eee4c513ed18c1c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@ AdrOS is a Unix-like, POSIX-compatible, multi-architecture operating system deve
 - **Sessions & groups** — `setsid`, `setpgid`, `getpgrp`
 - **Permissions** — per-process `uid`/`gid`/`euid`/`egid`; `chmod`, `chown`, `setuid`, `setgid`, `seteuid`, `setegid`, `access`, `umask`; VFS permission enforcement on `open()`
 - **User heap** — `brk`/`sbrk` syscall
-- **Time** — `nanosleep`, `clock_gettime` (`CLOCK_REALTIME` via RTC, `CLOCK_MONOTONIC`), `alarm`/`SIGALRM`, `times` (CPU accounting)
+- **Time** — `nanosleep`, `clock_gettime` (`CLOCK_REALTIME` via RTC, `CLOCK_MONOTONIC` with TSC nanosecond precision), `alarm`/`SIGALRM`, `times` (CPU accounting)
 
 ### Syscalls (x86, `int 0x80` + SYSENTER)
 - **File I/O:** `open`, `openat`, `read`, `write`, `close`, `lseek`, `stat`, `fstat`, `fstatat`, `dup`, `dup2`, `dup3`, `pipe`, `pipe2`, `select`, `poll`, `ioctl`, `fcntl`, `getdents`, `pread`, `pwrite`, `readv`, `writev`, `truncate`, `ftruncate`, `fsync`, `fdatasync`
@@ -62,7 +62,7 @@ AdrOS is a Unix-like, POSIX-compatible, multi-architecture operating system deve
 - **I/O multiplexing (advanced):** `epoll_create`, `epoll_ctl`, `epoll_wait`, `inotify_init`, `inotify_add_watch`, `inotify_rm_watch`
 - **Async I/O:** `aio_read`, `aio_write`, `aio_error`, `aio_return`, `aio_suspend`
 - **FD flags:** `O_NONBLOCK`, `O_CLOEXEC`, `O_APPEND`, `FD_CLOEXEC` via `fcntl` (`F_GETFD`/`F_SETFD`/`F_GETFL`/`F_SETFL`)
-- **File locking:** `flock` (advisory, no-op stub)
+- **File locking:** `flock` (advisory locking with per-inode lock table)
 - **Shared memory:** `shmget`, `shmat`, `shmdt`, `shmctl`
 - **Threads:** `clone`, `gettid`, `set_thread_area`, `futex`
 - **Networking:** `socket`, `bind`, `listen`, `accept`, `connect`, `send`, `recv`, `sendto`, `recvfrom`, `sendmsg`, `recvmsg`
@@ -122,7 +122,11 @@ AdrOS is a Unix-like, POSIX-compatible, multi-architecture operating system deve
 - **Kernel command line** — Linux-like parser (`init=`, `root=`, `console=`, `ring3`, `quiet`, `noapic`, `nosmp`); unknown tokens forwarded to init as argv/envp
 - **`/proc/cmdline`** — exposes raw kernel command line to userspace
 - **`root=` parameter** — auto-detect and mount filesystem from specified ATA device at `/disk`
-- **Kernel synchronization** — counting semaphores (`ksem_t`), mutexes (`kmutex_t`), mailboxes (`kmbox_t`) with IRQ-safe signaling
+- **Kernel synchronization** — counting semaphores (`ksem_t`), mutexes (`kmutex_t`), condition variables (`kcond_t`), mailboxes (`kmbox_t`) with IRQ-safe signaling
+- **TSC nanosecond clock** — `clock_gettime_ns()` calibrated during LAPIC/PIT window; `CLOCK_MONOTONIC` uses sub-microsecond TSC precision
+- **IRQ chaining** — shared-IRQ support via static pool of handler nodes; `register_interrupt_handler` auto-chains, `unregister_interrupt_handler` removes
+- **FPU/SSE context** — per-process FXSAVE/FXRSTOR save/restore across context switches; 16-byte aligned heap
+- **Rump Kernel scaffold** — `rumpuser` hypercall layer (init, malloc/free, console, clock, random); Phase 1+3 complete
 
 ### Userland
 - **ulibc** — `printf`, `malloc`/`free`/`calloc`/`realloc`, `string.h`, `unistd.h`, `errno.h`, `pthread.h`, `signal.h`, `stdio.h` (buffered I/O with line-buffered stdout, unbuffered stderr, `setvbuf`/`setbuf`, `isatty`), `stdlib.h` (`atof`, `strtol`), `ctype.h`, `sys/mman.h` (`mmap`/`munmap`), `sys/ioctl.h`, `sys/times.h`, `sys/uio.h`, `sys/types.h`, `sys/stat.h`, `time.h` (`nanosleep`/`clock_gettime`), `math.h`, `assert.h`, `fcntl.h`, `strings.h`, `inttypes.h`, `linux/futex.h`, `realpath()`
@@ -159,7 +163,7 @@ AdrOS is a Unix-like, POSIX-compatible, multi-architecture operating system deve
 
 ### Testing
 - **47 host-side unit tests** — `test_utils.c` (28) + `test_security.c` (19)
-- **44 QEMU smoke tests** — 4-CPU expect-based (file I/O, signals, memory mgmt, IPC, devices, procfs, networking, epoll, inotify, aio)
+- **80 QEMU smoke tests** — 4-CPU expect-based (file I/O, signals, memory mgmt, IPC, devices, procfs, networking, epoll, inotify, aio, nanosleep, CoW fork, readv/writev, fsync, flock, posix_spawn, TSC precision, execve)
 - **16-check test battery** — multi-disk ATA (hda+hdb+hdd), VFS mount, ping, diskfs ops (`make test-battery`)
 - **Static analysis** — cppcheck, sparse, gcc -fanalyzer
 - **GDB scripted checks** — heap/PMM/VGA integrity
@@ -199,7 +203,9 @@ QEMU debug helpers:
 
 See [POSIX_ROADMAP.md](docs/POSIX_ROADMAP.md) for a detailed checklist.
 
-**All 31 planned POSIX tasks are complete**, plus 44 additional features (75 total). The kernel covers **~98%** of the core POSIX interfaces needed for a practical Unix-like system. All 44 smoke tests, 16 battery checks, and 19 host unit tests pass clean. ARM64, RISC-V 64, and MIPS32 boot on QEMU.
+**All 31 planned POSIX tasks are complete**, plus 44 additional features (75 total). The kernel covers **~98%** of the core POSIX interfaces needed for a practical Unix-like system. All 80 smoke tests, 16 battery checks, and 47 host unit tests pass clean. ARM64, RISC-V 64, and MIPS32 boot on QEMU.
+
+Rump Kernel integration is in progress — prerequisites (condition variables, TSC nanosecond clock, IRQ chaining) are implemented and the `rumpuser` hypercall scaffold is in place.
 
 ## Directory Structure
 - `src/kernel/` — Architecture-independent kernel (VFS, syscalls, scheduler, tmpfs, diskfs, devfs, overlayfs, procfs, FAT12/16/32, ext2, PTY, TTY, shm, signals, networking, threads, vDSO, KASLR, permissions)
@@ -211,6 +217,7 @@ See [POSIX_ROADMAP.md](docs/POSIX_ROADMAP.md) for a detailed checklist.
 - `src/drivers/` — Device drivers (VBE, initrd, VGA, timer)
 - `src/mm/` — Memory management (PMM, heap, slab, arch-independent VMM wrappers)
 - `src/net/` — Networking (lwIP port, E1000 netif, DNS resolver, ICMP ping test)
+- `src/rump/` — Rump Kernel hypercall scaffold (`rumpuser_adros.c`)
 - `include/` — Header files
 - `user/` — Userland programs (`init.c`, `echo.c`, `sh.c`, `cat.c`, `ls.c`, `mkdir.c`, `rm.c`, `ldso.c`)
 - `user/doom/` — DOOM port (doomgeneric engine + AdrOS platform adapter)
index 79f105df6fda2cd7804f490774d43a47e0b36c7a..161ee8361682d3c98045d669d0d8102d38c1a309 100644 (file)
@@ -84,7 +84,7 @@ Notes:
 | `clone` | [x] | Thread creation with `CLONE_VM`/`CLONE_FILES`/`CLONE_THREAD`/`CLONE_SETTLS` |
 | `set_thread_area` | [x] | GDT-based TLS via GS segment (GDT entry 22, ring 3) |
 | `nanosleep`/`sleep` | [x] | `syscall_nanosleep_impl()` with tick-based sleep |
-| `clock_gettime` | [x] | `CLOCK_REALTIME` (RTC-backed) and `CLOCK_MONOTONIC` (tick-based) |
+| `clock_gettime` | [x] | `CLOCK_REALTIME` (RTC-backed) and `CLOCK_MONOTONIC` (TSC nanosecond precision) |
 | `alarm` | [x] | Per-process alarm timer; delivers `SIGALRM` on expiry |
 | `times` | [x] | Returns `struct tms` with per-process `utime`/`stime` accounting |
 | `futex` | [x] | `FUTEX_WAIT`/`FUTEX_WAKE` with global waiter table |
@@ -126,7 +126,7 @@ Notes:
 | `O_CLOEXEC` | [x] | Close-on-exec via `pipe2`, `open` flags |
 | `O_APPEND` | [x] | Append mode for `write()` — seeks to end before writing |
 | `FD_CLOEXEC` via `fcntl` | [x] | `F_GETFD`/`F_SETFD` implemented; `execve` closes marked FDs |
-| File locking (`flock`) | [x] | Advisory locking no-op stub (validates fd, always succeeds) |
+| File locking (`flock`) | [x] | Advisory locking with per-inode lock table |
 
 ## 6. Filesystem / VFS
 
@@ -279,7 +279,7 @@ Notes:
 | Feature | Status | Notes |
 |---------|--------|-------|
 | ELF32 loader | [x] | Secure with W^X + ASLR; supports `ET_EXEC` + `ET_DYN` + `PT_INTERP` |
-| `/bin/init.elf` (smoke tests) | [x] | Comprehensive test suite (44 checks: file I/O, signals, memory, IPC, devices, procfs, epoll, inotify, aio) |
+| `/bin/init.elf` (smoke tests) | [x] | Comprehensive test suite (80 checks: file I/O, signals, memory, IPC, devices, procfs, networking, epoll, inotify, aio, nanosleep, CoW fork, readv/writev, fsync, flock, posix_spawn, TSC precision, execve) |
 | `/bin/echo` | [x] | argv/envp test |
 | `/bin/sh` | [x] | POSIX sh-compatible shell; builtins, pipes, redirects, `$PATH` search |
 | `/bin/cat` | [x] | |
@@ -401,10 +401,14 @@ Notes:
 
 ## Remaining Work
 
-All previously identified gaps have been implemented. Potential future enhancements:
+All previously identified gaps have been implemented. Rump Kernel integration prerequisites (condition variables, TSC nanosecond clock, IRQ chaining) are complete, and the `rumpuser` hypercall scaffold is in place.
+
+Potential future enhancements:
 
 | Area | Description |
 |------|-------------|
+| **Rump Kernel Phase 2** | Thread/sync hypercalls (`rumpuser_thread_create`, `rumpuser_mutex_*`, `rumpuser_cv_*`) |
+| **Rump Kernel Phase 4** | File/block I/O hypercalls for rump filesystem drivers |
 | **Full SMP scheduling** | Move processes to AP runqueues (infrastructure in place) |
 | **ARM64/RISC-V/MIPS subsystems** | PMM, VMM, scheduler, syscalls for non-x86 |
 | **Intel HDA audio** | DMA ring buffer audio driver |
index ab608c0fbf232bc67ce4b6e23acc9d6201382e36..ff6a16cc3fb7319fdb16af938577a4643f1f7b6f 100644 (file)
@@ -353,7 +353,11 @@ zero-copy DMA, vDSO, E1000 networking, and PAE+NX are all implemented. AdrOS is
 TTY/PTY, driver support, networking, userland tooling, and security hardening (ASLR,
 guard pages, SMEP/SMAP).
 
-The remaining enhancements are: **full SMP scheduling** (moving processes to AP
-runqueues), **non-x86 subsystems** (PMM/VMM/scheduler for ARM64/RISC-V/MIPS),
-Intel HDA audio, USTAR+LZ4 initrd, PLT/GOT lazy binding (currently eager),
-and `EPOLLET` edge-triggered mode.
+The remaining enhancements are: **Rump Kernel integration** (Phase 2 thread/sync
+hypercalls and Phase 4 file/block I/O — prerequisites including condition variables,
+TSC nanosecond clock, and IRQ chaining are already implemented), **full SMP scheduling**
+(moving processes to AP runqueues), **non-x86 subsystems** (PMM/VMM/scheduler for
+ARM64/RISC-V/MIPS), Intel HDA audio, USTAR+LZ4 initrd, PLT/GOT lazy binding
+(currently eager), and `EPOLLET` edge-triggered mode.
+
+80 QEMU smoke tests, 16 battery checks, and 47 host unit tests pass clean.
index 402dbcb5622431844f0de56657474df80cbf98bf..8e97f0a56b6f57852c2572267eaae064c15045b7 100644 (file)
@@ -5,7 +5,7 @@
 All testing layers are **implemented and operational**:
 
 - **Static analysis** (`make check`): cppcheck + sparse + gcc -fanalyzer
-- **QEMU smoke tests** (`make test`): expect-based, 44 checks (file I/O, signals, memory, IPC, devices, procfs, networking, umask, pipe capacity, waitid, setitimer/getitimer, select/poll on regular files, epoll, inotify, aio_*), 4-CPU SMP, 120s timeout
+- **QEMU smoke tests** (`make test`): expect-based, 80 checks (file I/O, signals, memory, IPC, devices, procfs, networking, epoll, inotify, aio, nanosleep, CLOCK_REALTIME, /dev/urandom, /proc/cmdline, CoW fork, readv/writev, fsync, truncate, getuid/getgid, chmod, flock, times, gettid, posix_spawn, TSC ns precision, SIGSEGV, execve), 4-CPU SMP, 120s timeout
 - **Test battery** (`make test-battery`): 16 checks across 5 QEMU scenarios — multi-disk ATA, VFS mount, ping, diskfs
 - **Host unit tests** (`make test-host`): 19 tests — `test_utils.c` + `test_security.c`
 - **GDB scripted checks** (`make test-gdb`): heap/PMM/VGA integrity validation
@@ -111,7 +111,7 @@ To run manually: boot AdrOS with `-vga std`, then execute `/bin/doom.elf` from t
 
 ```makefile
 make check        # cppcheck + sparse + gcc -fanalyzer
-make test         # QEMU + expect automated smoke test (44 checks incl. ICMP ping, epoll, inotify, aio)
+make test         # QEMU + expect automated smoke test (80 checks incl. ICMP ping, epoll, inotify, aio, CoW fork, flock, posix_spawn)
 make test-battery # Full test battery: multi-disk ATA, VFS mount, ping, diskfs (16 checks)
 make test-host    # Host-side unit tests for pure functions
 make test-gdb     # QEMU + GDB scripted checks (optional)