Fix some unit test issues

For example with libeio shutdown.