Status: | Work in progress |
---|---|
Proposed branch: | lp:~kdub/mir/ci-test |
Merge into: | lp:mir/ubuntu |
Diff against target: |
295 lines (+91/-45) 11 files modified
CMakeLists.txt (+1/-1) cmake/MirCommon.cmake (+1/-0) debian/changelog (+13/-0) src/client/buffer_vault.cpp (+23/-22) src/client/buffer_vault.h (+1/-1) src/client/lttng/CMakeLists.txt (+9/-0) src/platform/options/default_configuration.cpp (+1/-1) src/server/report/lttng/CMakeLists.txt (+9/-0) tests/acceptance-tests/CMakeLists.txt (+1/-1) tests/unit-tests/client/test_buffer_vault.cpp (+22/-19) tools/valgrind_suppressions_libhybris (+10/-0) |
To merge this branch: | bzr merge lp:~kdub/mir/ci-test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Review via email: mp+301373@code.launchpad.net |
Commit message
Description of the change
MP just for CI testing, do not land
Mir CI Bot (mir-ci-bot) wrote : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3529
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
- 3530. By Kevin DuBois
-
port over suppression files that we after some recent hybris changes
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3529
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
- 3531. By Kevin DuBois
-
bzr add the new file when porting
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3530
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3531
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unmerged revisions
- 3531. By Kevin DuBois
-
bzr add the new file when porting
- 3530. By Kevin DuBois
-
port over suppression files that we after some recent hybris changes
- 3529. By Kevin DuBois
-
include fixes for mir CI (LP: #1584601)
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2016-07-19 16:34:44 +0000 |
3 | +++ CMakeLists.txt 2016-07-28 17:57:14 +0000 |
4 | @@ -29,7 +29,7 @@ |
5 | |
6 | set(MIR_VERSION_MAJOR 0) |
7 | set(MIR_VERSION_MINOR 23) |
8 | -set(MIR_VERSION_PATCH 4) |
9 | +set(MIR_VERSION_PATCH 5) |
10 | |
11 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) |
12 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) |
13 | |
14 | === modified file 'cmake/MirCommon.cmake' |
15 | --- cmake/MirCommon.cmake 2016-03-23 06:39:56 +0000 |
16 | +++ cmake/MirCommon.cmake 2016-07-28 17:57:14 +0000 |
17 | @@ -29,6 +29,7 @@ |
18 | set(VALGRIND_CMD ${VALGRIND_CMD} "--num-callers=128") |
19 | set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_generic") |
20 | set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_glibc_2.23") |
21 | + set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_libhybris") |
22 | if (TARGET_ARCH STREQUAL "arm-linux-gnueabihf") |
23 | set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_armhf") |
24 | endif() |
25 | |
26 | === modified file 'debian/changelog' |
27 | --- debian/changelog 2016-07-19 17:49:47 +0000 |
28 | +++ debian/changelog 2016-07-28 17:57:14 +0000 |
29 | @@ -1,3 +1,16 @@ |
30 | +mir (0.23.5-0ubuntu1) UNRELEASED; urgency=medium |
31 | + |
32 | + * New upstream release 0.23.5 (https://launchpad.net/mir/+milestone/0.23.5) |
33 | + - ABI summary: |
34 | + . No ABI changes in any libraries. |
35 | + - Enhancements: |
36 | + . Enable new buffer semantics (NBS) by default. |
37 | + - Bugs fixed: |
38 | + . OSK flickers and buttons are sometimes invisble (LP: #1590765) |
39 | + . Mir fails to build in: COMPOSITOR_TRACE_CALL (LP: #1584601) |
40 | + |
41 | + -- Kevin DuBois <kevin.dubois@canonical.com> Wed, 27 Jul 2016 08:36:06 -0400 |
42 | + |
43 | mir (0.23.4+16.10.20160719.1-0ubuntu1) yakkety; urgency=medium |
44 | |
45 | * New upstream release 0.23.4 (https://launchpad.net/mir/+milestone/0.23.4) |
46 | |
47 | === modified file 'src/client/buffer_vault.cpp' |
48 | --- src/client/buffer_vault.cpp 2016-06-02 13:03:43 +0000 |
49 | +++ src/client/buffer_vault.cpp 2016-07-28 17:57:14 +0000 |
50 | @@ -139,8 +139,26 @@ |
51 | mcl::NoTLSFuture<std::shared_ptr<mcl::Buffer>> mcl::BufferVault::withdraw() |
52 | { |
53 | std::unique_lock<std::mutex> lk(mutex); |
54 | + std::vector<int> free_ids; |
55 | if (disconnected_) |
56 | BOOST_THROW_EXCEPTION(std::logic_error("server_disconnected")); |
57 | + |
58 | + //clean up incorrectly sized buffers |
59 | + for (auto it = buffers.begin(); it != buffers.end();) |
60 | + { |
61 | + auto buffer = checked_buffer_from_map(it->first); |
62 | + if ((it->second == Owner::Self) && (buffer->size() != size)) |
63 | + { |
64 | + current_buffer_count--; |
65 | + free_ids.push_back(it->first); |
66 | + it = buffers.erase(it); |
67 | + } |
68 | + else |
69 | + { |
70 | + it++; |
71 | + } |
72 | + } |
73 | + |
74 | mcl::NoTLSPromise<std::shared_ptr<mcl::Buffer>> promise; |
75 | auto it = available_buffer(); |
76 | auto future = promise.get_future(); |
77 | @@ -148,6 +166,7 @@ |
78 | { |
79 | it->second = Owner::ContentProducer; |
80 | promise.set_value(checked_buffer_from_map(it->first)); |
81 | + lk.unlock(); |
82 | } |
83 | else |
84 | { |
85 | @@ -162,6 +181,9 @@ |
86 | if (allocate_buffer) |
87 | alloc_buffer(s, format, usage); |
88 | } |
89 | + |
90 | + for(auto& id : free_ids) |
91 | + free_buffer(id); |
92 | return future; |
93 | } |
94 | |
95 | @@ -284,30 +306,9 @@ |
96 | set_size(lk, new_size); |
97 | } |
98 | |
99 | -void mcl::BufferVault::set_size(std::unique_lock<std::mutex>& lk, geometry::Size new_size) |
100 | +void mcl::BufferVault::set_size(std::unique_lock<std::mutex> const&, geometry::Size new_size) |
101 | { |
102 | - if (new_size == size) |
103 | - return; |
104 | - std::vector<int> free_ids; |
105 | size = new_size; |
106 | - for (auto it = buffers.begin(); it != buffers.end();) |
107 | - { |
108 | - auto buffer = checked_buffer_from_map(it->first); |
109 | - if ((it->second == Owner::Self) && (buffer->size() != size)) |
110 | - { |
111 | - current_buffer_count--; |
112 | - free_ids.push_back(it->first); |
113 | - it = buffers.erase(it); |
114 | - } |
115 | - else |
116 | - { |
117 | - it++; |
118 | - } |
119 | - } |
120 | - lk.unlock(); |
121 | - |
122 | - for(auto& id : free_ids) |
123 | - free_buffer(id); |
124 | } |
125 | |
126 | void mcl::BufferVault::increase_buffer_count() |
127 | |
128 | === modified file 'src/client/buffer_vault.h' |
129 | --- src/client/buffer_vault.h 2016-06-02 13:03:43 +0000 |
130 | +++ src/client/buffer_vault.h 2016-07-28 17:57:14 +0000 |
131 | @@ -85,7 +85,7 @@ |
132 | void alloc_buffer(geometry::Size size, MirPixelFormat format, int usage); |
133 | void free_buffer(int free_id); |
134 | void realloc_buffer(int free_id, geometry::Size size, MirPixelFormat format, int usage); |
135 | - void set_size(std::unique_lock<std::mutex>& lk, geometry::Size new_size); |
136 | + void set_size(std::unique_lock<std::mutex>const& lk, geometry::Size new_size); |
137 | |
138 | std::shared_ptr<Buffer> checked_buffer_from_map(int id); |
139 | |
140 | |
141 | === modified file 'src/client/lttng/CMakeLists.txt' |
142 | --- src/client/lttng/CMakeLists.txt 2016-03-23 06:39:56 +0000 |
143 | +++ src/client/lttng/CMakeLists.txt 2016-07-28 17:57:14 +0000 |
144 | @@ -15,6 +15,15 @@ |
145 | string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS}) |
146 | set(CMAKE_C_FLAGS ${NO_LTO_FLAGS}) |
147 | |
148 | +# lttng-ust uses urcu headers which contain code blocks inside expressions |
149 | +# this is a gnu extension. |
150 | +string(REPLACE "-pedantic" "" NO_PEDANTIC_CHECK_FLAGS ${CMAKE_CXX_FLAGS}) |
151 | +if("${CMAKE_CXX_COMPILER}" MATCHES "clang") |
152 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-statement-expression") |
153 | +else() |
154 | + set(CMAKE_CXX_FLAGS "${NO_PEDANTIC_CHECK_FLAGS}") |
155 | +endif() |
156 | + |
157 | add_library(mirclientlttng SHARED tracepoints.c) |
158 | |
159 | # Don't treat missing-field-initializers as an error, since |
160 | |
161 | === modified file 'src/platform/options/default_configuration.cpp' |
162 | --- src/platform/options/default_configuration.cpp 2016-06-10 15:51:56 +0000 |
163 | +++ src/platform/options/default_configuration.cpp 2016-07-28 17:57:14 +0000 |
164 | @@ -172,7 +172,7 @@ |
165 | "How to handle the SharedLibraryProber report. [{log,lttng,off}]") |
166 | (shell_report_opt, po::value<std::string>()->default_value(off_opt_value), |
167 | "How to handle the Shell report. [{log,off}]") |
168 | - (nbuffers_opt, po::value<int>()->default_value(3), |
169 | + (nbuffers_opt, po::value<int>()->default_value(0), |
170 | "Number of buffers per surface.") |
171 | (composite_delay_opt, po::value<int>()->default_value(-1), |
172 | "Compositor frame delay in milliseconds (how long to wait for new " |
173 | |
174 | === modified file 'src/server/report/lttng/CMakeLists.txt' |
175 | --- src/server/report/lttng/CMakeLists.txt 2016-03-23 06:39:56 +0000 |
176 | +++ src/server/report/lttng/CMakeLists.txt 2016-07-28 17:57:14 +0000 |
177 | @@ -14,6 +14,15 @@ |
178 | string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS}) |
179 | set(CMAKE_C_FLAGS ${NO_LTO_FLAGS}) |
180 | |
181 | +# lttng-ust uses urcu headers which contain code blocks inside expressions |
182 | +# this is a gnu extension. |
183 | +string(REPLACE "-pedantic" "" NO_PEDANTIC_CHECK_FLAGS ${CMAKE_CXX_FLAGS}) |
184 | +if("${CMAKE_CXX_COMPILER}" MATCHES "clang") |
185 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-statement-expression") |
186 | +else() |
187 | + set(CMAKE_CXX_FLAGS "${NO_PEDANTIC_CHECK_FLAGS}") |
188 | +endif() |
189 | + |
190 | set( |
191 | LTTNG_SOURCES |
192 | |
193 | |
194 | === modified file 'tests/acceptance-tests/CMakeLists.txt' |
195 | --- tests/acceptance-tests/CMakeLists.txt 2016-06-10 15:51:56 +0000 |
196 | +++ tests/acceptance-tests/CMakeLists.txt 2016-07-28 17:57:14 +0000 |
197 | @@ -93,5 +93,5 @@ |
198 | |
199 | if (MIR_RUN_ACCEPTANCE_TESTS) |
200 | mir_discover_tests_with_fd_leak_detection(mir_acceptance_tests) |
201 | - mir_discover_tests_with_fd_leak_detection_and_env(mir_acceptance_tests "MIR_SERVER_NBUFFERS=0") |
202 | + mir_discover_tests_with_fd_leak_detection_and_env(mir_acceptance_tests "MIR_SERVER_NBUFFERS=3") |
203 | endif (MIR_RUN_ACCEPTANCE_TESTS) |
204 | |
205 | === modified file 'tests/unit-tests/client/test_buffer_vault.cpp' |
206 | --- tests/unit-tests/client/test_buffer_vault.cpp 2016-06-02 13:03:43 +0000 |
207 | +++ tests/unit-tests/client/test_buffer_vault.cpp 2016-07-28 17:57:14 +0000 |
208 | @@ -348,9 +348,10 @@ |
209 | EXPECT_CALL(mock_requests, allocate_buffer(new_size,_,_)); |
210 | |
211 | vault.wire_transfer_inbound(package.buffer_id()); |
212 | + Mock::VerifyAndClearExpectations(&mock_requests); |
213 | + |
214 | vault.wire_transfer_inbound(package4.buffer_id()); |
215 | EXPECT_THAT(vault.withdraw().get()->size(), Eq(new_size)); |
216 | - Mock::VerifyAndClearExpectations(&mock_requests); |
217 | } |
218 | |
219 | TEST_F(StartedBufferVault, withdraw_gives_only_newly_sized_buffers_after_resize) |
220 | @@ -363,20 +364,6 @@ |
221 | Mock::VerifyAndClearExpectations(&mock_requests); |
222 | } |
223 | |
224 | -TEST_F(StartedBufferVault, setting_size_frees_unneeded_buffers_right_away) |
225 | -{ |
226 | - EXPECT_CALL(mock_requests, free_buffer(_)).Times(3); |
227 | - EXPECT_CALL(mock_requests, allocate_buffer(_,_,_)).Times(0); |
228 | - auto const cycles = 30u; |
229 | - geom::Size new_size(80, 100); |
230 | - for(auto i = 0u; i < cycles; i++) |
231 | - { |
232 | - new_size = geom::Size(geom::Width(i), new_size.height); |
233 | - vault.set_size(new_size); |
234 | - } |
235 | - Mock::VerifyAndClearExpectations(&mock_requests); |
236 | -} |
237 | - |
238 | TEST_F(StartedBufferVault, scaling_resizes_buffers_right_away) |
239 | { |
240 | EXPECT_CALL(mock_requests, allocate_buffer(_,_,_)) |
241 | @@ -584,10 +571,28 @@ |
242 | Mock::VerifyAndClearExpectations(&mock_requests); |
243 | } |
244 | |
245 | +//LP: #1590765 (more efficient allocations, and krillin/mali accommodation) |
246 | +TEST_F(StartedBufferVault, doesnt_free_buffer_until_a_newly_sized_buffer_is_called_for) |
247 | +{ |
248 | + auto i = 0u; |
249 | + auto const num_resizes = 10u; |
250 | + std::array<geom::Size, num_resizes> other_sizes; |
251 | + std::generate(other_sizes.begin(), other_sizes.end(), |
252 | + [&i, this] { return geom::Size{ size.width.as_int() + i, size.height.as_int() + i }; } ); |
253 | + |
254 | + EXPECT_CALL(mock_requests, free_buffer(_)) |
255 | + .Times(0); |
256 | + for(auto const& size : other_sizes) |
257 | + vault.set_size(size); |
258 | + vault.set_size(size); //set back the original size |
259 | + |
260 | + auto buffer_future = vault.withdraw(); |
261 | + EXPECT_THAT(buffer_future.get()->size(), Eq(size)); |
262 | + Mock::VerifyAndClearExpectations(&mock_requests); |
263 | +} |
264 | + |
265 | TEST_F(StartedBufferVault, doesnt_free_buffers_in_the_driver_after_resize) |
266 | { |
267 | - EXPECT_CALL(mock_requests, free_buffer(_)) |
268 | - .Times(2); |
269 | auto buffer = vault.withdraw().get(); |
270 | vault.set_size(new_size); |
271 | Mock::VerifyAndClearExpectations(&mock_requests); |
272 | @@ -603,8 +608,6 @@ |
273 | |
274 | TEST_F(StartedBufferVault, doesnt_free_buffers_with_content_after_resize) |
275 | { |
276 | - EXPECT_CALL(mock_requests, free_buffer(_)) |
277 | - .Times(2); |
278 | auto buffer = vault.withdraw().get(); |
279 | vault.deposit(buffer); |
280 | vault.set_size(new_size); |
281 | |
282 | === added file 'tools/valgrind_suppressions_libhybris' |
283 | --- tools/valgrind_suppressions_libhybris 1970-01-01 00:00:00 +0000 |
284 | +++ tools/valgrind_suppressions_libhybris 2016-07-28 17:57:14 +0000 |
285 | @@ -0,0 +1,10 @@ |
286 | +{ |
287 | + hw_get_module |
288 | + Memcheck:Leak |
289 | + match-leak-kinds: definite |
290 | + fun:malloc |
291 | + obj:* |
292 | + ... |
293 | + fun:_ZN3mir7options20DefaultConfiguration20add_platform_optionsEv |
294 | + ... |
295 | +} |
FAILED: Continuous integration, rev:3529 /code.launchpad .net/~kdub/ mir/ci- test/+merge/ 301373/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/ /mir-jenkins. ubuntu. com/job/ mir-ubuntu- ci/43/ /mir-jenkins. ubuntu. com/job/ build-mir/ 1630/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/1683 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1674 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1674 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= yakkety/ 1674 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= vivid+overlay/ 1645/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 1645/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 1645/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 1645/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 1645/console
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ubuntu- ci/43/rebuild
https:/