zig icon indicating copy to clipboard operation
zig copied to clipboard

"zig build test-behavior" attempts to execute binaries with non-existent dynamic linker

Open iskarian opened this issue 4 years ago • 1 comments

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.

iskarian avatar Sep 11 '21 22:09 iskarian

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.

andrewrk avatar Sep 14 '22 01:09 andrewrk