Merge lp:~barry/ubuntu-system-image/lp1365646 into lp:~registry/ubuntu-system-image/client

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 276
Proposed branch: lp:~barry/ubuntu-system-image/lp1365646
Merge into: lp:~registry/ubuntu-system-image/client
Diff against target: 44 lines (+23/-0)
2 files modified
NEWS.rst (+1/-0)
systemimage/tests/test_dbus.py (+22/-0)
To merge this branch: bzr merge lp:~barry/ubuntu-system-image/lp1365646
Reviewer Review Type Date Requested Status
Registry Administrators Pending
Review via email: mp+234549@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS.rst'
2--- NEWS.rst 2014-09-12 00:47:44 +0000
3+++ NEWS.rst 2014-09-12 20:39:45 +0000
4@@ -14,6 +14,7 @@
5 prefix which can be used to set the log level for the D-Bus API methods.
6 By default, they log at `ERROR` level, but can be set lower for debugging
7 purposes. (LP: #1279970)
8+ * Don't crash when releasing an unacquired checking lock. (LP: #1365646)
9
10 2.3.2 (2014-07-31)
11 ==================
12
13=== modified file 'systemimage/tests/test_dbus.py'
14--- systemimage/tests/test_dbus.py 2014-09-11 21:24:47 +0000
15+++ systemimage/tests/test_dbus.py 2014-09-12 20:39:45 +0000
16@@ -1150,6 +1150,28 @@
17 # And now there is a command file for the update.
18 self.assertTrue(os.path.exists(self.command_file))
19
20+ def test_lp_1365646(self):
21+ # After an automatic download is complete, we got three DownloadUpdate
22+ # calls with no intervening CheckForUpdate. This causes a crash since
23+ # an unlocked checking lock was released.
24+ self.download_always()
25+ # Do a normal automatic download.
26+ reactor = SignalCapturingReactor('UpdateDownloaded')
27+ reactor.run(self.iface.CheckForUpdate)
28+ self.assertEqual(len(reactor.signals), 1)
29+ # Now, just do a manual DownloadUpdate. We should get an almost
30+ # immediate UpdateDownloaded in response. Nothing actually gets
31+ # downloaded, but the files in the cache are still valid. The bug
32+ # referenced by this method would cause s-i-d to crash, so as long as
33+ # the process still exists after the signal is received, the bug is
34+ # fixed. The crash doesn't actually effect any client behavior! But
35+ # the traceback does show up in the crash reporter.
36+ process = find_dbus_process(SystemImagePlugin.controller.ini_path)
37+ reactor = SignalCapturingReactor('UpdateDownloaded')
38+ reactor.run(self.iface.DownloadUpdate)
39+ self.assertEqual(len(reactor.signals), 1)
40+ self.assertTrue(process.is_running())
41+
42
43 class TestDBusGetSet(_TestBase):
44 """Test the DBus client's key/value settings."""

Subscribers

People subscribed via source and target branches