[PATCH v9 4/6] selftests/resctrl: Cleanup properly when an error occurs in CAT test