Fix small issues in tests found by Coverity
5 files changed