better error handling in testapi function script_output (was: script_output() ignores parse errors)
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.
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
script_output() fails to parse the output, it shouldn't silently return an empty string. Suggestion: It should throw an exception.
- AC1: Parsing errors in script_output can be easily distinguished from a false boolean result from the internal called script command
- 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
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