code wiki / _hdl_build / test_chdir.nx

test_chdir.nx

buildroot/runtime/_hdl_build/test_chdir.nx

1174 B20 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic test
docsdependenciesstructsconstsfunctions

about

test_chdir.nx -- isolate whether the new sys_chdir(80) wrapper actually changes cwd. Creates /tmp/cdt/m, chdirs to /tmp/cdt, then opens "m" RELATIVE. If it reads -> cwd changed -> sys_chdir works. expect_exit:0

dependencies 1 imports · 0 importers

nx_syscalls.nx test_chdir.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mkdir sys_openat_wr sys_write sys_close sys_chdir sys_mmap p sys_write ↻ pn sys_mmap ↻ sys_write ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ sys_exit

structs

none

consts

none

functions

4func p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
5func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
10func main() -> i64