Project

General

Profile

Actions

action #70612

open

better error handling in testapi function script_output (was: script_output() ignores parse errors)

Added by MDoucha over 3 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2020-08-27
Due date:
% Done:

0%

Estimated time:

Description

Motivation

I've just spent 2 hours staring into code trying to figure out why get_patches() in lib/qam.pm rejected an update that has the right incident ID and is marker as needed.
https://openqa.suse.de/tests/4596773#step/update_kernel/63

Then I've noticed that the leading output marker is malformed due to VNC typing issue so script_output() simply returned an empty string to get_patches().

When script_output() fails to parse the output, it shouldn't silently return an empty string. Suggestion: It should throw an exception.

Acceptance criteria

  • AC1: Parsing errors in script_output can be easily distinguished from a false boolean result from the internal called script command

Suggestions

  • Review and potentially extend os-autoinst t/03-testapi.t for how script_output behaves on an error like lost characters leading to unparseable responses
Actions #1

Updated by okurz over 3 years ago

  • Subject changed from script_output() ignores parse errors to better error handling in testapi function script_output (was: script_output() ignores parse errors)
  • Description updated (diff)
  • Category changed from Regressions/Crashes to Feature requests
  • Target version changed from Ready to future

I agree that it should be easy. That this is likely very limited to just how script_output behaves makes it rather easy to test and easy to understand what would need to be changed. Hence I consider the ticket a good candidate to be solved by anyone outside the QA tools team as well. Based on how I understand your description this is not a regression but a wish for changed behaviour, hence "feature request" would be the right category and we have a good template https://progress.opensuse.org/projects/openqav3/wiki#Feature-requests for that

Actions

Also available in: Atom PDF