tests: add leak checking