action #23422

[tools][sprint 201712.1] Same miniature for 2 steps

Added by dasantiago over 2 years ago. Updated almost 2 years ago.

Status:ResolvedStart date:17/08/2017
Priority:NormalDue date:
Assignee:dasantiago% Done:

100%

Category:Concrete Bugs
Target version:Done
Difficulty:
Duration:

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.

History

#1 Updated by coolo over 2 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

#2 Updated by coolo over 2 years ago

  • Category set to Concrete Bugs
  • 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*$)/"
   },

#3 Updated by dasantiago about 2 years ago

  • Assignee set to dasantiago

#4 Updated by dasantiago about 2 years ago

  • Status changed from New to In Progress

#5 Updated by szarate about 2 years ago

Assigning to current sprint (201712.1)

#6 Updated by szarate about 2 years ago

  • Subject changed from Same miniature for 2 steps to [tools] Same miniature for 2 steps

#7 Updated by szarate about 2 years ago

  • Target version changed from Ready to Current Sprint

#8 Updated by dasantiago about 2 years ago

Just to update this ticket with my findings:
There are three types of results:
1. ok
2. fail
3. 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. :-(

#9 Updated by coolo about 2 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 {

#10 Updated by dasantiago about 2 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.

#11 Updated by dasantiago about 2 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

#12 Updated by dasantiago about 2 years ago

  • % Done changed from 0 to 100

#13 Updated by dasantiago about 2 years ago

  • Status changed from In Progress to Resolved

#14 Updated by szarate about 2 years ago

  • Subject changed from [tools] Same miniature for 2 steps to [tools][Sprint 201711.2] Same miniature for 2 steps

#15 Updated by szarate about 2 years ago

  • Subject changed from [tools][Sprint 201711.2] Same miniature for 2 steps to [tools][sprint 201712.2] Same miniature for 2 steps

#16 Updated by szarate about 2 years ago

  • Subject changed from [tools][sprint 201712.2] Same miniature for 2 steps to [tools][sprint 201712.1] Same miniature for 2 steps

#17 Updated by szarate almost 2 years ago

  • Target version changed from Current Sprint to Done

Also available in: Atom PDF