tests: fix "KNOWN FAILED" for subtests

It didn't worked for tests with subtests.

Here we consolidate both cases which fixes the issue by the way. This
is basically a rewrite of 7641ccec.
tests: fix hexdump, add ts_finalize