Fix compiler warnings in testsuite/.
Fix building of testsuite.
Merging test suite fixes from Jelmer.