Merge lp:~vanvugt/mir/fix-1653658 into lp:mir
- fix-1653658
- Merge into development-branch
Status: | Superseded |
---|---|
Proposed branch: | lp:~vanvugt/mir/fix-1653658 |
Merge into: | lp:mir |
Diff against target: |
312 lines (+110/-11) 11 files modified
src/client/mir_connection.cpp (+8/-3) src/client/rpc/mir_basic_rpc_channel.cpp (+23/-8) src/client/rpc/mir_basic_rpc_channel.h (+8/-0) src/client/rpc/mir_protobuf_rpc_channel.cpp (+24/-0) src/client/rpc/mir_protobuf_rpc_channel.h (+3/-0) tests/acceptance-tests/test_client_library.cpp (+14/-0) tests/include/mir/test/doubles/stub_connection_configuration.h (+6/-0) tests/unit-tests/client/test_client_mir_surface.cpp (+6/-0) tests/unit-tests/client/test_mir_connection.cpp (+9/-0) tests/unit-tests/client/test_mir_render_surface.cpp (+3/-0) tests/unit-tests/platforms/android/client/test_android_client_platform.cpp (+6/-0) |
To merge this branch: | bzr merge lp:~vanvugt/mir/fix-1653658 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Approve | |
Daniel van Vugt | Abstain | ||
Chris Halse Rogers | Approve | ||
Review via email:
|
Commit message
Fix race between MirConnection's destructor and its RPC callbacks.
(LP: #1653658)
This ensures RPC callbacks never occur (so never touch the MirConnection) after destruction of the MirConnection has commenced.
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3905
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
Weird. I just ran those tests on my own krillin and they pass just fine.
Then again those above crashes on krillin are not new. I had seen them several times before this branch ever existed.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Chris Halse Rogers (raof) wrote : | # |
Looks good.
Nonblocking nits:
We should fix it so that MirConnection:
It's a bit weird that complete_response searches through pending_calls twice, but I can see why you've done it that way. Doing it better probably requires deeper changes.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3906
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
Hmm the only unexpected failure is still krillin:
05:52:44 [2017-01-05 05:52:44.153385] server_
05:52:44 [2017-01-05 05:52:44.153647] mirserver: Stopping
05:52:44 I: [FAILED] mir_demo_
05:52:44 [timestamp] End : mir_demo_
But it works on my krillin :/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3907
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
Points for consistency. All tests pass on krillin but some are leaving behind core files, or something, which makes it a failure...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
OK, two issues found so far:
(1) My krillin can't generate core files even with ulimit set. Had to also set /proc/sys/
(2) Bug 1654478 might be related.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3908
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
Finally. I think the clang amd64 run is showing the bug here.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3909
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3911
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'src/client/mir_connection.cpp' | |||
2 | --- src/client/mir_connection.cpp 2017-01-04 14:53:35 +0000 | |||
3 | +++ src/client/mir_connection.cpp 2017-01-06 05:34:08 +0000 | |||
4 | @@ -309,9 +309,11 @@ | |||
5 | 309 | 309 | ||
6 | 310 | MirConnection::~MirConnection() noexcept | 310 | MirConnection::~MirConnection() noexcept |
7 | 311 | { | 311 | { |
11 | 312 | // We don't die while if are pending callbacks (as they touch this). | 312 | if (channel) // some tests don't have one |
12 | 313 | // But, if after 500ms we don't get a call, assume it won't happen. | 313 | { |
13 | 314 | connect_wait_handle.wait_for_pending(std::chrono::milliseconds(500)); | 314 | channel->discard_future_calls(); |
14 | 315 | channel->wait_for_outstanding_calls(); | ||
15 | 316 | } | ||
16 | 315 | 317 | ||
17 | 316 | std::lock_guard<decltype(mutex)> lock(mutex); | 318 | std::lock_guard<decltype(mutex)> lock(mutex); |
18 | 317 | surface_map.reset(); | 319 | surface_map.reset(); |
19 | @@ -643,6 +645,9 @@ | |||
20 | 643 | server.disconnect(ignored.get(), ignored.get(), | 645 | server.disconnect(ignored.get(), ignored.get(), |
21 | 644 | google::protobuf::NewCallback(this, &MirConnection::done_disconnect)); | 646 | google::protobuf::NewCallback(this, &MirConnection::done_disconnect)); |
22 | 645 | 647 | ||
23 | 648 | if (channel) | ||
24 | 649 | channel->discard_future_calls(); | ||
25 | 650 | |||
26 | 646 | return &disconnect_wait_handle; | 651 | return &disconnect_wait_handle; |
27 | 647 | } | 652 | } |
28 | 648 | 653 | ||
29 | 649 | 654 | ||
30 | === modified file 'src/client/rpc/mir_basic_rpc_channel.cpp' | |||
31 | --- src/client/rpc/mir_basic_rpc_channel.cpp 2016-07-18 07:38:38 +0000 | |||
32 | +++ src/client/rpc/mir_basic_rpc_channel.cpp 2017-01-06 05:34:08 +0000 | |||
33 | @@ -83,9 +83,10 @@ | |||
34 | 83 | auto call = pending_calls.find(result.id()); | 83 | auto call = pending_calls.find(result.id()); |
35 | 84 | if (call != pending_calls.end()) | 84 | if (call != pending_calls.end()) |
36 | 85 | { | 85 | { |
38 | 86 | completion = call->second; | 86 | completion = std::move(call->second); |
39 | 87 | pending_calls.erase(call); | 87 | pending_calls.erase(call); |
40 | 88 | } | 88 | } |
41 | 89 | ++running_callbacks; | ||
42 | 89 | } | 90 | } |
43 | 90 | 91 | ||
44 | 91 | if (!completion.complete) | 92 | if (!completion.complete) |
45 | @@ -97,29 +98,43 @@ | |||
46 | 97 | rpc_report->complete_response(result); | 98 | rpc_report->complete_response(result); |
47 | 98 | completion.complete->Run(); | 99 | completion.complete->Run(); |
48 | 99 | } | 100 | } |
49 | 101 | |||
50 | 102 | { | ||
51 | 103 | std::unique_lock<std::mutex> lock(mutex); | ||
52 | 104 | --running_callbacks; | ||
53 | 105 | pending_calls_shrank.notify_all(); | ||
54 | 106 | } | ||
55 | 100 | } | 107 | } |
56 | 101 | 108 | ||
57 | 102 | void mclrd::PendingCallCache::force_completion() | 109 | void mclrd::PendingCallCache::force_completion() |
58 | 103 | { | 110 | { |
59 | 104 | std::unique_lock<std::mutex> lock(mutex); | 111 | std::unique_lock<std::mutex> lock(mutex); |
61 | 105 | for (auto& call : pending_calls) | 112 | ++running_callbacks; |
62 | 113 | while (!pending_calls.empty()) | ||
63 | 106 | { | 114 | { |
65 | 107 | auto& completion = call.second; | 115 | auto i = pending_calls.begin(); |
66 | 116 | auto completion = std::move(i->second); | ||
67 | 117 | pending_calls.erase(i); | ||
68 | 118 | lock.unlock(); | ||
69 | 108 | completion.complete->Run(); | 119 | completion.complete->Run(); |
70 | 120 | lock.lock(); | ||
71 | 109 | } | 121 | } |
74 | 110 | 122 | --running_callbacks; | |
75 | 111 | pending_calls.erase(pending_calls.begin(), pending_calls.end()); | 123 | pending_calls_shrank.notify_all(); |
76 | 112 | } | 124 | } |
77 | 113 | 125 | ||
78 | 114 | |||
79 | 115 | |||
80 | 116 | bool mclrd::PendingCallCache::empty() const | 126 | bool mclrd::PendingCallCache::empty() const |
81 | 117 | { | 127 | { |
82 | 118 | std::unique_lock<std::mutex> lock(mutex); | 128 | std::unique_lock<std::mutex> lock(mutex); |
83 | 119 | return pending_calls.empty(); | 129 | return pending_calls.empty(); |
84 | 120 | } | 130 | } |
85 | 121 | 131 | ||
87 | 122 | 132 | void mclrd::PendingCallCache::wait_till_complete() const | |
88 | 133 | { | ||
89 | 134 | std::unique_lock<std::mutex> lock(mutex); | ||
90 | 135 | while (running_callbacks || !pending_calls.empty()) | ||
91 | 136 | pending_calls_shrank.wait(lock); | ||
92 | 137 | } | ||
93 | 123 | 138 | ||
94 | 124 | mclr::MirBasicRpcChannel::MirBasicRpcChannel() : | 139 | mclr::MirBasicRpcChannel::MirBasicRpcChannel() : |
95 | 125 | next_message_id(0), | 140 | next_message_id(0), |
96 | 126 | 141 | ||
97 | === modified file 'src/client/rpc/mir_basic_rpc_channel.h' | |||
98 | --- src/client/rpc/mir_basic_rpc_channel.h 2016-01-29 08:18:22 +0000 | |||
99 | +++ src/client/rpc/mir_basic_rpc_channel.h 2017-01-06 05:34:08 +0000 | |||
100 | @@ -24,6 +24,7 @@ | |||
101 | 24 | #include <mutex> | 24 | #include <mutex> |
102 | 25 | #include <atomic> | 25 | #include <atomic> |
103 | 26 | #include <vector> | 26 | #include <vector> |
104 | 27 | #include <condition_variable> | ||
105 | 27 | 28 | ||
106 | 28 | namespace google | 29 | namespace google |
107 | 29 | { | 30 | { |
108 | @@ -77,6 +78,8 @@ | |||
109 | 77 | 78 | ||
110 | 78 | bool empty() const; | 79 | bool empty() const; |
111 | 79 | 80 | ||
112 | 81 | void wait_till_complete() const; | ||
113 | 82 | |||
114 | 80 | private: | 83 | private: |
115 | 81 | 84 | ||
116 | 82 | struct PendingCall | 85 | struct PendingCall |
117 | @@ -94,6 +97,8 @@ | |||
118 | 94 | }; | 97 | }; |
119 | 95 | 98 | ||
120 | 96 | std::mutex mutable mutex; | 99 | std::mutex mutable mutex; |
121 | 100 | std::condition_variable mutable pending_calls_shrank; | ||
122 | 101 | int running_callbacks = 0; | ||
123 | 97 | std::map<int, PendingCall> pending_calls; | 102 | std::map<int, PendingCall> pending_calls; |
124 | 98 | std::shared_ptr<RpcReport> const rpc_report; | 103 | std::shared_ptr<RpcReport> const rpc_report; |
125 | 99 | }; | 104 | }; |
126 | @@ -110,6 +115,9 @@ | |||
127 | 110 | google::protobuf::MessageLite* response, | 115 | google::protobuf::MessageLite* response, |
128 | 111 | google::protobuf::Closure* complete) = 0; | 116 | google::protobuf::Closure* complete) = 0; |
129 | 112 | 117 | ||
130 | 118 | virtual void discard_future_calls() = 0; | ||
131 | 119 | virtual void wait_for_outstanding_calls() = 0; | ||
132 | 120 | |||
133 | 113 | protected: | 121 | protected: |
134 | 114 | MirBasicRpcChannel(); | 122 | MirBasicRpcChannel(); |
135 | 115 | mir::protobuf::wire::Invocation invocation_for( | 123 | mir::protobuf::wire::Invocation invocation_for( |
136 | 116 | 124 | ||
137 | === modified file 'src/client/rpc/mir_protobuf_rpc_channel.cpp' | |||
138 | --- src/client/rpc/mir_protobuf_rpc_channel.cpp 2016-12-23 07:58:44 +0000 | |||
139 | +++ src/client/rpc/mir_protobuf_rpc_channel.cpp 2017-01-06 05:34:08 +0000 | |||
140 | @@ -197,6 +197,20 @@ | |||
141 | 197 | google::protobuf::MessageLite* response, | 197 | google::protobuf::MessageLite* response, |
142 | 198 | google::protobuf::Closure* complete) | 198 | google::protobuf::Closure* complete) |
143 | 199 | { | 199 | { |
144 | 200 | if (discard) | ||
145 | 201 | { | ||
146 | 202 | /* | ||
147 | 203 | * Until recently we had no explicit plan for what to do in this case. | ||
148 | 204 | * Callbacks would race with destruction of the MirConnection and either | ||
149 | 205 | * succeed, deadlock, crash or corrupt memory. However the one apparent | ||
150 | 206 | * intent in the old plan was that we close all closures so that the | ||
151 | 207 | * user doesn't leak any memory. So do that... | ||
152 | 208 | */ | ||
153 | 209 | if (complete) | ||
154 | 210 | complete->Run(); | ||
155 | 211 | return; | ||
156 | 212 | } | ||
157 | 213 | |||
158 | 200 | // Only send message when details saved for handling response | 214 | // Only send message when details saved for handling response |
159 | 201 | std::vector<mir::Fd> fds; | 215 | std::vector<mir::Fd> fds; |
160 | 202 | if (parameters->GetTypeName() == "mir.protobuf.BufferRequest") | 216 | if (parameters->GetTypeName() == "mir.protobuf.BufferRequest") |
161 | @@ -228,6 +242,16 @@ | |||
162 | 228 | send_message(invocation, invocation, fds); | 242 | send_message(invocation, invocation, fds); |
163 | 229 | } | 243 | } |
164 | 230 | 244 | ||
165 | 245 | void mclr::MirProtobufRpcChannel::discard_future_calls() | ||
166 | 246 | { | ||
167 | 247 | discard = true; | ||
168 | 248 | } | ||
169 | 249 | |||
170 | 250 | void mclr::MirProtobufRpcChannel::wait_for_outstanding_calls() | ||
171 | 251 | { | ||
172 | 252 | pending_calls.wait_till_complete(); | ||
173 | 253 | } | ||
174 | 254 | |||
175 | 231 | void mclr::MirProtobufRpcChannel::send_message( | 255 | void mclr::MirProtobufRpcChannel::send_message( |
176 | 232 | mir::protobuf::wire::Invocation const& body, | 256 | mir::protobuf::wire::Invocation const& body, |
177 | 233 | mir::protobuf::wire::Invocation const& invocation, | 257 | mir::protobuf::wire::Invocation const& invocation, |
178 | 234 | 258 | ||
179 | === modified file 'src/client/rpc/mir_protobuf_rpc_channel.h' | |||
180 | --- src/client/rpc/mir_protobuf_rpc_channel.h 2016-12-13 06:00:32 +0000 | |||
181 | +++ src/client/rpc/mir_protobuf_rpc_channel.h 2017-01-06 05:34:08 +0000 | |||
182 | @@ -98,10 +98,13 @@ | |||
183 | 98 | google::protobuf::MessageLite const* parameters, | 98 | google::protobuf::MessageLite const* parameters, |
184 | 99 | google::protobuf::MessageLite* response, | 99 | google::protobuf::MessageLite* response, |
185 | 100 | google::protobuf::Closure* complete) override; | 100 | google::protobuf::Closure* complete) override; |
186 | 101 | void discard_future_calls() override; | ||
187 | 102 | void wait_for_outstanding_calls() override; | ||
188 | 101 | 103 | ||
189 | 102 | private: | 104 | private: |
190 | 103 | std::shared_ptr<RpcReport> const rpc_report; | 105 | std::shared_ptr<RpcReport> const rpc_report; |
191 | 104 | detail::PendingCallCache pending_calls; | 106 | detail::PendingCallCache pending_calls; |
192 | 107 | std::atomic_bool discard{false}; | ||
193 | 105 | 108 | ||
194 | 106 | static constexpr size_t size_of_header = 2; | 109 | static constexpr size_t size_of_header = 2; |
195 | 107 | detail::SendBuffer header_bytes; | 110 | detail::SendBuffer header_bytes; |
196 | 108 | 111 | ||
197 | === modified file 'tests/acceptance-tests/test_client_library.cpp' | |||
198 | --- tests/acceptance-tests/test_client_library.cpp 2016-12-17 00:52:45 +0000 | |||
199 | +++ tests/acceptance-tests/test_client_library.cpp 2017-01-06 05:34:08 +0000 | |||
200 | @@ -246,6 +246,20 @@ | |||
201 | 246 | mir_connection_release(connection); | 246 | mir_connection_release(connection); |
202 | 247 | } | 247 | } |
203 | 248 | 248 | ||
204 | 249 | TEST_F(ClientLibrary, shutdown_race_is_resolved_safely) | ||
205 | 250 | { // An attempt at a regression test for race LP: #1653658 | ||
206 | 251 | connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); | ||
207 | 252 | auto const spec = mir_connection_create_spec_for_normal_surface( | ||
208 | 253 | connection, 123, 456, mir_pixel_format_abgr_8888); | ||
209 | 254 | surface = mir_surface_create_sync(spec); | ||
210 | 255 | mir_surface_spec_release(spec); | ||
211 | 256 | |||
212 | 257 | EXPECT_THAT(surface, IsValid()); | ||
213 | 258 | |||
214 | 259 | mir_surface_release(surface, [](MirSurface*, void*){ sleep(1); }, NULL); | ||
215 | 260 | mir_connection_release(connection); | ||
216 | 261 | } | ||
217 | 262 | |||
218 | 249 | TEST_F(ClientLibrary, can_set_surface_state) | 263 | TEST_F(ClientLibrary, can_set_surface_state) |
219 | 250 | { | 264 | { |
220 | 251 | connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); | 265 | connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__); |
221 | 252 | 266 | ||
222 | === modified file 'tests/include/mir/test/doubles/stub_connection_configuration.h' | |||
223 | --- tests/include/mir/test/doubles/stub_connection_configuration.h 2016-12-23 05:15:02 +0000 | |||
224 | +++ tests/include/mir/test/doubles/stub_connection_configuration.h 2017-01-06 05:34:08 +0000 | |||
225 | @@ -42,6 +42,12 @@ | |||
226 | 42 | channel_call_count++; | 42 | channel_call_count++; |
227 | 43 | c->Run(); | 43 | c->Run(); |
228 | 44 | } | 44 | } |
229 | 45 | void discard_future_calls() override | ||
230 | 46 | { | ||
231 | 47 | } | ||
232 | 48 | void wait_for_outstanding_calls() override | ||
233 | 49 | { | ||
234 | 50 | } | ||
235 | 45 | mir::Fd watch_fd() const | 51 | mir::Fd watch_fd() const |
236 | 46 | { | 52 | { |
237 | 47 | int fd[2]; | 53 | int fd[2]; |
238 | 48 | 54 | ||
239 | === modified file 'tests/unit-tests/client/test_client_mir_surface.cpp' | |||
240 | --- tests/unit-tests/client/test_client_mir_surface.cpp 2016-12-23 07:58:44 +0000 | |||
241 | +++ tests/unit-tests/client/test_client_mir_surface.cpp 2017-01-06 05:34:08 +0000 | |||
242 | @@ -261,6 +261,12 @@ | |||
243 | 261 | { | 261 | { |
244 | 262 | delete closure; | 262 | delete closure; |
245 | 263 | } | 263 | } |
246 | 264 | void discard_future_calls() override | ||
247 | 265 | { | ||
248 | 266 | } | ||
249 | 267 | void wait_for_outstanding_calls() override | ||
250 | 268 | { | ||
251 | 269 | } | ||
252 | 264 | }; | 270 | }; |
253 | 265 | 271 | ||
254 | 266 | void null_connected_callback(MirConnection* /*connection*/, void * /*client_context*/) | 272 | void null_connected_callback(MirConnection* /*connection*/, void * /*client_context*/) |
255 | 267 | 273 | ||
256 | === modified file 'tests/unit-tests/client/test_mir_connection.cpp' | |||
257 | --- tests/unit-tests/client/test_mir_connection.cpp 2016-12-23 07:58:44 +0000 | |||
258 | +++ tests/unit-tests/client/test_mir_connection.cpp 2017-01-06 05:34:08 +0000 | |||
259 | @@ -156,6 +156,9 @@ | |||
260 | 156 | complete->Run(); | 156 | complete->Run(); |
261 | 157 | } | 157 | } |
262 | 158 | 158 | ||
263 | 159 | MOCK_METHOD0(discard_future_calls, void()); | ||
264 | 160 | MOCK_METHOD0(wait_for_outstanding_calls, void()); | ||
265 | 161 | |||
266 | 159 | MOCK_METHOD2(on_buffer_stream_create, void(mp::BufferStream&, google::protobuf::Closure* complete)); | 162 | MOCK_METHOD2(on_buffer_stream_create, void(mp::BufferStream&, google::protobuf::Closure* complete)); |
267 | 160 | MOCK_METHOD2(connect, void(mp::ConnectParameters const*,mp::Connection*)); | 163 | MOCK_METHOD2(connect, void(mp::ConnectParameters const*,mp::Connection*)); |
268 | 161 | MOCK_METHOD1(configure_display_sent, void(mp::DisplayConfiguration const*)); | 164 | MOCK_METHOD1(configure_display_sent, void(mp::DisplayConfiguration const*)); |
269 | @@ -716,6 +719,12 @@ | |||
270 | 716 | { | 719 | { |
271 | 717 | delete closure; | 720 | delete closure; |
272 | 718 | } | 721 | } |
273 | 722 | void discard_future_calls() override | ||
274 | 723 | { | ||
275 | 724 | } | ||
276 | 725 | void wait_for_outstanding_calls() override | ||
277 | 726 | { | ||
278 | 727 | } | ||
279 | 719 | }; | 728 | }; |
280 | 720 | TestConnectionConfiguration conf{ | 729 | TestConnectionConfiguration conf{ |
281 | 721 | mock_platform, std::make_shared<NiceMock<FakeRpcChannel>>(), mock_buffer_allocator }; | 730 | mock_platform, std::make_shared<NiceMock<FakeRpcChannel>>(), mock_buffer_allocator }; |
282 | 722 | 731 | ||
283 | === modified file 'tests/unit-tests/client/test_mir_render_surface.cpp' | |||
284 | --- tests/unit-tests/client/test_mir_render_surface.cpp 2016-12-13 06:00:32 +0000 | |||
285 | +++ tests/unit-tests/client/test_mir_render_surface.cpp 2017-01-06 05:34:08 +0000 | |||
286 | @@ -87,6 +87,9 @@ | |||
287 | 87 | complete->Run(); | 87 | complete->Run(); |
288 | 88 | } | 88 | } |
289 | 89 | 89 | ||
290 | 90 | MOCK_METHOD0(discard_future_calls, void()); | ||
291 | 91 | MOCK_METHOD0(wait_for_outstanding_calls, void()); | ||
292 | 92 | |||
293 | 90 | MOCK_METHOD2(on_buffer_stream_create, void(mp::BufferStream&, google::protobuf::Closure* complete)); | 93 | MOCK_METHOD2(on_buffer_stream_create, void(mp::BufferStream&, google::protobuf::Closure* complete)); |
294 | 91 | 94 | ||
295 | 92 | MOCK_CONST_METHOD0(watch_fd, mir::Fd()); | 95 | MOCK_CONST_METHOD0(watch_fd, mir::Fd()); |
296 | 93 | 96 | ||
297 | === modified file 'tests/unit-tests/platforms/android/client/test_android_client_platform.cpp' | |||
298 | --- tests/unit-tests/platforms/android/client/test_android_client_platform.cpp 2016-12-23 07:58:44 +0000 | |||
299 | +++ tests/unit-tests/platforms/android/client/test_android_client_platform.cpp 2017-01-06 05:34:08 +0000 | |||
300 | @@ -204,6 +204,12 @@ | |||
301 | 204 | channel_call_count++; | 204 | channel_call_count++; |
302 | 205 | c->Run(); | 205 | c->Run(); |
303 | 206 | } | 206 | } |
304 | 207 | void discard_future_calls() override | ||
305 | 208 | { | ||
306 | 209 | } | ||
307 | 210 | void wait_for_outstanding_calls() override | ||
308 | 211 | { | ||
309 | 212 | } | ||
310 | 207 | mir::Fd watch_fd() const | 213 | mir::Fd watch_fd() const |
311 | 208 | { | 214 | { |
312 | 209 | int fd[2]; | 215 | int fd[2]; |
FAILED: Continuous integration, rev:3904 /mir-jenkins. ubuntu. com/job/ mir-ci/ 2514/ /mir-jenkins. ubuntu. com/job/ build-mir/ 3274/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/3341 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 3333 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 3333 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= yakkety/ 3333 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= yakkety/ 3303 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= yakkety/ 3303/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 3303 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 3303/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= yakkety/ 3303 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= yakkety/ 3303/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 3303/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 3303/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 3303 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 3303/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 3303 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 3303/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 2514/rebuild
https:/