Project

General

Profile

Bug #11465

Bug #10288: Fix newly identified issues to make our test suite more robust and faster

focus_window uses select_virtual_desktop in a racy way

Added by intrigeri over 3 years ago. Updated about 3 years ago.

Status:
Confirmed
Priority:
Elevated
Assignee:
-
Category:
Test suite
Target version:
-
Start date:
05/23/2016
Due date:
% Done:

0%

Feature Branch:
test/11465-focus_window-is-fragile
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Email Client

Description

Apparently the desktop switch trick is not fully synchronous, and then we can end up in desktop 4 (i.e. 3 for xdotool, that counts from 0). I've seen it break one Icedove test (video attached), but this has the potential to break any test that uses focus_window:

  Scenario: Enigmail is configured to use the correct keyserver                    # features/icedove.feature:22
calling as root: echo 'hello?'
call returned: [0, "hello?\n", ""]
[log] CLICK on (1024,384)
calling as root: /sbin/ifconfig eth0 | grep -q 'inet addr'
call returned: [0, "", ""]
calling as root: systemctl --quiet is-active tor@default.service
call returned: [0, "", ""]
calling as root: systemctl stop tor@default.service
call returned: [0, "", ""]
calling as root: rm -f /var/log/tor/log
call returned: [0, "", ""]
calling as root: systemctl --no-block restart tails-tor-has-bootstrapped.target
call returned: [0, "", ""]
calling as root: date -s '@1464015400'
call returned: [0, "Mon May 23 14:56:40 UTC 2016\n", ""]
spawning as root: restart-tor
calling as root: /usr/local/sbin/tor-has-bootstrapped
call returned: [1, "", ""]
calling as root: /usr/local/sbin/tor-has-bootstrapped
call returned: [3, "", ""]
calling as root: /usr/local/sbin/tor-has-bootstrapped
call returned: [3, "", ""]
calling as root: /usr/local/sbin/tor-has-bootstrapped
call returned: [0, "", ""]
calling as root: cat /proc/cmdline
call returned: [0, "BOOT_IMAGE=/live/vmlinuz2 initrd=/live/initrd2.img boot=live config live-media=removable apparmor=1 security=apparmor nopersistence noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash noautologin module=Tails slab_nomerge slub_debug=FZ mce=0 vsyscall=none  quiet autotest_never_use_this_option blacklist=psmouse \n", ""]
calling as amnesia: mktemp
call returned: [0, "/tmp/tmp.CHeKe0StXd\n", ""]
calling as root: rm -f '/tmp/tmp.CHeKe0StXd'
call returned: [0, "", ""]
calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gnome-shell'"'"')
application.child('"'"'Applications'"'"', roleName='"'"'label'"'"').click()' >> '/tmp/tmp.CHeKe0StXd'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.CHeKe0StXd'
call returned: [0, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.CHeKe0StXd_20160523-145645_debug ...\nClicking on [label | Applications]\nMouse button 1 click at (47,13)\n", ""]
calling as root: rm -f '/tmp/tmp.CHeKe0StXd'
call returned: [0, "", ""]
calling as amnesia: mktemp
call returned: [0, "/tmp/tmp.LhDdE4iwtE\n", ""]
calling as root: rm -f '/tmp/tmp.LhDdE4iwtE'
call returned: [0, "", ""]
calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gnome-shell'"'"')
application.child('"'"'Internet'"'"', roleName='"'"'label'"'"').click()' >> '/tmp/tmp.LhDdE4iwtE'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.LhDdE4iwtE'
call returned: [0, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.LhDdE4iwtE_20160523-145648_debug ...\nClicking on [label | Internet]\nMouse button 1 click at (59,166)\n", ""]
calling as root: rm -f '/tmp/tmp.LhDdE4iwtE'
call returned: [0, "", ""]
calling as amnesia: mktemp
call returned: [0, "/tmp/tmp.nLZ1jF1IOU\n", ""]
calling as root: rm -f '/tmp/tmp.nLZ1jF1IOU'
call returned: [0, "", ""]
calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gnome-shell'"'"')
application.child('"'"'Icedove'"'"', roleName='"'"'label'"'"').click()' >> '/tmp/tmp.nLZ1jF1IOU'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.nLZ1jF1IOU'
call returned: [0, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.nLZ1jF1IOU_20160523-145652_debug ...\nClicking on [label | Icedove]\nMouse button 1 click at (283,160)\n", ""]
calling as root: rm -f '/tmp/tmp.nLZ1jF1IOU'
call returned: [0, "", ""]
calling as root: pidof -x -o '%PPID' icedove
call returned: [0, "4626 4620\n", ""]
calling as root: cat /home/amnesia/.icedove/profile.default/prefs.js
call returned: [0, "# Mozilla User Preferences\n\n/* Do not edit this file.\n *\n * If you make changes to this file while the application is running,\n * the changes will be overwritten when the application exits.\n *\n * To make a manual change to preferences, you can visit the URL about:config\n */\n\n", ""]
calling as amnesia: xdotool search --name 'Mail Account Setup' windowactivate --sync
call returned: [1, "", ""]
calling as amnesia: xdotool set_desktop '3'
call returned: [0, "", ""]
calling as amnesia: xdotool set_desktop '0'
call returned: [0, "", ""]
calling as amnesia: xdotool search --name 'Mail Account Setup' windowactivate --sync
call returned: [0, "", ""]
calling as amnesia: xdotool search --name 'Mail Account Setup' windowactivate --sync
call returned: [0, "", ""]
[log] TYPE "" 
    Given I cancel setting up an email account                                     # features/step_definitions/icedove.rb:21
calling as amnesia: xdotool search --name 'Icedove' windowactivate --sync
call returned: [0, "", "XGetWindowProperty[_NET_WM_DESKTOP] failed (code=1)\n"]
    And I go into Enigmail's preferences                                           # features/step_definitions/icedove.rb:44
[log] Alt+TYPE "a" 
      FindFailed: can not find IcedoveEnigmailPreferences.png on the screen.
      Line ?, in File ? (RuntimeError)
      features/icedove.feature:24:in `And I go into Enigmail's preferences'
    When I click Enigmail's keyserver tab                                          # features/step_definitions/icedove.rb:53
    Then I see that Enigmail is configured to use the correct keyserver            # features/step_definitions/icedove.rb:57
    When I click Enigmail's advanced tab                                           # features/step_definitions/icedove.rb:61
    Then I see that Enigmail is configured to use the correct SOCKS proxy          # features/step_definitions/icedove.rb:65
      Scenario failed at time 01:12:40

      Screenshot: https://jenkins.tails.boum.org/job/test_Tails_ISO_test-10442-watching-webm-over-https-is-fragile/18/artifact/build-artifacts/01:12:40_Enigmail_is_configured_to_use_the_correct_keyserver.png

      Video: https://jenkins.tails.boum.org/job/test_Tails_ISO_test-10442-watching-webm-over-https-is-fragile/18/artifact/build-artifacts/01:12:40_Enigmail_is_configured_to_use_the_correct_keyserver.mkv

History

#1 Updated by intrigeri over 3 years ago

  • Feature Branch set to test/11465-focus_window-is-fragile

#2 Updated by intrigeri over 3 years ago

  • Assignee set to anonym
  • Target version set to Tails_2.5

#3 Updated by intrigeri over 3 years ago

  • Priority changed from Normal to Elevated

#4 Updated by intrigeri about 3 years ago

  • Target version changed from Tails_2.5 to Tails_2.6

#5 Updated by intrigeri about 3 years ago

  • Target version deleted (Tails_2.6)

#6 Updated by intrigeri about 3 years ago

  • Assignee deleted (anonym)

Also available in: Atom PDF