Fix two flaky efun test.
Make test run 3 times.
Make shadow tests reentrant.