Install strace, run tests with strace and then dump the logs somewhere on failure.