. "$BST_LIB" require lsof lsof/present # lsof answers the inverse of the question procps answers: given a process, which # files does it hold open. Every answer comes out of /proc -- /proc//fd, # /proc//maps, /proc//stat, /proc/mounts -- and nothing else. # # On wasm32-hwjs every lsof mode that reaches lsof's initialize() hangs forever, # printing nothing at all. Only the modes that exit before initialize() -- -v and # -h, which just print text -- complete. This is NOT a volume problem and NOT the # /proc EINTR issue (brintos/linux#9): it reproduces with `lsof -p `, # which reads no fd table at all, and it survives -n -P -O (no DNS, no port-name # lookup, no forked-child stat strategy). Meanwhile every syscall lsof makes was # driven by hand on-target and all succeed -- a full walk of all 31 pids reading # stat/fd/maps/cwd/root, /proc/mounts, /proc/self/fdinfo/, open("/") plus its # /proc/self/fd link, and stat of every mount point. glibc is not implicated # generally either: glibc-linked coreutils read procfs fine and glibc's getmntent() # enumerates /proc/mounts (df.coreutils). The defect is therefore inside lsof's # initialize() path on this target, with every primitive it depends on proven # working. Recorded in the BRINTOS-191 design doc for an upstream report. # # So assert only the modes that run, and record every /proc-reading mode WITHOUT # running it -- an lsof that hangs produces no output and never exits, so running # one wedges the runner and every suite after it. This file is numbered last so # that, if a mode hangs anyway, every other suite has already reported. # # Do NOT wrap a mode in `timeout` to make it runnable: coreutils timeout arms a # SIGALRM and wait()s for the child, and on this runtime that signal/wait path # itself hangs -- wrapping wedges the runner just as thoroughly. # --- touches no /proc at all: proves the binary links and runs --- check_out lsof/version "revision" lsof -v # --- every /proc-reading mode: present but runtime-blocked, so not run --- _blk="lsof initialize() hangs on wasm32-hwjs (no output, never exits); see BRINTOS-191 -- not run, would wedge the runner" bst_skip lsof/pid-single "$_blk" bst_skip lsof/scan-all "$_blk" bst_skip lsof/scan-net "$_blk" bst_skip lsof/file-users "$_blk"