#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")" # LinuxCNC source basis: the standalone probe links src/emc/rs274ngc/interp_base.cc, # whose runtime dynamic loading edge is satisfied by the wasm-safe dlfcn shim. probe=$(./build-linuxcnc-wasm-standalone-probe.sh --mode interp-base-link) "$probe" 2>"$probe.err" grep -F "emcTaskInit: could not open interpreter '/tmp/cnc_sim_missing_absolute_interpreter.so': dynamic loading is unavailable in wasm-safe probe" \ "$probe.err" >/dev/null grep -F "emcTaskInit: could not open interpreter '" "$probe.err" | \ grep -F "/lib/linuxcnc/nonexistent-interpreter.so': dynamic loading is unavailable in wasm-safe probe" >/dev/null echo "linuxcnc wasm interp_base link probe passed"