action #23422
closed[tools][sprint 201712.1] Same miniature for 2 steps
100%
Description
Hello.
This is a webinterface bug.
On some tests, on the details tab, there are some steps that get the same miniature. One miniature preview for 2 steps.
Example:
- https://openqa.suse.de/tests/1115492#step/userspace_postfix/3
- https://openqa.suse.de/tests/1115492#step/userspace_postfix/4
They both point to the same square. It's impossible to point and click with the mouse on step 3.
Updated by coolo about 7 years ago
This is what the backend generates:
{
"needles" : [],
"result" : "unk"
},
{
"text" : "userspace_postfix-4.txt",
"title" : "wait_serial",
"needles" : [],
"result" : "ok"
},
{
"result" : "unk",
"needles" : []
},
{
"result" : "fail",
"text" : "userspace_postfix-6.txt",
"needles" : [],
"title" : "wait_serial"
},
{
"needles" : [],
"result" : "unk"
},
{
"result" : "fail",
"needles" : [],
"title" : "wait_serial",
"text" : "userspace_postfix-8.txt"
},
No idea what these unk steps are
Updated by coolo about 7 years ago
- Category set to Regressions/Crashes
- Target version set to Ready
06:20:56.0104 12790 >>> testapi::wait_serial: (?^ui:login:\s*$): ok
06:20:56.0105 12790 <<< testapi::type_string(text='root
')
06:20:56.0109 12794 <<< consoles::virtio_screen::type_string(json_cmd_token='vzUJSetS', text='root
')
06:20:56.0112 12790 <<< testapi::wait_serial(regexp=qr/(?^ui:Password:\s*$)/, timeout=90)
Creates
[
{
"text" : "# wait_serial expected: qr/(?^ui:login:\s*$)/",
"needles" : [],
"title" : "wait_serial",
"result" : "ok"
},
{
"needles" : [],
"result" : "unk"
},
{
"needles" : [],
"result" : "ok",
"title" : "wait_serial",
"text" : "# wait_serial expected: qr/(?^ui:Password:\s*$)/"
},
Updated by szarate about 7 years ago
- Subject changed from Same miniature for 2 steps to [tools] Same miniature for 2 steps
Updated by szarate about 7 years ago
- Target version changed from Ready to Current Sprint
Updated by dasantiago about 7 years ago
Just to update this ticket with my findings:
There are three types of results:
- ok
- fail
- unk
The "unk" is used when the developer wants to show the result in the webinterface, without being necessarily a failure or a success, like for example to show progress of some operation.
When creating the miniatures, the object is initialized as being unk.
The problem in this case is when is determining if the terminal is serial or not in here: https://github.com/os-autoinst/os-autoinst/blame/master/basetest.pm#L413
If i remove the unless from there, everything (on that test) seems to be working fine:
http://tragicbox.suse.cz/tests/296#step/userspace_postfix/1
This needs more in depth analysis, as i'm afraid, this might break a lot of stuff. :-(
Updated by coolo about 7 years ago
the problem is that there is nothing happening on that screen you keep recording. So recording a result here is just wrong. the return value is just unused - and shouldn't be there.
So based on your findings, I would try:
--- a/basetest.pm
+++ b/basetest.pm
@@ -409,8 +409,8 @@ sub record_serialresult {
$string //= '';
- my $result = $self->record_testresult('unk');
unless (testapi::is_serial_terminal) {
+ my $result = $self->record_testresult('unk');
# the screenshot is not the fail, it's just for documentation
$self->_result_add_screenshot($result);
}
@@ -418,7 +418,7 @@ sub record_serialresult {
$output .= "# Result:\n";
$output .= "$string\n";
$self->record_resultfile('wait_serial', $output, result => $res);
- return $result;
+ return;
}
sub record_soft_failure_result {
@@ -429,7 +429,7 @@ sub record_soft_failure_result {
$self->_result_add_screenshot($result);
my $output = "# Soft Failure:\n$reason\n";
$self->record_resultfile('Soft Failed', $output, result => $result);
- return $result;
+ return;
}
sub register_extra_test_results {
Updated by dasantiago about 7 years ago
coolo wrote:
the problem is that there is nothing happening on that screen you keep recording. So recording a result here is just wrong. the return value is just unused - and shouldn't be there.
Thanks for the clarification.
Updated by dasantiago about 7 years ago
coolo wrote:
So based on your findings, I would try:
Thanks! I guess that's it. My tests passed with the changes you wrote: http://tragicbox.suse.cz/tests/329#step/userspace_postfix/1
Updated by dasantiago about 7 years ago
- Status changed from In Progress to Resolved
Updated by szarate almost 7 years ago
- Subject changed from [tools] Same miniature for 2 steps to [tools][Sprint 201711.2] Same miniature for 2 steps
Updated by szarate almost 7 years ago
- Subject changed from [tools][Sprint 201711.2] Same miniature for 2 steps to [tools][sprint 201712.2] Same miniature for 2 steps
Updated by szarate almost 7 years ago
- Subject changed from [tools][sprint 201712.2] Same miniature for 2 steps to [tools][sprint 201712.1] Same miniature for 2 steps
Updated by szarate almost 7 years ago
- Target version changed from Current Sprint to Done