tests: fix a lot of the remaining test failures