[PATCH PM-QA v4] Refactor pass/fail/skip code in PM-QA