Fixed test warnings

When run with TRACE=1, many many tests emitted errors or warnings
that could color the results of testing or result in false
positives.  As it turned out, none of them actually did but it was
still worth fixing. Now the TRACE output does not contain spurious
warnings.