using util.Fatal in a right way
In some tests, we are using 'util.Fatal'. It exits immediately, so 'defer' functions will not be called. We will leave the testing bunde dir or a container. It needs to be fixed.
Another issue I found in reviewing https://github.com/opencontainers/runtime-tools/pull/640. We need a patch to make RuntimeInsideValidate and RuntimeOutsideValidate stronger. Now it does not different runtime error and runtime-tool/system error.
I've just happened to see this issue, and it's true that a defer function does not run when util.Fatal is called. So far I have been also making such mistakes.
I agree that we should fix it, although there are many places to touch.
If I understand correctly, this issue can be closed now.
The original issue, using util.Fatal correctly, was addressed by https://github.com/opencontainers/runtime-tools/pull/645.
The second issue, differentiation of runtime-tools TAP errors and system errors was done by https://github.com/opencontainers/runtime-tools/pull/658.