]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
test: expand test suite — 97 smoke tests, 56 host utility tests
authorTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 05:34:53 +0000 (02:34 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 05:34:53 +0000 (02:34 -0300)
commit3588e3f7e1e791771d48f8c5640cb21123c944ff
tree0e916558f299756f920f18f4daf76150d9774781
parent6185473e19823a39481ea99b4fb0bc41cf6a820f
test: expand test suite — 97 smoke tests, 56 host utility tests

- Add 8 new kernel tests to fulltest.c:
  /proc/PID/cmdline, /proc/PID/status, /dev/console, multi-pty,
  dup standalone, pipe EOF, readdir /proc, readdir /bin

- Create tests/test_host_utils.sh: host-compilable test harness for
  20 userspace utilities (echo, cat, head, tail, wc, sort, uniq, cut,
  grep, tr, basename, dirname, tee, dd, pwd, uname, id, printenv,
  cp, mv, touch, rm, mkdir, rmdir, ln) — 56 tests

- Fix echo: leading space when flags shift arg index
- Fix tail: off-by-one with trailing newline
- Fix tee/touch/cp/mv/dd: missing mode arg on open(O_CREAT)
- Fix ulibc open(): make variadic to accept optional mode

- Update smoke_test.exp with 8 new patterns (97 total)
- Add host utility tests to Makefile test-host target

Tests: 97/97 smoke, 28+19+56=103 host, cppcheck clean
12 files changed:
Makefile
tests/smoke_test.exp
tests/test_host_utils.sh [new file with mode: 0755]
user/cp.c
user/dd.c
user/echo.c
user/fulltest.c
user/mv.c
user/tail.c
user/tee.c
user/touch.c
user/ulibc/include/unistd.h