Merge lp:~kdub/mir/android-plumb-nbs-api-fences into lp:mir
- android-plumb-nbs-api-fences
- Merge into development-branch
Status: | Merged |
---|---|
Merged at revision: | 3618 |
Proposed branch: | lp:~kdub/mir/android-plumb-nbs-api-fences |
Merge into: | lp:mir |
Diff against target: |
725 lines (+242/-58) 31 files modified
src/client/buffer.cpp (+2/-2) src/client/buffer.h (+2/-2) src/client/error_buffer.cpp (+2/-2) src/client/error_buffer.h (+2/-2) src/client/mir_buffer.h (+2/-2) src/client/mir_buffer_api.cpp (+4/-3) src/include/client/mir/client_buffer.h (+2/-2) src/include/client/mir_toolkit/mir_buffer.h (+2/-2) src/platforms/android/client/buffer.cpp (+33/-12) src/platforms/android/client/buffer.h (+6/-2) src/platforms/android/common/android_native_buffer.cpp (+13/-0) src/platforms/android/common/syncfence.cpp (+17/-0) src/platforms/android/include/android_native_buffer.h (+2/-0) src/platforms/android/include/fence.h (+3/-0) src/platforms/android/include/native_buffer.h (+2/-0) src/platforms/android/include/sync_fence.h (+5/-3) src/platforms/eglstream-kms/client/client_buffer.cpp (+2/-2) src/platforms/eglstream-kms/client/client_buffer.h (+2/-2) src/platforms/mesa/client/client_buffer.cpp (+2/-2) src/platforms/mesa/client/client_buffer.h (+2/-2) tests/include/mir/test/doubles/mock_android_native_buffer.h (+2/-0) tests/include/mir/test/doubles/mock_client_buffer.h (+2/-2) tests/include/mir/test/doubles/mock_fence.h (+2/-0) tests/include/mir/test/doubles/mock_mir_buffer.h (+2/-2) tests/include/mir/test/doubles/null_client_buffer.h (+2/-2) tests/include/mir/test/doubles/stub_android_native_buffer.h (+2/-0) tests/include/mir/test/doubles/stub_client_buffer.h (+2/-2) tests/unit-tests/client/android/test_buffer.cpp (+77/-6) tests/unit-tests/client/test_aging_buffer.cpp (+2/-2) tests/unit-tests/graphics/android/test_native_buffer.cpp (+19/-0) tests/unit-tests/graphics/android/test_sync_fence.cpp (+23/-0) |
To merge this branch: | bzr merge lp:~kdub/mir/android-plumb-nbs-api-fences |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Daniel van Vugt | Abstain | ||
Cemil Azizoglu (community) | Approve | ||
Alan Griffiths | Approve | ||
Review via email: mp+299815@code.launchpad.net |
Commit message
android: Plumb the fencing support that the NBS API needs. Specifically, add timeout-based fence waits.
Also change the public MirNativeFence* (which was a void**) to just a MirNativeFence (void*) to be easier to use/less misleading.
Description of the change
Last bit of wrapup for https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3587
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:/
Click here to trigger a rebuild:
https:/
Alan Griffiths (alan-griffiths) wrote : | # |
Nit:
#define MIR_GRAPHICS_
+#include <chrono>
namespace mir
missing whitespace before namespace
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
Looks good
Daniel van Vugt (vanvugt) wrote : | # |
Landed and then reverted so you'll need to resubmit under a new branch name, sorry.
It fails to build on a clean yakkety desktop; lots of errors around set_fence (!?)
Daniel van Vugt (vanvugt) wrote : | # |
Still failing to build on updated yakkety today.
Also doesn't merge correctly with lp:mir any more due to the revert. Needs a new branch name :P
Kevin DuBois (kdub) wrote : | # |
CI does run against mesa+yakkety, is there a problem there to be investigated?
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3589
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Kevin DuBois (kdub) wrote : | # |
yakkety was ok:
https:/
other failures were NestedServer* test suite failures, will retrigger.
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3589
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:/
Click here to trigger a rebuild:
https:/
Daniel van Vugt (vanvugt) wrote : | # |
Yes, build it on a yakkety desktop. Obviously CI missed whatever the problem is.
Daniel van Vugt (vanvugt) wrote : | # |
Thanks for fixing the revert/merge/diff. But I just tried this branch again on yakkety and still several errors (only some listed below):
In file included from /home/dan/
/home/dan/
MirNativeF
In file included from /home/dan/
/home/dan/
virtual MirNativeFence get_fence() const = 0;
...
/usr/include/
{ ::new((void *)__p) _Up(std:
^
In file included from /home/dan/
/home/dan/
class ClientBuffer : public AgingBuffer
^
In file included from /home/dan/
/home/dan/
virtual void set_fence(
^
Daniel van Vugt (vanvugt) wrote : | # |
It would appear you and CI are both failing to build/test the eglstream-kms platform. That would be because CI follows the debian packaging rules instead of our CMake defaults.
Daniel van Vugt (vanvugt) wrote : | # |
Try building the branch with just 'cmake .. ; make' to get all the platforms and you should hit the build failure.
Daniel van Vugt (vanvugt) wrote : | # |
And no we can't just add 'eglstream-kms' into debian/rules to make sure it's built right now. Because we also have debhelper checking the build and it will notice you've built a binary but failed to put it in any deb (which is correct - it's not finished and we don't want to ship it yet).
Kevin DuBois (kdub) wrote : | # |
Filed a bug for the CI hole, working on fixing.
https:/
Kevin DuBois (kdub) wrote : | # |
> Filed a bug for the CI hole, working on fixing.
> https:/
To be more specific... I'm working on fixing this branch, not working on fixing the CI at the moment.
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3590
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:/
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:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Kevin DuBois (kdub) wrote : | # |
Failure was the NestedServerp* (we really should fix that suite), retriggering.
Mir CI Bot (mir-ci-bot) : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
SUCCESS: https:/
FAILURE: https:/
None: 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:/
Preview Diff
1 | === modified file 'src/client/buffer.cpp' |
2 | --- src/client/buffer.cpp 2016-07-22 06:29:03 +0000 |
3 | +++ src/client/buffer.cpp 2016-07-28 13:22:55 +0000 |
4 | @@ -95,12 +95,12 @@ |
5 | return buffer->as_mir_native_buffer(); |
6 | } |
7 | |
8 | -void mcl::Buffer::set_fence(MirNativeFence* native_fence, MirBufferAccess access) |
9 | +void mcl::Buffer::set_fence(MirNativeFence native_fence, MirBufferAccess access) |
10 | { |
11 | buffer->set_fence(native_fence, access); |
12 | } |
13 | |
14 | -MirNativeFence* mcl::Buffer::get_fence() const |
15 | +MirNativeFence mcl::Buffer::get_fence() const |
16 | { |
17 | return buffer->get_fence(); |
18 | } |
19 | |
20 | === modified file 'src/client/buffer.h' |
21 | --- src/client/buffer.h 2016-07-22 06:29:03 +0000 |
22 | +++ src/client/buffer.h 2016-07-28 13:22:55 +0000 |
23 | @@ -53,8 +53,8 @@ |
24 | std::shared_ptr<ClientBuffer> client_buffer() const override; |
25 | MirGraphicsRegion map_region() override; |
26 | |
27 | - void set_fence(MirNativeFence*, MirBufferAccess) override; |
28 | - MirNativeFence* get_fence() const override; |
29 | + void set_fence(MirNativeFence, MirBufferAccess) override; |
30 | + MirNativeFence get_fence() const override; |
31 | bool wait_fence(MirBufferAccess, std::chrono::nanoseconds) override; |
32 | |
33 | MirBufferUsage buffer_usage() const override; |
34 | |
35 | === modified file 'src/client/error_buffer.cpp' |
36 | --- src/client/error_buffer.cpp 2016-07-22 06:29:03 +0000 |
37 | +++ src/client/error_buffer.cpp 2016-07-28 13:22:55 +0000 |
38 | @@ -68,8 +68,8 @@ |
39 | MirNativeBuffer* mcl::ErrorBuffer::as_mir_native_buffer() const THROW_EXCEPTION |
40 | std::shared_ptr<mcl::ClientBuffer> mcl::ErrorBuffer::client_buffer() const THROW_EXCEPTION |
41 | MirGraphicsRegion mcl::ErrorBuffer::map_region() THROW_EXCEPTION |
42 | -void mcl::ErrorBuffer::set_fence(MirNativeFence*, MirBufferAccess) THROW_EXCEPTION |
43 | -MirNativeFence* mcl::ErrorBuffer::get_fence() const THROW_EXCEPTION |
44 | +void mcl::ErrorBuffer::set_fence(MirNativeFence, MirBufferAccess) THROW_EXCEPTION |
45 | +MirNativeFence mcl::ErrorBuffer::get_fence() const THROW_EXCEPTION |
46 | bool mcl::ErrorBuffer::wait_fence(MirBufferAccess, std::chrono::nanoseconds) THROW_EXCEPTION |
47 | MirBufferUsage mcl::ErrorBuffer::buffer_usage() const THROW_EXCEPTION |
48 | MirPixelFormat mcl::ErrorBuffer::pixel_format() const THROW_EXCEPTION |
49 | |
50 | === modified file 'src/client/error_buffer.h' |
51 | --- src/client/error_buffer.h 2016-07-22 06:29:03 +0000 |
52 | +++ src/client/error_buffer.h 2016-07-28 13:22:55 +0000 |
53 | @@ -39,8 +39,8 @@ |
54 | MirNativeBuffer* as_mir_native_buffer() const override; |
55 | std::shared_ptr<ClientBuffer> client_buffer() const override; |
56 | MirGraphicsRegion map_region() override; |
57 | - void set_fence(MirNativeFence*, MirBufferAccess) override; |
58 | - MirNativeFence* get_fence() const override; |
59 | + void set_fence(MirNativeFence, MirBufferAccess) override; |
60 | + MirNativeFence get_fence() const override; |
61 | bool wait_fence(MirBufferAccess, std::chrono::nanoseconds) override; |
62 | MirBufferUsage buffer_usage() const override; |
63 | MirPixelFormat pixel_format() const override; |
64 | |
65 | === modified file 'src/client/mir_buffer.h' |
66 | --- src/client/mir_buffer.h 2016-07-22 06:29:03 +0000 |
67 | +++ src/client/mir_buffer.h 2016-07-28 13:22:55 +0000 |
68 | @@ -43,8 +43,8 @@ |
69 | virtual std::shared_ptr<ClientBuffer> client_buffer() const = 0; |
70 | virtual MirGraphicsRegion map_region() = 0; |
71 | |
72 | - virtual void set_fence(MirNativeFence*, MirBufferAccess) = 0; |
73 | - virtual MirNativeFence* get_fence() const = 0; |
74 | + virtual void set_fence(MirNativeFence, MirBufferAccess) = 0; |
75 | + virtual MirNativeFence get_fence() const = 0; |
76 | virtual bool wait_fence(MirBufferAccess, std::chrono::nanoseconds) = 0; |
77 | |
78 | virtual MirBufferUsage buffer_usage() const = 0; |
79 | |
80 | === modified file 'src/client/mir_buffer_api.cpp' |
81 | --- src/client/mir_buffer_api.cpp 2016-07-22 06:29:03 +0000 |
82 | +++ src/client/mir_buffer_api.cpp 2016-07-28 13:22:55 +0000 |
83 | @@ -59,7 +59,7 @@ |
84 | MIR_LOG_UNCAUGHT_EXCEPTION(ex); |
85 | } |
86 | |
87 | -MirNativeFence* mir_buffer_get_fence(MirBuffer* b) |
88 | +MirNativeFence mir_buffer_get_fence(MirBuffer* b) |
89 | try |
90 | { |
91 | mir::require(b); |
92 | @@ -72,7 +72,7 @@ |
93 | return nullptr; |
94 | } |
95 | |
96 | -void mir_buffer_associate_fence(MirBuffer* b, MirNativeFence* fence, MirBufferAccess access) |
97 | +void mir_buffer_associate_fence(MirBuffer* b, MirNativeFence fence, MirBufferAccess access) |
98 | try |
99 | { |
100 | mir::require(b); |
101 | @@ -89,7 +89,8 @@ |
102 | { |
103 | mir::require(b); |
104 | auto buffer = reinterpret_cast<mcl::MirBuffer*>(b); |
105 | - return buffer->wait_fence(access, std::chrono::nanoseconds(timeout)); |
106 | + |
107 | + return buffer->wait_fence(access, std::chrono::nanoseconds(timeout)) ? 0 : -1; |
108 | } |
109 | catch (std::exception const& ex) |
110 | { |
111 | |
112 | === modified file 'src/include/client/mir/client_buffer.h' |
113 | --- src/include/client/mir/client_buffer.h 2016-07-22 06:29:03 +0000 |
114 | +++ src/include/client/mir/client_buffer.h 2016-07-28 13:22:55 +0000 |
115 | @@ -69,8 +69,8 @@ |
116 | virtual void fill_update_msg(MirBufferPackage& message) = 0; |
117 | |
118 | virtual MirNativeBuffer* as_mir_native_buffer() const = 0; |
119 | - virtual void set_fence(MirNativeFence*, MirBufferAccess) = 0; |
120 | - virtual MirNativeFence* get_fence() const = 0; |
121 | + virtual void set_fence(MirNativeFence, MirBufferAccess) = 0; |
122 | + virtual MirNativeFence get_fence() const = 0; |
123 | virtual bool wait_fence(MirBufferAccess, std::chrono::nanoseconds timeout) = 0; |
124 | protected: |
125 | ClientBuffer() = default; |
126 | |
127 | === modified file 'src/include/client/mir_toolkit/mir_buffer.h' |
128 | --- src/include/client/mir_toolkit/mir_buffer.h 2016-07-22 06:29:03 +0000 |
129 | +++ src/include/client/mir_toolkit/mir_buffer.h 2016-07-28 13:22:55 +0000 |
130 | @@ -123,7 +123,7 @@ |
131 | * \return The fence associated with buffer |
132 | * |
133 | **/ |
134 | -MirNativeFence* mir_buffer_get_fence(MirBuffer*); |
135 | +MirNativeFence mir_buffer_get_fence(MirBuffer*); |
136 | |
137 | /** |
138 | * Protect the buffer's contents by associating a native fence with it. |
139 | @@ -138,7 +138,7 @@ |
140 | **/ |
141 | void mir_buffer_associate_fence( |
142 | MirBuffer* buffer, |
143 | - MirNativeFence* native_fence, |
144 | + MirNativeFence native_fence, |
145 | MirBufferAccess access); |
146 | |
147 | /** Wait for the fence associated with the buffer to signal. After returning, |
148 | |
149 | === modified file 'src/platforms/android/client/buffer.cpp' |
150 | --- src/platforms/android/client/buffer.cpp 2016-07-22 06:29:03 +0000 |
151 | +++ src/platforms/android/client/buffer.cpp 2016-07-28 13:22:55 +0000 |
152 | @@ -22,6 +22,7 @@ |
153 | #include "buffer_registrar.h" |
154 | #include "buffer.h" |
155 | #include <hardware/gralloc.h> |
156 | +#include <boost/throw_exception.hpp> |
157 | |
158 | namespace mcl=mir::client; |
159 | namespace mcla=mir::client::android; |
160 | @@ -106,16 +107,36 @@ |
161 | return native_buffer->anwb(); |
162 | } |
163 | |
164 | -void mcla::Buffer::set_fence(MirNativeFence*, MirBufferAccess) |
165 | -{ |
166 | -} |
167 | - |
168 | -MirNativeFence* mcla::Buffer::get_fence() const |
169 | -{ |
170 | - return nullptr; |
171 | -} |
172 | - |
173 | -bool mcla::Buffer::wait_fence(MirBufferAccess, std::chrono::nanoseconds) |
174 | -{ |
175 | - return true; |
176 | +void mcla::Buffer::set_fence(MirNativeFence fence, MirBufferAccess access) |
177 | +{ |
178 | + if (!fence) |
179 | + native_buffer->reset_fence(); |
180 | + else if (access == mir_read) |
181 | + native_buffer->update_usage(*static_cast<mga::NativeFence*>(fence), mga::BufferAccess::read); |
182 | + else if (access == mir_read_write) |
183 | + native_buffer->update_usage(*static_cast<mga::NativeFence*>(fence), mga::BufferAccess::write); |
184 | + else |
185 | + BOOST_THROW_EXCEPTION(std::invalid_argument("invalid MirBufferAccess")); |
186 | +} |
187 | + |
188 | +MirNativeFence mcla::Buffer::get_fence() const |
189 | +{ |
190 | + api_user_fence = mir::Fd(native_buffer->copy_fence()); |
191 | + fd = api_user_fence; |
192 | + return &fd; |
193 | +} |
194 | + |
195 | +bool mcla::Buffer::wait_fence(MirBufferAccess access, std::chrono::nanoseconds ns) |
196 | +{ |
197 | + // could use std::chrono::floor once we're using C++17 |
198 | + auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(ns); |
199 | + if (ms > ns) |
200 | + ms = ms - std::chrono::milliseconds{1}; |
201 | + |
202 | + if (access == mir_read) |
203 | + return native_buffer->ensure_available_for(mga::BufferAccess::read, ms); |
204 | + if (access == mir_read_write) |
205 | + return native_buffer->ensure_available_for(mga::BufferAccess::write, ms); |
206 | + |
207 | + BOOST_THROW_EXCEPTION(std::invalid_argument("invalid MirBufferAccess")); |
208 | } |
209 | |
210 | === modified file 'src/platforms/android/client/buffer.h' |
211 | --- src/platforms/android/client/buffer.h 2016-07-22 06:29:03 +0000 |
212 | +++ src/platforms/android/client/buffer.h 2016-07-28 13:22:55 +0000 |
213 | @@ -22,6 +22,7 @@ |
214 | |
215 | #include "android_native_buffer.h" |
216 | #include "mir/aging_buffer.h" |
217 | +#include "mir/fd.h" |
218 | |
219 | #include <system/window.h> |
220 | #include <memory> |
221 | @@ -50,8 +51,8 @@ |
222 | void update_from(MirBufferPackage const& update_package) override; |
223 | void fill_update_msg(MirBufferPackage& message) override; |
224 | MirNativeBuffer* as_mir_native_buffer() const override; |
225 | - void set_fence(MirNativeFence*, MirBufferAccess) override; |
226 | - MirNativeFence* get_fence() const override; |
227 | + void set_fence(MirNativeFence, MirBufferAccess) override; |
228 | + MirNativeFence get_fence() const override; |
229 | bool wait_fence(MirBufferAccess, std::chrono::nanoseconds timeout) override; |
230 | |
231 | Buffer(const Buffer&) = delete; |
232 | @@ -59,6 +60,9 @@ |
233 | private: |
234 | void pack_native_window_buffer(); |
235 | |
236 | + mir::Fd mutable api_user_fence; |
237 | + int mutable fd; |
238 | + |
239 | std::shared_ptr<BufferRegistrar> const buffer_registrar; |
240 | std::shared_ptr<graphics::NativeBuffer> const native_buffer; |
241 | MirPixelFormat const buffer_pf; |
242 | |
243 | === modified file 'src/platforms/android/common/android_native_buffer.cpp' |
244 | --- src/platforms/android/common/android_native_buffer.cpp 2016-07-22 06:29:03 +0000 |
245 | +++ src/platforms/android/common/android_native_buffer.cpp 2016-07-28 13:22:55 +0000 |
246 | @@ -41,12 +41,25 @@ |
247 | fence->wait(); |
248 | } |
249 | |
250 | +bool mga::AndroidNativeBuffer::ensure_available_for(BufferAccess intent, std::chrono::milliseconds ms) |
251 | +{ |
252 | + if ((access == mga::BufferAccess::read) && (intent == mga::BufferAccess::read)) |
253 | + return true; |
254 | + |
255 | + return fence->wait_for(ms); |
256 | +} |
257 | + |
258 | void mga::AndroidNativeBuffer::update_usage(NativeFence& merge_fd, BufferAccess updated_access) |
259 | { |
260 | fence->merge_with(merge_fd); |
261 | access = updated_access; |
262 | } |
263 | |
264 | +void mga::AndroidNativeBuffer::reset_fence() |
265 | +{ |
266 | + fence->reset_fence(); |
267 | +} |
268 | + |
269 | ANativeWindowBuffer* mga::AndroidNativeBuffer::anwb() const |
270 | { |
271 | return native_window_buffer.get(); |
272 | |
273 | === modified file 'src/platforms/android/common/syncfence.cpp' |
274 | --- src/platforms/android/common/syncfence.cpp 2016-07-22 06:29:03 +0000 |
275 | +++ src/platforms/android/common/syncfence.cpp 2016-07-28 13:22:55 +0000 |
276 | @@ -40,6 +40,23 @@ |
277 | } |
278 | } |
279 | |
280 | +bool mga::SyncFence::wait_for(std::chrono::milliseconds ms) |
281 | +{ |
282 | + int timed_out = 0; |
283 | + if (fence_fd > 0) |
284 | + { |
285 | + int timeout = ms.count(); |
286 | + timed_out = ops->ioctl(fence_fd, SYNC_IOC_WAIT, &timeout); |
287 | + fence_fd = mir::Fd(Fd::invalid); |
288 | + } |
289 | + return timed_out >= 0; |
290 | +} |
291 | + |
292 | +void mga::SyncFence::reset_fence() |
293 | +{ |
294 | + fence_fd = mir::Fd(mir::Fd::invalid); |
295 | +} |
296 | + |
297 | void mga::SyncFence::merge_with(NativeFence& merge_fd) |
298 | { |
299 | if (merge_fd < 0) |
300 | |
301 | === modified file 'src/platforms/android/include/android_native_buffer.h' |
302 | --- src/platforms/android/include/android_native_buffer.h 2016-07-22 06:29:03 +0000 |
303 | +++ src/platforms/android/include/android_native_buffer.h 2016-07-28 13:22:55 +0000 |
304 | @@ -45,7 +45,9 @@ |
305 | NativeFence copy_fence() const; |
306 | |
307 | void ensure_available_for(BufferAccess); |
308 | + bool ensure_available_for(android::BufferAccess intent, std::chrono::milliseconds timeout); |
309 | void update_usage(NativeFence& merge_fd, BufferAccess); |
310 | + void reset_fence(); |
311 | |
312 | void lock_for_gpu(); |
313 | void wait_for_unlock_by_gpu(); |
314 | |
315 | === modified file 'src/platforms/android/include/fence.h' |
316 | --- src/platforms/android/include/fence.h 2016-07-22 06:29:03 +0000 |
317 | +++ src/platforms/android/include/fence.h 2016-07-28 13:22:55 +0000 |
318 | @@ -19,6 +19,7 @@ |
319 | #ifndef MIR_GRAPHICS_ANDROID_FENCE_H_ |
320 | #define MIR_GRAPHICS_ANDROID_FENCE_H_ |
321 | |
322 | +#include <chrono> |
323 | namespace mir |
324 | { |
325 | namespace graphics |
326 | @@ -35,6 +36,8 @@ |
327 | virtual ~Fence() = default; |
328 | |
329 | virtual void wait() = 0; |
330 | + virtual bool wait_for(std::chrono::milliseconds) = 0; |
331 | + virtual void reset_fence() = 0; |
332 | //TODO: (kdub) use the Fd type instead of NativeFence |
333 | virtual void merge_with(NativeFence& merge_fd) = 0; |
334 | virtual NativeFence copy_native_handle() const = 0; |
335 | |
336 | === modified file 'src/platforms/android/include/native_buffer.h' |
337 | --- src/platforms/android/include/native_buffer.h 2016-07-22 06:29:03 +0000 |
338 | +++ src/platforms/android/include/native_buffer.h 2016-07-28 13:22:55 +0000 |
339 | @@ -51,7 +51,9 @@ |
340 | virtual android::NativeFence copy_fence() const = 0; |
341 | |
342 | virtual void ensure_available_for(android::BufferAccess intent) = 0; |
343 | + virtual bool ensure_available_for(android::BufferAccess intent, std::chrono::milliseconds timeout) = 0; |
344 | virtual void update_usage(android::NativeFence& fence, android::BufferAccess current_usage) = 0; |
345 | + virtual void reset_fence() = 0; |
346 | |
347 | virtual void lock_for_gpu() = 0; |
348 | virtual void wait_for_unlock_by_gpu() = 0; |
349 | |
350 | === modified file 'src/platforms/android/include/sync_fence.h' |
351 | --- src/platforms/android/include/sync_fence.h 2016-07-22 06:29:03 +0000 |
352 | +++ src/platforms/android/include/sync_fence.h 2016-07-28 13:22:55 +0000 |
353 | @@ -51,9 +51,11 @@ |
354 | public: |
355 | explicit SyncFence(std::shared_ptr<SyncFileOps> const&, Fd fd); |
356 | |
357 | - void wait(); |
358 | - void merge_with(NativeFence& merge_fd); |
359 | - NativeFence copy_native_handle() const; |
360 | + void wait() override; |
361 | + bool wait_for(std::chrono::milliseconds) override; |
362 | + void reset_fence() override; |
363 | + void merge_with(NativeFence& merge_fd) override; |
364 | + NativeFence copy_native_handle() const override; |
365 | |
366 | private: |
367 | SyncFence(SyncFence const&) = delete; |
368 | |
369 | === modified file 'src/platforms/eglstream-kms/client/client_buffer.cpp' |
370 | --- src/platforms/eglstream-kms/client/client_buffer.cpp 2016-05-31 01:21:42 +0000 |
371 | +++ src/platforms/eglstream-kms/client/client_buffer.cpp 2016-07-28 13:22:55 +0000 |
372 | @@ -144,11 +144,11 @@ |
373 | return native_buffer_handle().get(); |
374 | } |
375 | |
376 | -void mcle::ClientBuffer::set_fence(MirNativeFence*, MirBufferAccess) |
377 | +void mcle::ClientBuffer::set_fence(MirNativeFence, MirBufferAccess) |
378 | { |
379 | } |
380 | |
381 | -MirNativeFence* mcle::ClientBuffer::get_fence() const |
382 | +MirNativeFence mcle::ClientBuffer::get_fence() const |
383 | { |
384 | return nullptr; |
385 | } |
386 | |
387 | === modified file 'src/platforms/eglstream-kms/client/client_buffer.h' |
388 | --- src/platforms/eglstream-kms/client/client_buffer.h 2016-05-31 01:21:42 +0000 |
389 | +++ src/platforms/eglstream-kms/client/client_buffer.h 2016-07-28 13:22:55 +0000 |
390 | @@ -51,8 +51,8 @@ |
391 | void update_from(MirBufferPackage const&); |
392 | void fill_update_msg(MirBufferPackage&); |
393 | MirNativeBuffer* as_mir_native_buffer() const; |
394 | - void set_fence(MirNativeFence*, MirBufferAccess); |
395 | - MirNativeFence* get_fence() const; |
396 | + void set_fence(MirNativeFence, MirBufferAccess); |
397 | + MirNativeFence get_fence() const; |
398 | bool wait_fence(MirBufferAccess, std::chrono::nanoseconds timeout); |
399 | |
400 | private: |
401 | |
402 | === modified file 'src/platforms/mesa/client/client_buffer.cpp' |
403 | --- src/platforms/mesa/client/client_buffer.cpp 2016-07-22 06:29:03 +0000 |
404 | +++ src/platforms/mesa/client/client_buffer.cpp 2016-07-28 13:22:55 +0000 |
405 | @@ -148,11 +148,11 @@ |
406 | return native_buffer_handle().get(); |
407 | } |
408 | |
409 | -void mclm::ClientBuffer::set_fence(MirNativeFence*, MirBufferAccess) |
410 | +void mclm::ClientBuffer::set_fence(MirNativeFence, MirBufferAccess) |
411 | { |
412 | } |
413 | |
414 | -MirNativeFence* mclm::ClientBuffer::get_fence() const |
415 | +MirNativeFence mclm::ClientBuffer::get_fence() const |
416 | { |
417 | return nullptr; |
418 | } |
419 | |
420 | === modified file 'src/platforms/mesa/client/client_buffer.h' |
421 | --- src/platforms/mesa/client/client_buffer.h 2016-07-22 06:29:03 +0000 |
422 | +++ src/platforms/mesa/client/client_buffer.h 2016-07-28 13:22:55 +0000 |
423 | @@ -53,8 +53,8 @@ |
424 | void update_from(MirBufferPackage const&); |
425 | void fill_update_msg(MirBufferPackage&); |
426 | MirNativeBuffer* as_mir_native_buffer() const; |
427 | - void set_fence(MirNativeFence*, MirBufferAccess); |
428 | - MirNativeFence* get_fence() const; |
429 | + void set_fence(MirNativeFence, MirBufferAccess); |
430 | + MirNativeFence get_fence() const; |
431 | bool wait_fence(MirBufferAccess, std::chrono::nanoseconds timeout); |
432 | |
433 | private: |
434 | |
435 | === modified file 'tests/include/mir/test/doubles/mock_android_native_buffer.h' |
436 | --- tests/include/mir/test/doubles/mock_android_native_buffer.h 2016-07-22 06:29:03 +0000 |
437 | +++ tests/include/mir/test/doubles/mock_android_native_buffer.h 2016-07-28 13:22:55 +0000 |
438 | @@ -55,7 +55,9 @@ |
439 | MOCK_CONST_METHOD0(copy_fence, graphics::android::NativeFence()); |
440 | |
441 | MOCK_METHOD1(ensure_available_for, void(graphics::android::BufferAccess)); |
442 | + MOCK_METHOD2(ensure_available_for, bool(graphics::android::BufferAccess, std::chrono::milliseconds)); |
443 | MOCK_METHOD2(update_usage, void(graphics::android::NativeFence&, graphics::android::BufferAccess)); |
444 | + MOCK_METHOD0(reset_fence, void()); |
445 | |
446 | MOCK_METHOD0(lock_for_gpu, void()); |
447 | MOCK_METHOD0(wait_for_unlock_by_gpu, void()); |
448 | |
449 | === modified file 'tests/include/mir/test/doubles/mock_client_buffer.h' |
450 | --- tests/include/mir/test/doubles/mock_client_buffer.h 2016-07-22 06:29:03 +0000 |
451 | +++ tests/include/mir/test/doubles/mock_client_buffer.h 2016-07-28 13:22:55 +0000 |
452 | @@ -44,8 +44,8 @@ |
453 | MOCK_METHOD1(fill_update_msg, void(MirBufferPackage&)); |
454 | MOCK_CONST_METHOD0(native_buffer_handle, std::shared_ptr<graphics::NativeBuffer>()); |
455 | MOCK_CONST_METHOD0(as_mir_native_buffer, MirNativeBuffer*()); |
456 | - MOCK_METHOD2(set_fence, void(MirNativeFence*, MirBufferAccess)); |
457 | - MOCK_CONST_METHOD0(get_fence, MirNativeFence*()); |
458 | + MOCK_METHOD2(set_fence, void(MirNativeFence, MirBufferAccess)); |
459 | + MOCK_CONST_METHOD0(get_fence, MirNativeFence()); |
460 | MOCK_METHOD2(wait_fence, bool(MirBufferAccess, std::chrono::nanoseconds)); |
461 | int age_{0}; |
462 | }; |
463 | |
464 | === modified file 'tests/include/mir/test/doubles/mock_fence.h' |
465 | --- tests/include/mir/test/doubles/mock_fence.h 2016-07-22 06:29:03 +0000 |
466 | +++ tests/include/mir/test/doubles/mock_fence.h 2016-07-28 13:22:55 +0000 |
467 | @@ -33,6 +33,8 @@ |
468 | struct MockFence : public graphics::android::Fence |
469 | { |
470 | MOCK_METHOD0(wait, void()); |
471 | + MOCK_METHOD1(wait_for, bool(std::chrono::milliseconds)); |
472 | + MOCK_METHOD0(reset_fence, void()); |
473 | MOCK_METHOD1(merge_with, void(graphics::android::NativeFence&)); |
474 | MOCK_CONST_METHOD0(copy_native_handle, graphics::android::NativeFence()); |
475 | }; |
476 | |
477 | === modified file 'tests/include/mir/test/doubles/mock_mir_buffer.h' |
478 | --- tests/include/mir/test/doubles/mock_mir_buffer.h 2016-07-22 06:29:03 +0000 |
479 | +++ tests/include/mir/test/doubles/mock_mir_buffer.h 2016-07-28 13:22:55 +0000 |
480 | @@ -46,8 +46,8 @@ |
481 | MOCK_CONST_METHOD0(client_buffer, std::shared_ptr<client::ClientBuffer>()); |
482 | MOCK_METHOD0(map_region, MirGraphicsRegion()); |
483 | |
484 | - MOCK_METHOD2(set_fence, void(MirNativeFence*, MirBufferAccess)); |
485 | - MOCK_CONST_METHOD0(get_fence, MirNativeFence*()); |
486 | + MOCK_METHOD2(set_fence, void(MirNativeFence, MirBufferAccess)); |
487 | + MOCK_CONST_METHOD0(get_fence, MirNativeFence()); |
488 | MOCK_METHOD2(wait_fence, bool(MirBufferAccess, std::chrono::nanoseconds)); |
489 | |
490 | MOCK_CONST_METHOD0(buffer_usage, MirBufferUsage()); |
491 | |
492 | === modified file 'tests/include/mir/test/doubles/null_client_buffer.h' |
493 | --- tests/include/mir/test/doubles/null_client_buffer.h 2016-07-22 06:29:03 +0000 |
494 | +++ tests/include/mir/test/doubles/null_client_buffer.h 2016-07-28 13:22:55 +0000 |
495 | @@ -54,8 +54,8 @@ |
496 | geometry::Size sz; |
497 | |
498 | MirNativeBuffer* as_mir_native_buffer() const { return nullptr; } |
499 | - void set_fence(MirNativeFence*, MirBufferAccess) {} |
500 | - MirNativeFence* get_fence() const { return nullptr; } |
501 | + void set_fence(MirNativeFence, MirBufferAccess) {} |
502 | + MirNativeFence get_fence() const { return nullptr; } |
503 | bool wait_fence(MirBufferAccess, std::chrono::nanoseconds) { return true; } |
504 | }; |
505 | |
506 | |
507 | === modified file 'tests/include/mir/test/doubles/stub_android_native_buffer.h' |
508 | --- tests/include/mir/test/doubles/stub_android_native_buffer.h 2016-07-22 06:29:03 +0000 |
509 | +++ tests/include/mir/test/doubles/stub_android_native_buffer.h 2016-07-28 13:22:55 +0000 |
510 | @@ -45,7 +45,9 @@ |
511 | auto copy_fence() const -> graphics::android::NativeFence override { return -1; } |
512 | |
513 | void ensure_available_for(graphics::android::BufferAccess) {} |
514 | + bool ensure_available_for(graphics::android::BufferAccess, std::chrono::milliseconds) { return true; } |
515 | void update_usage(graphics::android::NativeFence&, graphics::android::BufferAccess) {} |
516 | + void reset_fence() {} |
517 | |
518 | void lock_for_gpu() {}; |
519 | void wait_for_unlock_by_gpu() {}; |
520 | |
521 | === modified file 'tests/include/mir/test/doubles/stub_client_buffer.h' |
522 | --- tests/include/mir/test/doubles/stub_client_buffer.h 2016-07-22 06:29:03 +0000 |
523 | +++ tests/include/mir/test/doubles/stub_client_buffer.h 2016-07-28 13:22:55 +0000 |
524 | @@ -75,8 +75,8 @@ |
525 | void fill_update_msg(MirBufferPackage&) override{} |
526 | |
527 | MirNativeBuffer* as_mir_native_buffer() const { return nullptr; } |
528 | - void set_fence(MirNativeFence*, MirBufferAccess) {} |
529 | - MirNativeFence* get_fence() const { return nullptr; } |
530 | + void set_fence(MirNativeFence, MirBufferAccess) {} |
531 | + MirNativeFence get_fence() const { return nullptr; } |
532 | bool wait_fence(MirBufferAccess, std::chrono::nanoseconds) { return true; } |
533 | |
534 | std::shared_ptr<MirBufferPackage> const package; |
535 | |
536 | === modified file 'tests/unit-tests/client/android/test_buffer.cpp' |
537 | --- tests/unit-tests/client/android/test_buffer.cpp 2016-07-22 06:29:03 +0000 |
538 | +++ tests/unit-tests/client/android/test_buffer.cpp 2016-07-28 13:22:55 +0000 |
539 | @@ -32,16 +32,17 @@ |
540 | namespace mg = mir::graphics; |
541 | namespace mga = mir::graphics::android; |
542 | namespace geom = mir::geometry; |
543 | +using namespace testing; |
544 | |
545 | -struct AndroidClientBuffer : public ::testing::Test |
546 | +struct AndroidClientBuffer : Test |
547 | { |
548 | AndroidClientBuffer() : |
549 | - mock_registrar{std::make_shared<testing::NiceMock<mtd::MockBufferRegistrar>>()}, |
550 | + mock_registrar{std::make_shared<NiceMock<mtd::MockBufferRegistrar>>()}, |
551 | native_handle{std::make_shared<native_handle_t>()}, |
552 | mock_native_buffer{std::make_shared<mtd::MockAndroidNativeBuffer>(size)} |
553 | { |
554 | - ON_CALL(*mock_registrar, register_buffer(testing::_, testing::_)) |
555 | - .WillByDefault(testing::Return(mock_native_buffer)); |
556 | + ON_CALL(*mock_registrar, register_buffer(_, _)) |
557 | + .WillByDefault(Return(mock_native_buffer)); |
558 | package.height = height.as_int(); |
559 | package.width = width.as_int(); |
560 | package.stride = stride.as_int(); |
561 | @@ -60,8 +61,8 @@ |
562 | |
563 | TEST_F(AndroidClientBuffer, registers_native_handle_with_correct_size) |
564 | { |
565 | - EXPECT_CALL(*mock_registrar, register_buffer(testing::_, testing::_)) |
566 | - .WillOnce(testing::Return(mock_native_buffer)); |
567 | + EXPECT_CALL(*mock_registrar, register_buffer(_, _)) |
568 | + .WillOnce(Return(mock_native_buffer)); |
569 | |
570 | mcla::Buffer buffer(mock_registrar, package, pf); |
571 | EXPECT_EQ(size, buffer.size()); |
572 | @@ -132,3 +133,73 @@ |
573 | EXPECT_THAT(msg.data[0], Eq(static_cast<int>(BufferFlag::unfenced))); |
574 | EXPECT_THAT(msg.fd_items, Eq(0)); |
575 | } |
576 | + |
577 | +TEST_F(AndroidClientBuffer, can_update_fences) |
578 | +{ |
579 | + int fake_fence = 8482; |
580 | + MirNativeFence fence = &fake_fence; |
581 | + Sequence seq; |
582 | + EXPECT_CALL(*mock_native_buffer, update_usage(fake_fence, mga::BufferAccess::write)) |
583 | + .InSequence(seq); |
584 | + EXPECT_CALL(*mock_native_buffer, update_usage(_, mga::BufferAccess::read)) |
585 | + .InSequence(seq); |
586 | + mcla::Buffer buffer(mock_registrar, package, pf); |
587 | + buffer.set_fence(fence, mir_read_write); |
588 | + buffer.set_fence(fence, mir_read); |
589 | +} |
590 | + |
591 | +TEST_F(AndroidClientBuffer, updating_fences_with_null_resets_fence) |
592 | +{ |
593 | + EXPECT_CALL(*mock_native_buffer, reset_fence()); |
594 | + mcla::Buffer buffer(mock_registrar, package, pf); |
595 | + buffer.set_fence(nullptr, mir_read_write); |
596 | +} |
597 | + |
598 | +TEST_F(AndroidClientBuffer, updating_fences_with_made_up_access_throws) |
599 | +{ |
600 | + int fence = 21; |
601 | + mcla::Buffer buffer(mock_registrar, package, pf); |
602 | + EXPECT_THROW({ |
603 | + buffer.set_fence(&fence, static_cast<MirBufferAccess>(111)); |
604 | + }, std::invalid_argument); |
605 | +} |
606 | + |
607 | +TEST_F(AndroidClientBuffer, can_retreive_fences) |
608 | +{ |
609 | + int fake_fence = 42; |
610 | + EXPECT_CALL(*mock_native_buffer, copy_fence()) |
611 | + .WillOnce(Return(fake_fence)); |
612 | + |
613 | + mcla::Buffer buffer(mock_registrar, package, pf); |
614 | + auto fence = buffer.get_fence(); |
615 | + ASSERT_THAT(fence, Ne(nullptr)); |
616 | + EXPECT_THAT(*static_cast<decltype(fake_fence)*>(fence), Eq(fake_fence)); |
617 | +} |
618 | + |
619 | +TEST_F(AndroidClientBuffer, can_wait_fence) |
620 | +{ |
621 | + using namespace std::literals::chrono_literals; |
622 | + Sequence seq; |
623 | + EXPECT_CALL(*mock_native_buffer, ensure_available_for(mga::BufferAccess::read, 0ms)) |
624 | + .InSequence(seq) |
625 | + .WillOnce(Return(false)); |
626 | + EXPECT_CALL(*mock_native_buffer, ensure_available_for(mga::BufferAccess::write, 10ms)) |
627 | + .InSequence(seq) |
628 | + .WillOnce(Return(true)); |
629 | + EXPECT_CALL(*mock_native_buffer, ensure_available_for(mga::BufferAccess::write, 10ms)) |
630 | + .InSequence(seq) |
631 | + .WillOnce(Return(true)); |
632 | + EXPECT_CALL(*mock_native_buffer, ensure_available_for(mga::BufferAccess::write, 10ms)) |
633 | + .InSequence(seq) |
634 | + .WillOnce(Return(true)); |
635 | + EXPECT_CALL(*mock_native_buffer, ensure_available_for(mga::BufferAccess::write, 11ms)) |
636 | + .InSequence(seq) |
637 | + .WillOnce(Return(true)); |
638 | + |
639 | + mcla::Buffer buffer(mock_registrar, package, pf); |
640 | + EXPECT_FALSE(buffer.wait_fence(mir_read, 150ns)); |
641 | + EXPECT_TRUE(buffer.wait_fence(mir_read_write, 10499999ns)); |
642 | + EXPECT_TRUE(buffer.wait_fence(mir_read_write, 10500001ns)); |
643 | + EXPECT_TRUE(buffer.wait_fence(mir_read_write, 10999999ns)); |
644 | + EXPECT_TRUE(buffer.wait_fence(mir_read_write, 11000001ns)); |
645 | +} |
646 | |
647 | === modified file 'tests/unit-tests/client/test_aging_buffer.cpp' |
648 | --- tests/unit-tests/client/test_aging_buffer.cpp 2016-07-22 06:29:03 +0000 |
649 | +++ tests/unit-tests/client/test_aging_buffer.cpp 2016-07-28 13:22:55 +0000 |
650 | @@ -69,12 +69,12 @@ |
651 | exit(1); |
652 | } |
653 | |
654 | - void set_fence(MirNativeFence*, MirBufferAccess) |
655 | + void set_fence(MirNativeFence, MirBufferAccess) |
656 | { |
657 | exit(1); |
658 | } |
659 | |
660 | - MirNativeFence* get_fence() const |
661 | + MirNativeFence get_fence() const |
662 | { |
663 | exit(1); |
664 | } |
665 | |
666 | === modified file 'tests/unit-tests/graphics/android/test_native_buffer.cpp' |
667 | --- tests/unit-tests/graphics/android/test_native_buffer.cpp 2016-07-22 06:29:03 +0000 |
668 | +++ tests/unit-tests/graphics/android/test_native_buffer.cpp 2016-07-28 13:22:55 +0000 |
669 | @@ -180,3 +180,22 @@ |
670 | .WillOnce(Return(false)); |
671 | buffer.wait_for_unlock_by_gpu(); |
672 | } |
673 | + |
674 | +TEST_F(NativeBuffer, resets_fence) |
675 | +{ |
676 | + EXPECT_CALL(*mock_fence, reset_fence()); |
677 | + mga::AndroidNativeBuffer buffer(a_native_window_buffer, mock_cmdstream_sync, mock_fence, mga::BufferAccess::read); |
678 | + buffer.reset_fence(); |
679 | +} |
680 | + |
681 | +TEST_F(NativeBuffer, waits_with_timeout) |
682 | +{ |
683 | + using namespace std::literals::chrono_literals; |
684 | + EXPECT_CALL(*mock_fence, wait_for(10ms)) |
685 | + .Times(2) |
686 | + .WillOnce(Return(true)) |
687 | + .WillOnce(Return(false)); |
688 | + mga::AndroidNativeBuffer buffer(a_native_window_buffer, mock_cmdstream_sync, mock_fence, mga::BufferAccess::read); |
689 | + EXPECT_TRUE(buffer.ensure_available_for(mga::BufferAccess::write, 10ms)); |
690 | + EXPECT_FALSE(buffer.ensure_available_for(mga::BufferAccess::write, 10ms)); |
691 | +} |
692 | |
693 | === modified file 'tests/unit-tests/graphics/android/test_sync_fence.cpp' |
694 | --- tests/unit-tests/graphics/android/test_sync_fence.cpp 2016-07-22 06:29:03 +0000 |
695 | +++ tests/unit-tests/graphics/android/test_sync_fence.cpp 2016-07-28 13:22:55 +0000 |
696 | @@ -83,6 +83,29 @@ |
697 | fence2.wait(); |
698 | } |
699 | |
700 | +//timeout is in msecs |
701 | +TEST_F(SyncSwTest, sync_wait_with_timeout_times_out) |
702 | +{ |
703 | + using namespace std::literals::chrono_literals; |
704 | + auto timeout = 150ms; |
705 | + EXPECT_CALL(*mock_fops, ioctl(dummy_fd_value, SYNC_IOC_WAIT, TimeoutMatches(timeout.count()))) |
706 | + .WillOnce(testing::Return(-1)); |
707 | + |
708 | + mga::SyncFence fence1(mock_fops, std::move(dummy_fd)); |
709 | + EXPECT_FALSE(fence1.wait_for(timeout)); |
710 | +} |
711 | + |
712 | +TEST_F(SyncSwTest, sync_wait_with_timeout_clears) |
713 | +{ |
714 | + using namespace std::literals::chrono_literals; |
715 | + auto timeout = 150ms; |
716 | + EXPECT_CALL(*mock_fops, ioctl(dummy_fd_value, SYNC_IOC_WAIT, TimeoutMatches(timeout.count()))) |
717 | + .WillOnce(testing::Return(0)); |
718 | + |
719 | + mga::SyncFence fence1(mock_fops, std::move(dummy_fd)); |
720 | + EXPECT_TRUE(fence1.wait_for(timeout)); |
721 | +} |
722 | + |
723 | namespace |
724 | { |
725 | struct IoctlSetter |
FAILED: Continuous integration, rev:3587 /mir-jenkins. ubuntu. com/job/ mir-ci/ 1269/ /mir-jenkins. ubuntu. com/job/ build-mir/ 1487/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/1539 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1530 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1530 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= yakkety/ 1530 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= vivid+overlay/ 1502/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 1502/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 1502/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 1502/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 1502 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 1502/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 1502/console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 1269/rebuild
https:/