Merge lp:~raof/mir/dont-ack-release-buffer into lp:mir
- dont-ack-release-buffer
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Alan Griffiths |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4207 |
Proposed branch: | lp:~raof/mir/dont-ack-release-buffer |
Merge into: | lp:mir |
Diff against target: |
346 lines (+63/-55) 18 files modified
include/server/mir/frontend/buffer_sink.h (+0/-1) src/client/buffer_vault.cpp (+10/-2) src/client/connection_surface_map.cpp (+1/-1) src/client/mir_connection.cpp (+6/-7) src/client/rpc/mir_protobuf_rpc_channel.cpp (+11/-3) src/include/common/mir/protobuf/protocol_version.h (+2/-2) src/server/compositor/buffer_map.cpp (+1/-3) src/server/frontend/event_sender.cpp (+0/-8) src/server/frontend/event_sender.h (+0/-1) src/server/scene/global_event_sender.cpp (+0/-4) src/server/scene/global_event_sender.h (+0/-1) tests/include/mir/test/doubles/mock_event_sink.h (+0/-1) tests/include/mir/test/doubles/null_event_sink.h (+0/-1) tests/mir_test_doubles/mock_event_sink_factory.cpp (+0/-6) tests/unit-tests/client/test_client_buffer_stream.cpp (+6/-7) tests/unit-tests/client/test_connection_resource_map.cpp (+2/-6) tests/unit-tests/client/test_protobuf_rpc_channel.cpp (+24/-0) tests/unit-tests/compositor/test_client_buffers.cpp (+0/-1) |
To merge this branch: | bzr merge lp:~raof/mir/dont-ack-release-buffer |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Approve | |
Alan Griffiths | Approve | ||
Review via email: mp+327496@code.launchpad.net |
Commit message
RPC: Don't require the server ACK client's buffer-release requests.
There's no particularly good reason to require the client to wait for server
acknowledgement before freeing the buffer that it wants to release,
so don't.
Description of the change
This makes fixing the mir_demo_
Mir CI Bot (mir-ci-bot) wrote : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:4207
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4208
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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Alan Griffiths (alan-griffiths) wrote : | # |
Looks sensible, seems to work.
We probably need to bump the protocol version though - AIUI legacy clients will be expecting a "release buffer" from the server?
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4209
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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Chris Halse Rogers (raof) wrote : | # |
Temporary(?) CI explosion?
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Chris Halse Rogers (raof) wrote : | # |
Other things aren't exploding, so maybe this won't, too?
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4210
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:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'include/server/mir/frontend/buffer_sink.h' | |||
2 | --- include/server/mir/frontend/buffer_sink.h 2017-05-08 03:04:26 +0000 | |||
3 | +++ include/server/mir/frontend/buffer_sink.h 2017-07-19 05:37:29 +0000 | |||
4 | @@ -37,7 +37,6 @@ | |||
5 | 37 | virtual void send_buffer(frontend::BufferStreamId id, graphics::Buffer& buffer, graphics::BufferIpcMsgType) = 0; | 37 | virtual void send_buffer(frontend::BufferStreamId id, graphics::Buffer& buffer, graphics::BufferIpcMsgType) = 0; |
6 | 38 | virtual void add_buffer(graphics::Buffer&) = 0; | 38 | virtual void add_buffer(graphics::Buffer&) = 0; |
7 | 39 | virtual void error_buffer(geometry::Size req_size, MirPixelFormat req_format, std::string const& error_msg) = 0; | 39 | virtual void error_buffer(geometry::Size req_size, MirPixelFormat req_format, std::string const& error_msg) = 0; |
8 | 40 | virtual void remove_buffer(graphics::Buffer&) = 0; | ||
9 | 41 | virtual void update_buffer(graphics::Buffer&) = 0; | 40 | virtual void update_buffer(graphics::Buffer&) = 0; |
10 | 42 | 41 | ||
11 | 43 | protected: | 42 | protected: |
12 | 44 | 43 | ||
13 | === modified file 'src/client/buffer_vault.cpp' | |||
14 | --- src/client/buffer_vault.cpp 2017-05-17 04:48:46 +0000 | |||
15 | +++ src/client/buffer_vault.cpp 2017-07-19 05:37:29 +0000 | |||
16 | @@ -86,11 +86,15 @@ | |||
17 | 86 | { | 86 | { |
18 | 87 | if (auto map = surface_map.lock()) | 87 | if (auto map = surface_map.lock()) |
19 | 88 | { | 88 | { |
22 | 89 | auto buffer = map->buffer(it.first); | 89 | if (auto buffer = map->buffer(it.first)) |
23 | 90 | buffer->set_callback(ignore_buffer, nullptr); | 90 | { |
24 | 91 | buffer->set_callback(ignore_buffer, nullptr); | ||
25 | 92 | } | ||
26 | 91 | } | 93 | } |
27 | 92 | if (!disconnected_) | 94 | if (!disconnected_) |
28 | 95 | { | ||
29 | 93 | free_buffer(it.first); | 96 | free_buffer(it.first); |
30 | 97 | } | ||
31 | 94 | } | 98 | } |
32 | 95 | catch (...) | 99 | catch (...) |
33 | 96 | { | 100 | { |
34 | @@ -110,6 +114,10 @@ | |||
35 | 110 | void mcl::BufferVault::free_buffer(int free_id) | 114 | void mcl::BufferVault::free_buffer(int free_id) |
36 | 111 | { | 115 | { |
37 | 112 | server_requests->free_buffer(free_id); | 116 | server_requests->free_buffer(free_id); |
38 | 117 | if (auto map = surface_map.lock()) | ||
39 | 118 | { | ||
40 | 119 | map->erase(free_id); | ||
41 | 120 | } | ||
42 | 113 | } | 121 | } |
43 | 114 | 122 | ||
44 | 115 | void mcl::BufferVault::realloc_buffer(int free_id, geom::Size size, MirPixelFormat format, int usage) | 123 | void mcl::BufferVault::realloc_buffer(int free_id, geom::Size size, MirPixelFormat format, int usage) |
45 | 116 | 124 | ||
46 | === modified file 'src/client/connection_surface_map.cpp' | |||
47 | --- src/client/connection_surface_map.cpp 2017-05-08 03:04:26 +0000 | |||
48 | +++ src/client/connection_surface_map.cpp 2017-07-19 05:37:29 +0000 | |||
49 | @@ -107,7 +107,7 @@ | |||
50 | 107 | if (it != buffers.end()) | 107 | if (it != buffers.end()) |
51 | 108 | return it->second; | 108 | return it->second; |
52 | 109 | else | 109 | else |
54 | 110 | BOOST_THROW_EXCEPTION(std::runtime_error("could not find buffer")); | 110 | return nullptr; |
55 | 111 | } | 111 | } |
56 | 112 | 112 | ||
57 | 113 | void mcl::ConnectionSurfaceMap::erase(void* render_surface_key) | 113 | void mcl::ConnectionSurfaceMap::erase(void* render_surface_key) |
58 | 114 | 114 | ||
59 | === modified file 'src/client/mir_connection.cpp' | |||
60 | --- src/client/mir_connection.cpp 2017-07-18 09:02:12 +0000 | |||
61 | +++ src/client/mir_connection.cpp 2017-07-19 05:37:29 +0000 | |||
62 | @@ -1323,16 +1323,15 @@ | |||
63 | 1323 | 1323 | ||
64 | 1324 | void MirConnection::release_buffer(mcl::MirBuffer* buffer) | 1324 | void MirConnection::release_buffer(mcl::MirBuffer* buffer) |
65 | 1325 | { | 1325 | { |
67 | 1326 | if (!buffer->valid()) | 1326 | if (buffer->valid()) |
68 | 1327 | { | 1327 | { |
71 | 1328 | surface_map->erase(buffer->rpc_id()); | 1328 | mp::BufferRelease request; |
72 | 1329 | return; | 1329 | auto released_buffer = request.add_buffers(); |
73 | 1330 | released_buffer->set_buffer_id(buffer->rpc_id()); | ||
74 | 1331 | server.release_buffers(&request, ignored.get(), gp::NewCallback(ignore)); | ||
75 | 1330 | } | 1332 | } |
76 | 1331 | 1333 | ||
81 | 1332 | mp::BufferRelease request; | 1334 | surface_map->erase(buffer->rpc_id()); |
78 | 1333 | auto released_buffer = request.add_buffers(); | ||
79 | 1334 | released_buffer->set_buffer_id(buffer->rpc_id()); | ||
80 | 1335 | server.release_buffers(&request, ignored.get(), gp::NewCallback(ignore)); | ||
82 | 1336 | } | 1335 | } |
83 | 1337 | 1336 | ||
84 | 1338 | void MirConnection::release_render_surface_with_content( | 1337 | void MirConnection::release_render_surface_with_content( |
85 | 1339 | 1338 | ||
86 | === modified file 'src/client/rpc/mir_protobuf_rpc_channel.cpp' | |||
87 | --- src/client/rpc/mir_protobuf_rpc_channel.cpp 2017-05-08 03:04:26 +0000 | |||
88 | +++ src/client/rpc/mir_protobuf_rpc_channel.cpp 2017-07-19 05:37:29 +0000 | |||
89 | @@ -359,11 +359,19 @@ | |||
90 | 359 | buffer->received(); | 359 | buffer->received(); |
91 | 360 | break; | 360 | break; |
92 | 361 | case mp::BufferOperation::update: | 361 | case mp::BufferOperation::update: |
95 | 362 | map->buffer(buffer_id)->received( | 362 | buffer = map->buffer(buffer_id); |
96 | 363 | *mcl::protobuf_to_native_buffer(seq.buffer_request().buffer())); | 363 | if (buffer) |
97 | 364 | { | ||
98 | 365 | buffer->received( | ||
99 | 366 | *mcl::protobuf_to_native_buffer(seq.buffer_request().buffer())); | ||
100 | 367 | } | ||
101 | 364 | break; | 368 | break; |
102 | 365 | case mp::BufferOperation::remove: | 369 | case mp::BufferOperation::remove: |
104 | 366 | map->erase(buffer_id); | 370 | /* The server never sends us an unsolicited ::remove request |
105 | 371 | * (and clients have no way of dealing with one) | ||
106 | 372 | * | ||
107 | 373 | * Just ignore it, because we've already deleted our buffer. | ||
108 | 374 | */ | ||
109 | 367 | break; | 375 | break; |
110 | 368 | default: | 376 | default: |
111 | 369 | BOOST_THROW_EXCEPTION(std::runtime_error("unknown buffer operation")); | 377 | BOOST_THROW_EXCEPTION(std::runtime_error("unknown buffer operation")); |
112 | 370 | 378 | ||
113 | === modified file 'src/include/common/mir/protobuf/protocol_version.h' | |||
114 | --- src/include/common/mir/protobuf/protocol_version.h 2017-06-29 16:07:49 +0000 | |||
115 | +++ src/include/common/mir/protobuf/protocol_version.h 2017-07-19 05:37:29 +0000 | |||
116 | @@ -27,12 +27,12 @@ | |||
117 | 27 | { | 27 | { |
118 | 28 | inline constexpr int current_protocol_version() | 28 | inline constexpr int current_protocol_version() |
119 | 29 | { | 29 | { |
121 | 30 | return MIR_VERSION_NUMBER(0,5,0); | 30 | return MIR_VERSION_NUMBER(0,6,0); |
122 | 31 | } | 31 | } |
123 | 32 | 32 | ||
124 | 33 | inline constexpr int oldest_compatible_protocol_version() | 33 | inline constexpr int oldest_compatible_protocol_version() |
125 | 34 | { | 34 | { |
127 | 35 | return MIR_VERSION_NUMBER(0,5,0); | 35 | return MIR_VERSION_NUMBER(0,6,0); |
128 | 36 | } | 36 | } |
129 | 37 | 37 | ||
130 | 38 | inline constexpr int next_incompatible_protocol_version() | 38 | inline constexpr int next_incompatible_protocol_version() |
131 | 39 | 39 | ||
132 | === modified file 'src/server/compositor/buffer_map.cpp' | |||
133 | --- src/server/compositor/buffer_map.cpp 2017-05-08 03:04:26 +0000 | |||
134 | +++ src/server/compositor/buffer_map.cpp 2017-07-19 05:37:29 +0000 | |||
135 | @@ -64,9 +64,7 @@ | |||
136 | 64 | { | 64 | { |
137 | 65 | std::unique_lock<decltype(mutex)> lk(mutex); | 65 | std::unique_lock<decltype(mutex)> lk(mutex); |
138 | 66 | auto it = checked_buffers_find(id, lk); | 66 | auto it = checked_buffers_find(id, lk); |
142 | 67 | if (auto s = sink.lock()) | 67 | buffers.erase(it); |
140 | 68 | s->remove_buffer(*it->second.buffer); | ||
141 | 69 | buffers.erase(it); | ||
143 | 70 | } | 68 | } |
144 | 71 | 69 | ||
145 | 72 | void mc::BufferMap::send_buffer(mg::BufferID id) | 70 | void mc::BufferMap::send_buffer(mg::BufferID id) |
146 | 73 | 71 | ||
147 | === modified file 'src/server/frontend/event_sender.cpp' | |||
148 | --- src/server/frontend/event_sender.cpp 2017-05-08 03:04:26 +0000 | |||
149 | +++ src/server/frontend/event_sender.cpp 2017-07-19 05:37:29 +0000 | |||
150 | @@ -143,14 +143,6 @@ | |||
151 | 143 | send_event_sequence(seq, {}); | 143 | send_event_sequence(seq, {}); |
152 | 144 | } | 144 | } |
153 | 145 | 145 | ||
154 | 146 | void mfd::EventSender::remove_buffer(graphics::Buffer& buffer) | ||
155 | 147 | { | ||
156 | 148 | mp::EventSequence seq; | ||
157 | 149 | auto request = seq.mutable_buffer_request(); | ||
158 | 150 | request->set_operation(mir::protobuf::BufferOperation::remove); | ||
159 | 151 | send_buffer(seq, buffer, mg::BufferIpcMsgType::update_msg); | ||
160 | 152 | } | ||
161 | 153 | |||
162 | 154 | void mfd::EventSender::update_buffer(graphics::Buffer& buffer) | 146 | void mfd::EventSender::update_buffer(graphics::Buffer& buffer) |
163 | 155 | { | 147 | { |
164 | 156 | mp::EventSequence seq; | 148 | mp::EventSequence seq; |
165 | 157 | 149 | ||
166 | === modified file 'src/server/frontend/event_sender.h' | |||
167 | --- src/server/frontend/event_sender.h 2017-05-08 03:04:26 +0000 | |||
168 | +++ src/server/frontend/event_sender.h 2017-07-19 05:37:29 +0000 | |||
169 | @@ -52,7 +52,6 @@ | |||
170 | 52 | void send_buffer(frontend::BufferStreamId id, graphics::Buffer& buffer, graphics::BufferIpcMsgType) override; | 52 | void send_buffer(frontend::BufferStreamId id, graphics::Buffer& buffer, graphics::BufferIpcMsgType) override; |
171 | 53 | void add_buffer(graphics::Buffer&) override; | 53 | void add_buffer(graphics::Buffer&) override; |
172 | 54 | void error_buffer(geometry::Size, MirPixelFormat, std::string const&) override; | 54 | void error_buffer(geometry::Size, MirPixelFormat, std::string const&) override; |
173 | 55 | void remove_buffer(graphics::Buffer&) override; | ||
174 | 56 | void update_buffer(graphics::Buffer&) override; | 55 | void update_buffer(graphics::Buffer&) override; |
175 | 57 | 56 | ||
176 | 58 | private: | 57 | private: |
177 | 59 | 58 | ||
178 | === modified file 'src/server/scene/global_event_sender.cpp' | |||
179 | --- src/server/scene/global_event_sender.cpp 2017-05-08 03:04:26 +0000 | |||
180 | +++ src/server/scene/global_event_sender.cpp 2017-07-19 05:37:29 +0000 | |||
181 | @@ -67,10 +67,6 @@ | |||
182 | 67 | { | 67 | { |
183 | 68 | } | 68 | } |
184 | 69 | 69 | ||
185 | 70 | void ms::GlobalEventSender::remove_buffer(graphics::Buffer&) | ||
186 | 71 | { | ||
187 | 72 | } | ||
188 | 73 | |||
189 | 74 | void ms::GlobalEventSender::update_buffer(graphics::Buffer&) | 70 | void ms::GlobalEventSender::update_buffer(graphics::Buffer&) |
190 | 75 | { | 71 | { |
191 | 76 | } | 72 | } |
192 | 77 | 73 | ||
193 | === modified file 'src/server/scene/global_event_sender.h' | |||
194 | --- src/server/scene/global_event_sender.h 2017-05-08 03:04:26 +0000 | |||
195 | +++ src/server/scene/global_event_sender.h 2017-07-19 05:37:29 +0000 | |||
196 | @@ -41,7 +41,6 @@ | |||
197 | 41 | void send_ping(int32_t serial) override; | 41 | void send_ping(int32_t serial) override; |
198 | 42 | void send_buffer(frontend::BufferStreamId id, graphics::Buffer& buffer, graphics::BufferIpcMsgType) override; | 42 | void send_buffer(frontend::BufferStreamId id, graphics::Buffer& buffer, graphics::BufferIpcMsgType) override; |
199 | 43 | void add_buffer(graphics::Buffer&) override; | 43 | void add_buffer(graphics::Buffer&) override; |
200 | 44 | void remove_buffer(graphics::Buffer&) override; | ||
201 | 45 | void update_buffer(graphics::Buffer&) override; | 44 | void update_buffer(graphics::Buffer&) override; |
202 | 46 | void error_buffer(geometry::Size, MirPixelFormat, std::string const&) override; | 45 | void error_buffer(geometry::Size, MirPixelFormat, std::string const&) override; |
203 | 47 | private: | 46 | private: |
204 | 48 | 47 | ||
205 | === modified file 'tests/include/mir/test/doubles/mock_event_sink.h' | |||
206 | --- tests/include/mir/test/doubles/mock_event_sink.h 2017-05-08 03:04:26 +0000 | |||
207 | +++ tests/include/mir/test/doubles/mock_event_sink.h 2017-07-19 05:37:29 +0000 | |||
208 | @@ -42,7 +42,6 @@ | |||
209 | 42 | MOCK_METHOD1(send_ping, void(int32_t)); | 42 | MOCK_METHOD1(send_ping, void(int32_t)); |
210 | 43 | MOCK_METHOD3(send_buffer, void(frontend::BufferStreamId, graphics::Buffer&, graphics::BufferIpcMsgType)); | 43 | MOCK_METHOD3(send_buffer, void(frontend::BufferStreamId, graphics::Buffer&, graphics::BufferIpcMsgType)); |
211 | 44 | MOCK_METHOD1(add_buffer, void(graphics::Buffer&)); | 44 | MOCK_METHOD1(add_buffer, void(graphics::Buffer&)); |
212 | 45 | MOCK_METHOD1(remove_buffer, void(graphics::Buffer&)); | ||
213 | 46 | MOCK_METHOD1(update_buffer, void(graphics::Buffer&)); | 45 | MOCK_METHOD1(update_buffer, void(graphics::Buffer&)); |
214 | 47 | MOCK_METHOD3(error_buffer, void(geometry::Size, MirPixelFormat, std::string const&)); | 46 | MOCK_METHOD3(error_buffer, void(geometry::Size, MirPixelFormat, std::string const&)); |
215 | 48 | MOCK_METHOD1(handle_input_config_change, void(MirInputConfig const&)); | 47 | MOCK_METHOD1(handle_input_config_change, void(MirInputConfig const&)); |
216 | 49 | 48 | ||
217 | === modified file 'tests/include/mir/test/doubles/null_event_sink.h' | |||
218 | --- tests/include/mir/test/doubles/null_event_sink.h 2017-05-08 03:04:26 +0000 | |||
219 | +++ tests/include/mir/test/doubles/null_event_sink.h 2017-07-19 05:37:29 +0000 | |||
220 | @@ -44,7 +44,6 @@ | |||
221 | 44 | void send_buffer(frontend::BufferStreamId, graphics::Buffer&, graphics::BufferIpcMsgType) override {} | 44 | void send_buffer(frontend::BufferStreamId, graphics::Buffer&, graphics::BufferIpcMsgType) override {} |
222 | 45 | void handle_input_config_change(MirInputConfig const&) override {} | 45 | void handle_input_config_change(MirInputConfig const&) override {} |
223 | 46 | void add_buffer(graphics::Buffer&) override {} | 46 | void add_buffer(graphics::Buffer&) override {} |
224 | 47 | void remove_buffer(graphics::Buffer&) override {} | ||
225 | 48 | void update_buffer(graphics::Buffer&) override {} | 47 | void update_buffer(graphics::Buffer&) override {} |
226 | 49 | void error_buffer(geometry::Size, MirPixelFormat, std::string const&) override {} | 48 | void error_buffer(geometry::Size, MirPixelFormat, std::string const&) override {} |
227 | 50 | }; | 49 | }; |
228 | 51 | 50 | ||
229 | === modified file 'tests/mir_test_doubles/mock_event_sink_factory.cpp' | |||
230 | --- tests/mir_test_doubles/mock_event_sink_factory.cpp 2017-05-08 03:04:26 +0000 | |||
231 | +++ tests/mir_test_doubles/mock_event_sink_factory.cpp 2017-07-19 05:37:29 +0000 | |||
232 | @@ -42,7 +42,6 @@ | |||
233 | 42 | void send_buffer(mf::BufferStreamId id, mg::Buffer& buf, mg::BufferIpcMsgType type) override; | 42 | void send_buffer(mf::BufferStreamId id, mg::Buffer& buf, mg::BufferIpcMsgType type) override; |
234 | 43 | void handle_input_config_change(MirInputConfig const& devices) override; | 43 | void handle_input_config_change(MirInputConfig const& devices) override; |
235 | 44 | void add_buffer(mir::graphics::Buffer&) override; | 44 | void add_buffer(mir::graphics::Buffer&) override; |
236 | 45 | void remove_buffer(mir::graphics::Buffer&) override; | ||
237 | 46 | void update_buffer(mir::graphics::Buffer&) override; | 45 | void update_buffer(mir::graphics::Buffer&) override; |
238 | 47 | void error_buffer(mir::geometry::Size, MirPixelFormat, std::string const&) override; | 46 | void error_buffer(mir::geometry::Size, MirPixelFormat, std::string const&) override; |
239 | 48 | 47 | ||
240 | @@ -106,11 +105,6 @@ | |||
241 | 106 | underlying_sink->error_buffer(sz, pf, error); | 105 | underlying_sink->error_buffer(sz, pf, error); |
242 | 107 | } | 106 | } |
243 | 108 | 107 | ||
244 | 109 | void GloballyUniqueMockEventSink::remove_buffer(mir::graphics::Buffer& buffer) | ||
245 | 110 | { | ||
246 | 111 | underlying_sink->remove_buffer(buffer); | ||
247 | 112 | } | ||
248 | 113 | |||
249 | 114 | void GloballyUniqueMockEventSink::update_buffer(mir::graphics::Buffer& buffer) | 108 | void GloballyUniqueMockEventSink::update_buffer(mir::graphics::Buffer& buffer) |
250 | 115 | { | 109 | { |
251 | 116 | underlying_sink->update_buffer(buffer); | 110 | underlying_sink->update_buffer(buffer); |
252 | 117 | 111 | ||
253 | === modified file 'tests/unit-tests/client/test_client_buffer_stream.cpp' | |||
254 | --- tests/unit-tests/client/test_client_buffer_stream.cpp 2017-05-17 04:48:46 +0000 | |||
255 | +++ tests/unit-tests/client/test_client_buffer_stream.cpp 2017-07-19 05:37:29 +0000 | |||
256 | @@ -204,16 +204,15 @@ | |||
257 | 204 | 204 | ||
258 | 205 | void async_buffer_arrives(mp::Buffer& buffer) | 205 | void async_buffer_arrives(mp::Buffer& buffer) |
259 | 206 | { | 206 | { |
261 | 207 | try | 207 | if (auto buf = map->buffer(buffer.buffer_id())) |
262 | 208 | { | 208 | { |
264 | 209 | map->buffer(buffer.buffer_id())->received(*mcl::protobuf_to_native_buffer(buffer)); | 209 | buf->received(*mcl::protobuf_to_native_buffer(buffer)); |
265 | 210 | } | 210 | } |
267 | 211 | catch (std::runtime_error& e) | 211 | else |
268 | 212 | { | 212 | { |
273 | 213 | auto bb = factory->generate_buffer(buffer); | 213 | map->insert(buffer.buffer_id(), factory->generate_buffer(buffer)); |
274 | 214 | auto braw = bb.get(); | 214 | buf = map->buffer(buffer.buffer_id()); |
275 | 215 | map->insert(buffer.buffer_id(), std::move(bb)); | 215 | buf->received(); |
272 | 216 | braw->received(); | ||
276 | 217 | } | 216 | } |
277 | 218 | } | 217 | } |
278 | 219 | 218 | ||
279 | 220 | 219 | ||
280 | === modified file 'tests/unit-tests/client/test_connection_resource_map.cpp' | |||
281 | --- tests/unit-tests/client/test_connection_resource_map.cpp 2017-05-08 03:04:26 +0000 | |||
282 | +++ tests/unit-tests/client/test_connection_resource_map.cpp 2017-07-19 05:37:29 +0000 | |||
283 | @@ -97,17 +97,13 @@ | |||
284 | 97 | { | 97 | { |
285 | 98 | using namespace testing; | 98 | using namespace testing; |
286 | 99 | mcl::ConnectionSurfaceMap map; | 99 | mcl::ConnectionSurfaceMap map; |
290 | 100 | EXPECT_THROW({ | 100 | EXPECT_THAT(map.buffer(buffer_id), IsNull()); |
288 | 101 | map.buffer(buffer_id); | ||
289 | 102 | }, std::runtime_error); | ||
291 | 103 | 101 | ||
292 | 104 | map.insert(buffer_id, buffer); | 102 | map.insert(buffer_id, buffer); |
293 | 105 | EXPECT_THAT(map.buffer(buffer_id), Eq(buffer)); | 103 | EXPECT_THAT(map.buffer(buffer_id), Eq(buffer)); |
294 | 106 | map.erase(buffer_id); | 104 | map.erase(buffer_id); |
295 | 107 | 105 | ||
299 | 108 | EXPECT_THROW({ | 106 | EXPECT_THAT(map.buffer(buffer_id), IsNull()); |
297 | 109 | map.buffer(buffer_id); | ||
298 | 110 | }, std::runtime_error); | ||
300 | 111 | } | 107 | } |
301 | 112 | 108 | ||
302 | 113 | TEST_F(ConnectionResourceMap, can_access_buffers_from_surface) | 109 | TEST_F(ConnectionResourceMap, can_access_buffers_from_surface) |
303 | 114 | 110 | ||
304 | === modified file 'tests/unit-tests/client/test_protobuf_rpc_channel.cpp' | |||
305 | --- tests/unit-tests/client/test_protobuf_rpc_channel.cpp 2017-05-08 03:04:26 +0000 | |||
306 | +++ tests/unit-tests/client/test_protobuf_rpc_channel.cpp 2017-07-19 05:37:29 +0000 | |||
307 | @@ -840,3 +840,27 @@ | |||
308 | 840 | std::make_shared<mtd::NullClientEventSink>()}; | 840 | std::make_shared<mtd::NullClientEventSink>()}; |
309 | 841 | channel.on_data_available(); | 841 | channel.on_data_available(); |
310 | 842 | } | 842 | } |
311 | 843 | |||
312 | 844 | TEST_F(MirProtobufRpcChannelTest, ignores_update_message_for_unknown_buffer) | ||
313 | 845 | { | ||
314 | 846 | mir::protobuf::EventSequence seq; | ||
315 | 847 | auto request = seq.mutable_buffer_request(); | ||
316 | 848 | request->mutable_buffer()->set_buffer_id(42); | ||
317 | 849 | request->set_operation(mir::protobuf::BufferOperation::update); | ||
318 | 850 | |||
319 | 851 | set_async_buffer_message(seq, *transport); | ||
320 | 852 | |||
321 | 853 | channel->on_data_available(); | ||
322 | 854 | } | ||
323 | 855 | |||
324 | 856 | TEST_F(MirProtobufRpcChannelTest, ignores_delete_message_for_unknown_buffer) | ||
325 | 857 | { | ||
326 | 858 | mir::protobuf::EventSequence seq; | ||
327 | 859 | auto request = seq.mutable_buffer_request(); | ||
328 | 860 | request->mutable_buffer()->set_buffer_id(42); | ||
329 | 861 | request->set_operation(mir::protobuf::BufferOperation::remove); | ||
330 | 862 | |||
331 | 863 | set_async_buffer_message(seq, *transport); | ||
332 | 864 | |||
333 | 865 | channel->on_data_available(); | ||
334 | 866 | } | ||
335 | 843 | 867 | ||
336 | === modified file 'tests/unit-tests/compositor/test_client_buffers.cpp' | |||
337 | --- tests/unit-tests/compositor/test_client_buffers.cpp 2017-05-08 03:04:26 +0000 | |||
338 | +++ tests/unit-tests/compositor/test_client_buffers.cpp 2017-07-19 05:37:29 +0000 | |||
339 | @@ -79,7 +79,6 @@ | |||
340 | 79 | auto id = map.add_buffer(mt::fake_shared(stub_buffer)); | 79 | auto id = map.add_buffer(mt::fake_shared(stub_buffer)); |
341 | 80 | auto buffer = map.get(id); | 80 | auto buffer = map.get(id); |
342 | 81 | 81 | ||
343 | 82 | EXPECT_CALL(*mock_sink, remove_buffer(Ref(*buffer))); | ||
344 | 83 | map.remove_buffer(id); | 82 | map.remove_buffer(id); |
345 | 84 | map.send_buffer(id); | 83 | map.send_buffer(id); |
346 | 85 | } | 84 | } |
FAILED: Continuous integration, rev:4206 /mir-jenkins. ubuntu. com/job/ mir-ci/ 3486/ /mir-jenkins. ubuntu. com/job/ build-mir/ 4761/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/4927 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= artful/ 4916 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 4916 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/4916 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= artful/ 4798/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/4798/ console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= artful/ 4798/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 4798/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/4798/ console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= artful/ 4798 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= artful/ 4798/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= zesty/4798 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= zesty/4798/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 4798/console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 3486/rebuild
https:/