Project

General

Profile

Bug #17164

post_vm_start_hook sometimes opens the Applications menu which breaks following steps

Added by intrigeri 28 days ago. Updated 5 days ago.

Status:
Resolved
Priority:
Elevated
Assignee:
-
Category:
Test suite
Target version:
Start date:
Due date:
% Done:

100%

Feature Branch:
test/17164-post_vm_start_hook
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

In the last 16 test suite runs on the testing branch, "Scenario: Starting a second instance of the Unsafe Browser results in an error message being shown" failed 4 times (25%) because the Applications menu was open when the test suite pressed SUPER to open the Activities Overview: SUPER has no effect when the Applications menu is opened:

05:18:02.099530535: Restoring snapshot 'with-network-logged-in'...
05:18:03.964478403: Remote shell: calling as root: echo 'hello?'
05:18:04.401326881: call returned: [0, "hello?\n", ""]
05:18:04.401929883: Sikuli: calling click(L(1023,384)@S(0)[0,0 1024x768])...
05:18:05.126008173: [log] CLICK on L(1023,384)@S(0)[0,0 1024x768]
05:18:05.126235717: Remote shell: calling as root: nmcli device show eth0
05:18:05.517616104: call returned: [0, "GENERAL.DEVICE:                         eth0\nGENERAL.TYPE:                           ethernet\nGENERAL.HWADDR:                         50:54:00:31:D8:C7\nGENERAL.MTU:                            1500\nGENERAL.STATE:                          100 (connected)\nGENERAL.CONNECTION:                     Wired connection\nGENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1\nWIRED-PROPERTIES.CARRIER:               on\nIP4.ADDRESS[1]:                         10.2.1.16/24\nIP4.GATEWAY:                            10.2.1.1\nIP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 10.2.1.1, mt = 100\nIP4.ROUTE[2]:                           dst = 10.2.1.0/24, nh = 0.0.0.0, mt = 100\nIP4.DNS[1]:                             10.2.1.1\nIP6.GATEWAY:                            --\n", ""]
05:18:05.537672113: Remote shell: calling as root: systemctl --quiet is-active tor@default.service
05:18:05.774691097: call returned: [0, "", ""]
05:18:05.774970491: Remote shell: calling as root: systemctl stop tor@default.service
05:18:06.191653553: call returned: [0, "", ""]
05:18:06.191978816: Remote shell: calling as root: date -s '@1570977528'
05:18:06.395552584: call returned: [0, "Sun 13 Oct 2019 02:38:48 PM UTC\n", ""]
05:18:06.395744420: Remote shell: calling as root: systemctl start tor@default.service
05:18:07.043340886: call returned: [0, "", ""]
05:18:07.043634148: Remote shell: calling as root: /bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target
05:18:07.249063242: call returned: [3, "", ""]
05:18:08.249528969: Remote shell: calling as root: /bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target
05:18:08.463426081: call returned: [3, "", ""]
05:18:09.463902490: Remote shell: calling as root: /bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target
05:18:09.715381996: call returned: [0, "", ""]
  Scenario: Starting a second instance of the Unsafe Browser results in an error message being shown. # features/unsafe_browser.feature:39
    Given I have started Tails from DVD and logged in and the network is connected                    # features/step_definitions/snapshots.rb:170
05:18:09.720583692: Sikuli: calling wait("GnomeApplicationsMenu.png")...
05:18:09.797742335: Remote shell: calling as amnesia: xdotool key Super
05:18:10.183948559: call returned: [0, "", ""]
05:18:10.184177159: Sikuli: calling wait("GnomeActivitiesOverview.png")...
05:18:20.447691968: FindFailedHookFailure was raised, re-running the failing Sikuli method.

As the attached video shows, for some reason, Sikuli clicking on (1023,384) actually opens the Applications menu.


Related issues

Blocks Tails - Feature #16209: Core work: Foundations Team Confirmed

Associated revisions

Revision e4f22a84 (diff)
Added by intrigeri 28 days ago

Test suite: ensure we don't break tests by opening the Applications menu in post_vm_start_hook (refs: #17164)

In 25% of the last 16 test suite runs on the testing branch, the "Starting
a second instance of the Unsafe Browser results in an error message being shown"
scenario failed because the Applications menu had been opened by
post_vm_start_hook, which breaks opening the Activities Overview: pressing the
SUPER key has no effect when the Applications menu is opened.

To workaround this problem, this commit uses the same trick that's already used
in the "all notifications have disappeared" step: press ESC and wait 1 second.

I admit I don't understand why Sikuli clicking on (1023,384) can possibly open
the Applications menu. It could be a bug in GNOME Shell, it could be a bug in
Sikuli, it could be a race condition. Given we'll ditch Sikuli soonish, and we
have a good workaround readily available, I won't invest more time into
investigating this now.

Revision e86f38a6
Added by segfault 5 days ago

Merge branch 'test/17164-post_vm_start_hook' into stable (Closes: #17164)

History

#1 Updated by intrigeri 28 days ago

  • Feature Branch set to test/17164-post_vm_start_hook

#2 Updated by intrigeri 28 days ago

#3 Updated by intrigeri 28 days ago

  • Priority changed from Normal to Elevated

(Breaking 25% of our test suite runs deserves higher than normal priority.)

#4 Updated by intrigeri 26 days ago

  • Status changed from In Progress to Needs Validation
  • Assignee deleted (intrigeri)

The bug this was supposed to fix never happened in 6 runs on Jenkins, so I'm confident it did the trick.

#5 Updated by intrigeri 26 days ago

  • Target version changed from Tails_4.0 to Tails_4.1

#6 Updated by segfault 5 days ago

  • Status changed from Needs Validation to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF