bamf matches the wrong desktop file when process started via autostart
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BAMF |
Fix Released
|
High
|
Marco Trevisan (Treviño) | ||
bamf (Ubuntu) |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) |
Bug Description
This was found during testing of the autopilot suite during daily-release testing (for some reason these test results are not being published). Found when using bamf: 0.5.0daily13.
The failing test is:
autopilot.
[Test Log:]
Stacktrace
_StringException: test-log: {{{
00:25:02.548 INFO globals:48 - *******
00:25:02.549 INFO globals:49 - Starting test autopilot.
00:25:02.550 DEBUG globals:131 - Starting: ['/usr/
}}}
traceback-1: {{{
Traceback (most recent call last):
File "/usr/lib/
raise AssertionError("The following apps were started during the test and not closed: %r", new_apps)
AssertionError: ('The following apps were started during the test and not closed: %r', [<Application 'Fire-up Autopilot tests'>])
}}}
traceback-2: {{{
Traceback (most recent call last):
File "/usr/lib/
obj.
TypeError: on_test_end() takes no arguments (2 given)
}}}
traceback-3: {{{
Traceback (most recent call last):
File "/usr/lib/
obj.
TypeError: on_test_end() takes no arguments (2 given)
}}}
Traceback (most recent call last):
File "/usr/lib/
self.
MismatchError: True != False
[Analysis]
The test attempts to open gedit and then, through dbus, assert that a process was started that matches the desktop file 'gedit.desktop'. This fails because bamf returns a match to /etc/xdg/
[Steps to reproduce]
The files used here were extracted from lp:otto and modified to run the single failing test case.
- Copy autopilot.desktop to /etc/xdg/
- Copy run-autopilot.sh to /usr/local/
- mkdir -p /var/local/
- Copy testsuites to /var/local/
- log out/log in.
- remove $HOME/.
The test will run and open a gedit window with the wrong application title.
I can reliable reproduce this on my saucy i386 VM. I've been unable to reproduce on my laptop running saucy amd64. The issue is that the xdg autostart job never appears to run.
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Andrea Azzarone (community): Approve
-
Diff: 317 lines (+185/-43)4 files modifiedsrc/bamf-matcher-private.h (+2/-0)
src/bamf-matcher.c (+55/-4)
src/bamf-matcher.h (+1/-1)
tests/bamfdaemon/test-matcher.c (+127/-38)
Changed in bamf: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
milestone: | none → 0.5.0 |
Changed in bamf (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
I've successfully tested the fix on my saucy i386 VM.