have we considered checking in tiny binaries actually built for the emulation and using them?
various methods discussed so far have their own advantages, but this is the only way that tests actual binaries built for eg linux and run with compat_linux. anything else is limited in it's ability to test, and may actually not find faults if the test & emulation are both broken. .mrg.