[PATCH 2/2] tests: Deduplicate some WITH_* checks