Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Daniel van Vugt | ||||||||
Approved revision: | 1913 | ||||||||
Merged at revision: | 1213 | ||||||||
Proposed branch: | lp:mir/0.7 | ||||||||
Merge into: | lp:mir/ubuntu | ||||||||
Diff against target: |
512 lines (+201/-46) 14 files modified
CMakeLists.txt (+1/-1) cmake/EnableCoverageReport.cmake (+26/-26) debian/changelog (+14/-0) debian/control (+0/-2) include/test/mir_test/auto_unblock_thread.h (+2/-2) include/test/mir_test/cross_process_action.h (+2/-1) include/test/mir_test_framework/display_server_test_fixture.h (+1/-1) include/test/mir_test_framework/testing_process_manager.h (+1/-1) src/server/frontend/socket_messenger.cpp (+21/-5) tests/acceptance-tests/CMakeLists.txt (+1/-0) tests/acceptance-tests/test_unresponsive_client.cpp (+122/-0) tests/mir_test/cross_process_action.cpp (+2/-2) tests/mir_test_framework/display_server_test_fixture.cpp (+2/-2) tests/mir_test_framework/testing_process_manager.cpp (+6/-3) |
||||||||
To merge this branch: | bzr merge lp:mir/0.7 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Cemil Azizoglu (community) | Approve | ||
Review via email: mp+234796@code.launchpad.net |
Commit message
Mir 0.7.3 release
Description of the change
Mir 0.7.3 release
PS Jenkins bot (ps-jenkins) wrote : | # |
Daniel van Vugt (vanvugt) wrote : | # |
Incorrect version string:
18 +mir (0.7.3) UNRELEASED; urgency=medium
As we're packaging for Ubuntu it should be something like 0.7.3-0ubuntu1 to start with.
If you create your changelog entry with the "dch -i" command it should set this for you.
Daniel van Vugt (vanvugt) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1909
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
deb: http://
FAILURE: http://
deb: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
Arguably, r1910 should be mentioned in the changelog. Any change in a stable branch should be mentioned...
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1910
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1911
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
I just noticed bug 1370866 in 0.7.2 on our build machines is blocking CI for some pending branches. We need to fix that one too.
Daniel van Vugt (vanvugt) wrote : | # |
Fix pushed to revision 1912. Just wait for Launchpad to update, then approved.
- 1912. By Daniel van Vugt
-
Cherry pick bug fix LP: #1370866 from 0.8:
Relax dependencies on libmirplatform2. Any binary package that uses
libmirplatform2 should already be ABI compatible with any version of
libmirplatform2. Assuming we maintain our ABIs correctly...Minimising exact version requirements should minimise future package
upgrade problems. - 1913. By Andreas Pokorny
-
ping
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1913
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) : | # |
Daniel van Vugt (vanvugt) wrote : | # |
*** No more changes ***
It's now in utopic-proposed: https:/
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2014-09-12 08:11:02 +0000 |
3 | +++ CMakeLists.txt 2014-09-18 14:48:06 +0000 |
4 | @@ -28,7 +28,7 @@ |
5 | |
6 | set(MIR_VERSION_MAJOR 0) |
7 | set(MIR_VERSION_MINOR 7) # This should change at least with every MIRSERVER_ABI |
8 | -set(MIR_VERSION_PATCH 2) |
9 | +set(MIR_VERSION_PATCH 3) |
10 | |
11 | set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH}) |
12 | |
13 | |
14 | === modified file 'cmake/EnableCoverageReport.cmake' |
15 | --- cmake/EnableCoverageReport.cmake 2013-01-15 16:01:51 +0000 |
16 | +++ cmake/EnableCoverageReport.cmake 2014-09-18 14:48:06 +0000 |
17 | @@ -14,7 +14,7 @@ |
18 | # The coverage report is based on gcov. Depending on the availability of lcov |
19 | # a HTML report will be generated and/or an XML report of gcovr is found. |
20 | # The generated coverage target executes all found solutions. Special targets |
21 | -# exist to create e.g. only the xml report: coverage-xml. |
22 | +# exist to create e.g. only the xml report: coverage-xml. |
23 | # |
24 | # Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de> |
25 | # |
26 | @@ -36,16 +36,16 @@ |
27 | FIND_PACKAGE(gcovr) |
28 | |
29 | FUNCTION(ENABLE_COVERAGE_REPORT) |
30 | - |
31 | + |
32 | # argument parsing |
33 | PARSE_ARGUMENTS(ARG "FILTER;TARGETS;TESTS" "" ${ARGN}) |
34 | - |
35 | + |
36 | SET(COVERAGE_RAW_FILE "${CMAKE_BINARY_DIR}/coverage.raw.info") |
37 | SET(COVERAGE_FILTERED_FILE "${CMAKE_BINARY_DIR}/coverage.info") |
38 | SET(COVERAGE_REPORT_DIR "${CMAKE_BINARY_DIR}/coveragereport") |
39 | SET(COVERAGE_XML_FILE "${CMAKE_BINARY_DIR}/coverage.xml") |
40 | SET(COVERAGE_XML_COMMAND_FILE "${CMAKE_BINARY_DIR}/coverage-xml.cmake") |
41 | - |
42 | + |
43 | # decide if there is any tool to create coverage data |
44 | SET(TOOL_FOUND FALSE) |
45 | IF(LCOV_FOUND OR GCOVR_FOUND) |
46 | @@ -54,35 +54,35 @@ |
47 | IF(NOT TOOL_FOUND) |
48 | MESSAGE(STATUS "Cannot enable coverage targets because neither lcov nor gcovr are found.") |
49 | ENDIF() |
50 | - |
51 | + |
52 | STRING(TOLOWER "${CMAKE_BUILD_TYPE}" COVERAGE_BUILD_TYPE) |
53 | IF(CMAKE_COMPILER_IS_GNUCXX AND TOOL_FOUND AND "${COVERAGE_BUILD_TYPE}" MATCHES "coverage") |
54 | - |
55 | + |
56 | MESSAGE(STATUS "Coverage support enabled for targets: ${ARG_TARGETS}") |
57 | - |
58 | + |
59 | # create coverage build type |
60 | SET(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG} PARENT_SCOPE) |
61 | SET(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG} PARENT_SCOPE) |
62 | SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} coverage PARENT_SCOPE) |
63 | - |
64 | + |
65 | # instrument targets |
66 | SET_TARGET_PROPERTIES(${ARG_TARGETS} PROPERTIES COMPILE_FLAGS --coverage |
67 | LINK_FLAGS --coverage) |
68 | - |
69 | + |
70 | # html report |
71 | IF (LCOV_FOUND) |
72 | - |
73 | + |
74 | MESSAGE(STATUS "Enabling HTML coverage report") |
75 | - |
76 | + |
77 | # set up coverage target |
78 | - |
79 | + |
80 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_RAW_FILE} |
81 | COMMAND ${LCOV_EXECUTABLE} -c -d ${CMAKE_BINARY_DIR} -o ${COVERAGE_RAW_FILE} |
82 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
83 | COMMENT "Collecting coverage data" |
84 | DEPENDS ${ARG_TARGETS} ${ARG_TESTS} |
85 | VERBATIM) |
86 | - |
87 | + |
88 | # filter unwanted stuff |
89 | LIST(LENGTH ARG_FILTER FILTER_LENGTH) |
90 | IF(${FILTER_LENGTH} GREATER 0) |
91 | @@ -94,7 +94,7 @@ |
92 | ELSE() |
93 | SET(FILTER "") |
94 | ENDIF() |
95 | - |
96 | + |
97 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_FILTERED_FILE} |
98 | COMMAND ${LCOV_EXECUTABLE} -e ${COVERAGE_RAW_FILE} "${CMAKE_SOURCE_DIR}*" -o ${COVERAGE_FILTERED_FILE} |
99 | ${FILTER} |
100 | @@ -107,34 +107,34 @@ |
101 | DEPENDS ${COVERAGE_FILTERED_FILE} |
102 | COMMENT "Generating HTML coverage report in ${COVERAGE_REPORT_DIR}" |
103 | VERBATIM) |
104 | - |
105 | + |
106 | ADD_CUSTOM_TARGET(coverage-html |
107 | DEPENDS ${COVERAGE_REPORT_DIR}) |
108 | - |
109 | + |
110 | ENDIF() |
111 | - |
112 | + |
113 | # xml coverage report |
114 | IF(GCOVR_FOUND) |
115 | - |
116 | + |
117 | MESSAGE(STATUS "Enabling XML coverage report") |
118 | - |
119 | + |
120 | # gcovr cannot write directly to a file so the execution needs to |
121 | # be wrapped in a cmake file that generates the file output |
122 | FILE(WRITE ${COVERAGE_XML_COMMAND_FILE} |
123 | "SET(ENV{LANG} en)\n") |
124 | FILE(APPEND ${COVERAGE_XML_COMMAND_FILE} |
125 | - "EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" --exclude=3rd_party.* --exclude=tests.* --exclude=obj-.* --exclude=cmake.* --exclude=include.mir_test.* --exclude=include.mir_test_doubles.* --exclude=include.mir_test_framework.* -c \"${CMAKE_GCOV}\" -x -r \"${CMAKE_SOURCE_DIR}\" OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n") |
126 | - |
127 | + "EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" --exclude=3rd_party.* --exclude=tests.* --exclude=obj-.* --exclude=cmake.* --exclude=include.mir_test.* --exclude=include.mir_test_doubles.* --exclude=include.mir_test_framework.* -x -r \"${CMAKE_BINARY_DIR}\" OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n") |
128 | + |
129 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_XML_FILE} |
130 | COMMAND ${CMAKE_COMMAND} ARGS -P ${COVERAGE_XML_COMMAND_FILE} |
131 | COMMENT "Generating coverage XML report" |
132 | VERBATIM) |
133 | - |
134 | + |
135 | ADD_CUSTOM_TARGET(coverage-xml |
136 | DEPENDS ${COVERAGE_XML_FILE}) |
137 | - |
138 | + |
139 | ENDIF() |
140 | - |
141 | + |
142 | # provide a global coverage target executing both steps if available |
143 | SET(GLOBAL_DEPENDS "") |
144 | IF(LCOV_FOUND) |
145 | @@ -147,7 +147,7 @@ |
146 | ADD_CUSTOM_TARGET(coverage |
147 | DEPENDS ${GLOBAL_DEPENDS}) |
148 | ENDIF() |
149 | - |
150 | + |
151 | ENDIF() |
152 | |
153 | -ENDFUNCTION() |
154 | +ENDFUNCTION() |
155 | |
156 | === modified file 'debian/changelog' |
157 | --- debian/changelog 2014-09-12 09:07:49 +0000 |
158 | +++ debian/changelog 2014-09-18 14:48:06 +0000 |
159 | @@ -1,3 +1,17 @@ |
160 | +mir (0.7.3-0ubuntu1) UNRELEASED; urgency=medium |
161 | + |
162 | + [ Andreas Pokorny ] |
163 | + * New upstream release 0.7.3 (https://launchpad.net/mir/+milestone/0.7.3) |
164 | + - Bug fixes |
165 | + . Fix constructor syntax errors (LP: #1369389) |
166 | + . server: Workaround for unresponsive clients causing the server to hang |
167 | + (LP: #1350207) |
168 | + . Relax strict dependencies of graphics drivers on an exact version |
169 | + of the libmirplatform2 package. It's blocking CI. (LP: #1370866) |
170 | + . Update cmake scripts to current version of gcovr. |
171 | + |
172 | + -- Daniel van Vugt <daniel.van.vugt@canonical.com> Wed, 17 Sep 2014 11:23:23 +0800 |
173 | + |
174 | mir (0.7.2+14.10.20140912-0ubuntu1) utopic; urgency=medium |
175 | |
176 | [ Alexandros Frantzis ] |
177 | |
178 | === modified file 'debian/control' |
179 | --- debian/control 2014-08-26 14:59:57 +0000 |
180 | +++ debian/control 2014-09-18 14:48:06 +0000 |
181 | @@ -80,7 +80,6 @@ |
182 | Pre-Depends: ${misc:Pre-Depends} |
183 | Depends: ${misc:Depends}, |
184 | ${shlibs:Depends}, |
185 | - libmirplatform2 (= ${binary:Version}), |
186 | Description: Display server for Ubuntu - platform library for Mesa |
187 | Mir is a display server running on linux systems, with a focus on efficiency, |
188 | robust operation and a well-defined driver model. |
189 | @@ -95,7 +94,6 @@ |
190 | Pre-Depends: ${misc:Pre-Depends} |
191 | Depends: ${misc:Depends}, |
192 | ${shlibs:Depends}, |
193 | - libmirplatform2 (= ${binary:Version}), |
194 | Description: Display server for Ubuntu - platform library for Android |
195 | Mir is a display server running on linux systems, with a focus on efficiency, |
196 | robust operation and a well-defined driver model. |
197 | |
198 | === modified file 'include/test/mir_test/auto_unblock_thread.h' |
199 | --- include/test/mir_test/auto_unblock_thread.h 2014-07-21 03:35:31 +0000 |
200 | +++ include/test/mir_test/auto_unblock_thread.h 2014-09-18 14:48:06 +0000 |
201 | @@ -41,7 +41,7 @@ |
202 | explicit AutoUnblockThread(std::function<void(void)> const& unblock, |
203 | Callable&& f, |
204 | Args&&... args) |
205 | - : unblock{unblock}, thread{f, args...} |
206 | + : unblock{unblock}, thread(f, args...) |
207 | {} |
208 | |
209 | ~AutoUnblockThread() |
210 | @@ -75,7 +75,7 @@ |
211 | template<typename Callable, typename... Args> |
212 | explicit AutoJoinThread(Callable&& f, |
213 | Args&&... args) |
214 | - : AutoUnblockThread{[]{}, f, args...} |
215 | + : AutoUnblockThread([]{}, f, args...) |
216 | {} |
217 | }; |
218 | |
219 | |
220 | === modified file 'include/test/mir_test/cross_process_action.h' |
221 | --- include/test/mir_test/cross_process_action.h 2013-08-20 13:39:31 +0000 |
222 | +++ include/test/mir_test/cross_process_action.h 2014-09-18 14:48:06 +0000 |
223 | @@ -23,6 +23,7 @@ |
224 | #include "mir_test_framework/cross_process_sync.h" |
225 | |
226 | #include <functional> |
227 | +#include <chrono> |
228 | |
229 | namespace mir |
230 | { |
231 | @@ -33,7 +34,7 @@ |
232 | { |
233 | public: |
234 | void exec(std::function<void()> const& f); |
235 | - void operator()(); |
236 | + void operator()(std::chrono::milliseconds timeout = std::chrono::milliseconds{-1}); |
237 | |
238 | private: |
239 | mir_test_framework::CrossProcessSync start_sync; |
240 | |
241 | === modified file 'include/test/mir_test_framework/display_server_test_fixture.h' |
242 | --- include/test/mir_test_framework/display_server_test_fixture.h 2014-08-26 14:47:50 +0000 |
243 | +++ include/test/mir_test_framework/display_server_test_fixture.h 2014-09-18 14:48:06 +0000 |
244 | @@ -62,7 +62,7 @@ |
245 | |
246 | void launch_server_process(TestingServerConfiguration& config); |
247 | |
248 | - void launch_client_process(TestingClientConfiguration& config); |
249 | + pid_t launch_client_process(TestingClientConfiguration& config); |
250 | |
251 | bool shutdown_server_process(); |
252 | Result wait_for_shutdown_server_process(); |
253 | |
254 | === modified file 'include/test/mir_test_framework/testing_process_manager.h' |
255 | --- include/test/mir_test_framework/testing_process_manager.h 2014-08-26 14:47:50 +0000 |
256 | +++ include/test/mir_test_framework/testing_process_manager.h 2014-09-18 14:48:06 +0000 |
257 | @@ -51,7 +51,7 @@ |
258 | ~TestingProcessManager(); |
259 | |
260 | void launch_server_process(TestingServerConfiguration& config); |
261 | - void launch_client_process(TestingClientConfiguration& config, |
262 | + pid_t launch_client_process(TestingClientConfiguration& config, |
263 | mir::options::Option const& test_options); |
264 | |
265 | void tear_down_clients(); |
266 | |
267 | === modified file 'src/server/frontend/socket_messenger.cpp' |
268 | --- src/server/frontend/socket_messenger.cpp 2014-07-24 18:35:40 +0000 |
269 | +++ src/server/frontend/socket_messenger.cpp 2014-09-18 14:48:06 +0000 |
270 | @@ -36,6 +36,14 @@ |
271 | mfd::SocketMessenger::SocketMessenger(std::shared_ptr<ba::local::stream_protocol::socket> const& socket) |
272 | : socket(socket) |
273 | { |
274 | + // Make the socket non-blocking to avoid hanging the server when a client |
275 | + // is unresponsive. Also increase the send buffer size to 64KiB to allow |
276 | + // more leeway for transient client freezes. |
277 | + // See https://bugs.launchpad.net/mir/+bug/1350207 |
278 | + // TODO: Rework the messenger to support asynchronous sends |
279 | + socket->non_blocking(true); |
280 | + boost::asio::socket_base::send_buffer_size option(64*1024); |
281 | + socket->set_option(option); |
282 | } |
283 | |
284 | mf::SessionCredentials mfd::SocketMessenger::creator_creds() const |
285 | @@ -143,11 +151,19 @@ |
286 | ba::mutable_buffers_1 const& buffer) |
287 | { |
288 | bs::error_code e; |
289 | - boost::asio::read( |
290 | - *socket, |
291 | - buffer, |
292 | - boost::asio::transfer_exactly(ba::buffer_size(buffer)), |
293 | - e); |
294 | + size_t nread = 0; |
295 | + |
296 | + while (nread < ba::buffer_size(buffer)) |
297 | + { |
298 | + nread += boost::asio::read( |
299 | + *socket, |
300 | + ba::mutable_buffers_1{buffer + nread}, |
301 | + e); |
302 | + |
303 | + if (e && e != ba::error::would_block) |
304 | + break; |
305 | + } |
306 | + |
307 | return e; |
308 | } |
309 | |
310 | |
311 | === modified file 'tests/acceptance-tests/CMakeLists.txt' |
312 | --- tests/acceptance-tests/CMakeLists.txt 2014-08-29 13:23:12 +0000 |
313 | +++ tests/acceptance-tests/CMakeLists.txt 2014-09-18 14:48:06 +0000 |
314 | @@ -46,6 +46,7 @@ |
315 | test_server_without_active_outputs.cpp |
316 | test_client_input.cpp |
317 | test_server_startup.cpp |
318 | + test_unresponsive_client.cpp |
319 | ${GENERATED_PROTOBUF_SRCS} |
320 | ${GENERATED_PROTOBUF_HDRS} |
321 | ) |
322 | |
323 | === added file 'tests/acceptance-tests/test_unresponsive_client.cpp' |
324 | --- tests/acceptance-tests/test_unresponsive_client.cpp 1970-01-01 00:00:00 +0000 |
325 | +++ tests/acceptance-tests/test_unresponsive_client.cpp 2014-09-18 14:48:06 +0000 |
326 | @@ -0,0 +1,122 @@ |
327 | +/* |
328 | + * Copyright © 2014 Canonical Ltd. |
329 | + * |
330 | + * This program is free software: you can redistribute it and/or modify |
331 | + * it under the terms of the GNU General Public License version 3 as |
332 | + * published by the Free Software Foundation. |
333 | + * |
334 | + * This program is distributed in the hope that it will be useful, |
335 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
336 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
337 | + * GNU General Public License for more details. |
338 | + * |
339 | + * You should have received a copy of the GNU General Public License |
340 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
341 | + * |
342 | + * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
343 | + */ |
344 | + |
345 | +#include "src/server/scene/session_container.h" |
346 | +#include "mir/scene/session.h" |
347 | +#include "mir/scene/surface.h" |
348 | + |
349 | +#include "mir_test/cross_process_action.h" |
350 | +#include "mir_test_framework/display_server_test_fixture.h" |
351 | + |
352 | +#include "mir_toolkit/mir_client_library.h" |
353 | + |
354 | +#include <gtest/gtest.h> |
355 | + |
356 | +#include <string> |
357 | +#include <thread> |
358 | + |
359 | +namespace mt = mir::test; |
360 | +namespace mtf = mir_test_framework; |
361 | + |
362 | +namespace |
363 | +{ |
364 | +char const* const mir_test_socket = mtf::test_socket_file().c_str(); |
365 | +} |
366 | +using UnresponsiveClient = mtf::BespokeDisplayServerTestFixture; |
367 | + |
368 | +TEST_F(UnresponsiveClient, does_not_hang_server) |
369 | +{ |
370 | + struct ServerConfig : TestingServerConfiguration |
371 | + { |
372 | + void on_start() override |
373 | + { |
374 | + std::thread( |
375 | + [this] |
376 | + { |
377 | + send_events.exec( |
378 | + [this] |
379 | + { |
380 | + auto const sessions = the_session_container(); |
381 | + |
382 | + for (int i = 0; i < 1000; ++i) |
383 | + { |
384 | + sessions->for_each( |
385 | + [i] (std::shared_ptr<mir::scene::Session> const& session) |
386 | + { |
387 | + session->default_surface()->resize({i + 1, i + 1}); |
388 | + }); |
389 | + } |
390 | + }); |
391 | + }).detach(); |
392 | + } |
393 | + mt::CrossProcessAction send_events; |
394 | + } server_config; |
395 | + |
396 | + launch_server_process(server_config); |
397 | + |
398 | + struct ClientConfig : TestingClientConfiguration |
399 | + { |
400 | + void exec() |
401 | + { |
402 | + MirConnection* connection = nullptr; |
403 | + MirSurface* surface = nullptr; |
404 | + |
405 | + connect.exec( |
406 | + [&] |
407 | + { |
408 | + connection = mir_connect_sync(mir_test_socket, __PRETTY_FUNCTION__); |
409 | + |
410 | + MirSurfaceParameters const request_params = |
411 | + { |
412 | + __PRETTY_FUNCTION__, |
413 | + 100, 100, |
414 | + mir_pixel_format_abgr_8888, |
415 | + mir_buffer_usage_hardware, |
416 | + mir_display_output_id_invalid |
417 | + }; |
418 | + surface = mir_connection_create_surface_sync(connection, &request_params); |
419 | + }); |
420 | + |
421 | + release.exec( |
422 | + [&] |
423 | + { |
424 | + // We would normally explicitly release the surface at this |
425 | + // point. However, because we have been filling the server |
426 | + // send socket buffer, releasing the surface may cause the |
427 | + // server to try to write to a full socket buffer when |
428 | + // responding, leading the server to believe that the client |
429 | + // is blocked, and causing a premature client disconnection. |
430 | + mir_connection_release(connection); |
431 | + }); |
432 | + } |
433 | + |
434 | + mt::CrossProcessAction connect; |
435 | + mt::CrossProcessAction release; |
436 | + } client_config; |
437 | + |
438 | + auto const client_pid = launch_client_process(client_config); |
439 | + |
440 | + run_in_test_process([&] |
441 | + { |
442 | + client_config.connect(); |
443 | + kill(client_pid, SIGSTOP); |
444 | + server_config.send_events(std::chrono::seconds{10}); |
445 | + kill(client_pid, SIGCONT); |
446 | + client_config.release(); |
447 | + }); |
448 | +} |
449 | |
450 | === modified file 'tests/mir_test/cross_process_action.cpp' |
451 | --- tests/mir_test/cross_process_action.cpp 2013-08-20 13:39:31 +0000 |
452 | +++ tests/mir_test/cross_process_action.cpp 2014-09-18 14:48:06 +0000 |
453 | @@ -27,8 +27,8 @@ |
454 | finish_sync.signal_ready(); |
455 | } |
456 | |
457 | -void mt::CrossProcessAction::operator()() |
458 | +void mt::CrossProcessAction::operator()(std::chrono::milliseconds timeout) |
459 | { |
460 | start_sync.signal_ready(); |
461 | - finish_sync.wait_for_signal_ready(); |
462 | + finish_sync.wait_for_signal_ready_for(timeout); |
463 | } |
464 | |
465 | === modified file 'tests/mir_test_framework/display_server_test_fixture.cpp' |
466 | --- tests/mir_test_framework/display_server_test_fixture.cpp 2014-08-26 14:47:50 +0000 |
467 | +++ tests/mir_test_framework/display_server_test_fixture.cpp 2014-09-18 14:48:06 +0000 |
468 | @@ -60,9 +60,9 @@ |
469 | process_manager.launch_server_process(functor); |
470 | } |
471 | |
472 | -void BespokeDisplayServerTestFixture::launch_client_process(TestingClientConfiguration& config) |
473 | +pid_t BespokeDisplayServerTestFixture::launch_client_process(TestingClientConfiguration& config) |
474 | { |
475 | - process_manager.launch_client_process(config, *test_options); |
476 | + return process_manager.launch_client_process(config, *test_options); |
477 | } |
478 | |
479 | bool BespokeDisplayServerTestFixture::shutdown_server_process() |
480 | |
481 | === modified file 'tests/mir_test_framework/testing_process_manager.cpp' |
482 | --- tests/mir_test_framework/testing_process_manager.cpp 2014-08-26 14:47:50 +0000 |
483 | +++ tests/mir_test_framework/testing_process_manager.cpp 2014-09-18 14:48:06 +0000 |
484 | @@ -73,15 +73,16 @@ |
485 | } |
486 | } |
487 | |
488 | -void mtf::TestingProcessManager::launch_client_process(TestingClientConfiguration& config, mo::Option const& test_options) |
489 | +pid_t mtf::TestingProcessManager::launch_client_process(TestingClientConfiguration& config, mo::Option const& test_options) |
490 | { |
491 | if (!is_test_process) |
492 | { |
493 | - return; // We're not in the test process, so just return gracefully |
494 | + return 0; // We're not in the test process, so just return gracefully |
495 | } |
496 | |
497 | // We're in the test process, so make sure we started a service |
498 | - ASSERT_TRUE(server_process_was_started); |
499 | + if (!server_process_was_started) |
500 | + throw std::runtime_error("Trying to launch client process, but server process has not started"); |
501 | |
502 | pid_t pid = fork(); |
503 | |
504 | @@ -121,6 +122,8 @@ |
505 | { |
506 | clients.push_back(std::shared_ptr<Process>(new Process(pid))); |
507 | } |
508 | + |
509 | + return pid; |
510 | } |
511 | |
512 | void mtf::TestingProcessManager::tear_down_clients() |
FAILED: Continuous integration, rev:1908 jenkins. qa.ubuntu. com/job/ mir-ci/ 1691/ jenkins. qa.ubuntu. com/job/ mir-android- utopic- i386-build/ 1776 jenkins. qa.ubuntu. com/job/ mir-clang- utopic- amd64-build/ 1783 jenkins. qa.ubuntu. com/job/ mir-utopic- amd64-ci/ 29/console jenkins. qa.ubuntu. com/job/ mir-utopic- amd64-ci/ 29/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-utopic- armhf-ci/ 29/console jenkins. qa.ubuntu. com/job/ mir-utopic- armhf-ci/ 29/artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
deb: http://
FAILURE: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/1691/ rebuild
http://