]> 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)
commit1936c5f15ca254f694b18620a8bc5ce94d7ecb2e
treecabf2a7af128cc64866028600f7fbcdc611e6b36
parent93ed60fa7bf3259f7e4fea565373d77c2bd212b8
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