The test code is writing some data to a file, not signing it, and then trying to map it in as an executable (PROT_READ | PROT_EXEC). I wouldn’t expect that to work. If the mmap didn’t fail like this, you’d get a code signing crash when you touched the mapped page because ...