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