Project

General

Profile

Actions

action #23422

closed

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

Added by dasantiago over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2017-08-17
Due date:
% Done:

100%

Estimated time:

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:

They both point to the same square. It's impossible to point and click with the mouse on step 3.

Actions #1

Updated by coolo over 6 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

Actions #2

Updated by coolo over 6 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*$)/"
   },

Actions #3

Updated by dasantiago over 6 years ago

  • Assignee set to dasantiago
Actions #4

Updated by dasantiago over 6 years ago

  • Status changed from New to In Progress
Actions #5

Updated by szarate over 6 years ago

Assigning to current sprint (201712.1)

Actions #6

Updated by szarate over 6 years ago

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

Updated by szarate over 6 years ago

  • Target version changed from Ready to Current Sprint
Actions #8

Updated by dasantiago over 6 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. :-(

Actions #9

Updated by coolo over 6 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 {
Actions #10

Updated by dasantiago over 6 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.

Actions #11

Updated by dasantiago over 6 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

Actions #12

Updated by dasantiago over 6 years ago

  • % Done changed from 0 to 100
Actions #13

Updated by dasantiago over 6 years ago

  • Status changed from In Progress to Resolved
Actions #14

Updated by szarate about 6 years ago

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

Updated by szarate about 6 years ago

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

Updated by szarate about 6 years ago

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

Updated by szarate about 6 years ago

  • Target version changed from Current Sprint to Done
Actions

Also available in: Atom PDF