tests: Use common code for all tests.