My only suggestion is that data_to_hex() looks pretty generically useful, so I'd put it into dnstest.c, and pass in a static buffer when calling instead of using isc_mem_allocate(). I pushed that change to the branch, if you're okay with it then I think this is fine to commit. (Note, I only evaluated the code, I haven't checked the test case data to confirm that it tests what it says it does. I take it that's unchanged from previous versions though.)