zig
zig copied to clipboard
"zig build test-behavior" attempts to execute binaries with non-existent dynamic linker
On a system with a non-standard dynamic linker path, running
zig build test-behavior
results in
error: FileNotFound
when it attempts to execute cross-native tests. This is with Zig 0.8.1.
As far as I can tell, this is because runOrTest in src/main.zig doesn't check whether the dynamic linker for the target exists. On the other hand, runOneCase in src/test.zig seems to test this correctly (through getExternalExecutor) but it doesn't try to execute compatible-but-not-native architectures, like i386 on x86_64.
This is a bug with the test harness itself; it is incorrectly determining that the host system is capable of executing a cross-compiled binary.