Mir

Merge lp:~kdub/mir/ci-test into lp:mir/ubuntu

Proposed by Kevin DuBois
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
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing
Review via email: mp+301373@code.launchpad.net

Description of the change

MP just for CI testing, do not land

To post a comment you must log in.
Revision history for this message
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://code.launchpad.net/~kdub/mir/ci-test/+merge/301373/+edit-commit-message

https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/43/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/1630/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/1683
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1674
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1674
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1674
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/1645/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1645/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1645/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1645/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1645/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/43/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
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://code.launchpad.net/~kdub/mir/ci-test/+merge/301373/+edit-commit-message

https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/44/
Executed test runs:

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/44/rebuild

review: Needs Fixing (continuous-integration)
lp:~kdub/mir/ci-test updated
3530. By Kevin DuBois

port over suppression files that we after some recent hybris changes

Revision history for this message
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://code.launchpad.net/~kdub/mir/ci-test/+merge/301373/+edit-commit-message

https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/45/
Executed test runs:

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/45/rebuild

review: Needs Fixing (continuous-integration)
lp:~kdub/mir/ci-test updated
3531. By Kevin DuBois

bzr add the new file when porting

Revision history for this message
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://code.launchpad.net/~kdub/mir/ci-test/+merge/301373/+edit-commit-message

https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/46/
Executed test runs:

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/46/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
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://code.launchpad.net/~kdub/mir/ci-test/+merge/301373/+edit-commit-message

https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/47/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/1638/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/1691
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1682
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1682
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1682
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/1653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/1653/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1653/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1653/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1653/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1653/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1653/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ubuntu-ci/47/rebuild

review: Needs Fixing (continuous-integration)

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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-07-19 16:34:44 +0000
+++ CMakeLists.txt 2016-07-28 17:57:14 +0000
@@ -29,7 +29,7 @@
2929
30set(MIR_VERSION_MAJOR 0)30set(MIR_VERSION_MAJOR 0)
31set(MIR_VERSION_MINOR 23)31set(MIR_VERSION_MINOR 23)
32set(MIR_VERSION_PATCH 4)32set(MIR_VERSION_PATCH 5)
3333
34add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})34add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})
35add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR})35add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR})
3636
=== modified file 'cmake/MirCommon.cmake'
--- cmake/MirCommon.cmake 2016-03-23 06:39:56 +0000
+++ cmake/MirCommon.cmake 2016-07-28 17:57:14 +0000
@@ -29,6 +29,7 @@
29 set(VALGRIND_CMD ${VALGRIND_CMD} "--num-callers=128")29 set(VALGRIND_CMD ${VALGRIND_CMD} "--num-callers=128")
30 set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_generic")30 set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_generic")
31 set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_glibc_2.23")31 set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_glibc_2.23")
32 set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_libhybris")
32 if (TARGET_ARCH STREQUAL "arm-linux-gnueabihf")33 if (TARGET_ARCH STREQUAL "arm-linux-gnueabihf")
33 set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_armhf")34 set(VALGRIND_CMD ${VALGRIND_CMD} "--suppressions=${CMAKE_SOURCE_DIR}/tools/valgrind_suppressions_armhf")
34 endif()35 endif()
3536
=== modified file 'debian/changelog'
--- debian/changelog 2016-07-19 17:49:47 +0000
+++ debian/changelog 2016-07-28 17:57:14 +0000
@@ -1,3 +1,16 @@
1mir (0.23.5-0ubuntu1) UNRELEASED; urgency=medium
2
3 * New upstream release 0.23.5 (https://launchpad.net/mir/+milestone/0.23.5)
4 - ABI summary:
5 . No ABI changes in any libraries.
6 - Enhancements:
7 . Enable new buffer semantics (NBS) by default.
8 - Bugs fixed:
9 . OSK flickers and buttons are sometimes invisble (LP: #1590765)
10 . Mir fails to build in: COMPOSITOR_TRACE_CALL (LP: #1584601)
11
12 -- Kevin DuBois <kevin.dubois@canonical.com> Wed, 27 Jul 2016 08:36:06 -0400
13
1mir (0.23.4+16.10.20160719.1-0ubuntu1) yakkety; urgency=medium14mir (0.23.4+16.10.20160719.1-0ubuntu1) yakkety; urgency=medium
215
3 * New upstream release 0.23.4 (https://launchpad.net/mir/+milestone/0.23.4)16 * New upstream release 0.23.4 (https://launchpad.net/mir/+milestone/0.23.4)
417
=== modified file 'src/client/buffer_vault.cpp'
--- src/client/buffer_vault.cpp 2016-06-02 13:03:43 +0000
+++ src/client/buffer_vault.cpp 2016-07-28 17:57:14 +0000
@@ -139,8 +139,26 @@
139mcl::NoTLSFuture<std::shared_ptr<mcl::Buffer>> mcl::BufferVault::withdraw()139mcl::NoTLSFuture<std::shared_ptr<mcl::Buffer>> mcl::BufferVault::withdraw()
140{140{
141 std::unique_lock<std::mutex> lk(mutex);141 std::unique_lock<std::mutex> lk(mutex);
142 std::vector<int> free_ids;
142 if (disconnected_)143 if (disconnected_)
143 BOOST_THROW_EXCEPTION(std::logic_error("server_disconnected"));144 BOOST_THROW_EXCEPTION(std::logic_error("server_disconnected"));
145
146 //clean up incorrectly sized buffers
147 for (auto it = buffers.begin(); it != buffers.end();)
148 {
149 auto buffer = checked_buffer_from_map(it->first);
150 if ((it->second == Owner::Self) && (buffer->size() != size))
151 {
152 current_buffer_count--;
153 free_ids.push_back(it->first);
154 it = buffers.erase(it);
155 }
156 else
157 {
158 it++;
159 }
160 }
161
144 mcl::NoTLSPromise<std::shared_ptr<mcl::Buffer>> promise;162 mcl::NoTLSPromise<std::shared_ptr<mcl::Buffer>> promise;
145 auto it = available_buffer();163 auto it = available_buffer();
146 auto future = promise.get_future();164 auto future = promise.get_future();
@@ -148,6 +166,7 @@
148 {166 {
149 it->second = Owner::ContentProducer;167 it->second = Owner::ContentProducer;
150 promise.set_value(checked_buffer_from_map(it->first));168 promise.set_value(checked_buffer_from_map(it->first));
169 lk.unlock();
151 }170 }
152 else171 else
153 {172 {
@@ -162,6 +181,9 @@
162 if (allocate_buffer)181 if (allocate_buffer)
163 alloc_buffer(s, format, usage);182 alloc_buffer(s, format, usage);
164 }183 }
184
185 for(auto& id : free_ids)
186 free_buffer(id);
165 return future;187 return future;
166}188}
167189
@@ -284,30 +306,9 @@
284 set_size(lk, new_size);306 set_size(lk, new_size);
285}307}
286308
287void mcl::BufferVault::set_size(std::unique_lock<std::mutex>& lk, geometry::Size new_size)309void mcl::BufferVault::set_size(std::unique_lock<std::mutex> const&, geometry::Size new_size)
288{310{
289 if (new_size == size)
290 return;
291 std::vector<int> free_ids;
292 size = new_size;311 size = new_size;
293 for (auto it = buffers.begin(); it != buffers.end();)
294 {
295 auto buffer = checked_buffer_from_map(it->first);
296 if ((it->second == Owner::Self) && (buffer->size() != size))
297 {
298 current_buffer_count--;
299 free_ids.push_back(it->first);
300 it = buffers.erase(it);
301 }
302 else
303 {
304 it++;
305 }
306 }
307 lk.unlock();
308
309 for(auto& id : free_ids)
310 free_buffer(id);
311}312}
312313
313void mcl::BufferVault::increase_buffer_count()314void mcl::BufferVault::increase_buffer_count()
314315
=== modified file 'src/client/buffer_vault.h'
--- src/client/buffer_vault.h 2016-06-02 13:03:43 +0000
+++ src/client/buffer_vault.h 2016-07-28 17:57:14 +0000
@@ -85,7 +85,7 @@
85 void alloc_buffer(geometry::Size size, MirPixelFormat format, int usage);85 void alloc_buffer(geometry::Size size, MirPixelFormat format, int usage);
86 void free_buffer(int free_id);86 void free_buffer(int free_id);
87 void realloc_buffer(int free_id, geometry::Size size, MirPixelFormat format, int usage);87 void realloc_buffer(int free_id, geometry::Size size, MirPixelFormat format, int usage);
88 void set_size(std::unique_lock<std::mutex>& lk, geometry::Size new_size);88 void set_size(std::unique_lock<std::mutex>const& lk, geometry::Size new_size);
8989
90 std::shared_ptr<Buffer> checked_buffer_from_map(int id);90 std::shared_ptr<Buffer> checked_buffer_from_map(int id);
9191
9292
=== modified file 'src/client/lttng/CMakeLists.txt'
--- src/client/lttng/CMakeLists.txt 2016-03-23 06:39:56 +0000
+++ src/client/lttng/CMakeLists.txt 2016-07-28 17:57:14 +0000
@@ -15,6 +15,15 @@
15string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS})15string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS})
16set(CMAKE_C_FLAGS ${NO_LTO_FLAGS})16set(CMAKE_C_FLAGS ${NO_LTO_FLAGS})
1717
18# lttng-ust uses urcu headers which contain code blocks inside expressions
19# this is a gnu extension.
20string(REPLACE "-pedantic" "" NO_PEDANTIC_CHECK_FLAGS ${CMAKE_CXX_FLAGS})
21if("${CMAKE_CXX_COMPILER}" MATCHES "clang")
22 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-statement-expression")
23else()
24 set(CMAKE_CXX_FLAGS "${NO_PEDANTIC_CHECK_FLAGS}")
25endif()
26
18add_library(mirclientlttng SHARED tracepoints.c)27add_library(mirclientlttng SHARED tracepoints.c)
1928
20# Don't treat missing-field-initializers as an error, since29# Don't treat missing-field-initializers as an error, since
2130
=== modified file 'src/platform/options/default_configuration.cpp'
--- src/platform/options/default_configuration.cpp 2016-06-10 15:51:56 +0000
+++ src/platform/options/default_configuration.cpp 2016-07-28 17:57:14 +0000
@@ -172,7 +172,7 @@
172 "How to handle the SharedLibraryProber report. [{log,lttng,off}]")172 "How to handle the SharedLibraryProber report. [{log,lttng,off}]")
173 (shell_report_opt, po::value<std::string>()->default_value(off_opt_value),173 (shell_report_opt, po::value<std::string>()->default_value(off_opt_value),
174 "How to handle the Shell report. [{log,off}]")174 "How to handle the Shell report. [{log,off}]")
175 (nbuffers_opt, po::value<int>()->default_value(3),175 (nbuffers_opt, po::value<int>()->default_value(0),
176 "Number of buffers per surface.")176 "Number of buffers per surface.")
177 (composite_delay_opt, po::value<int>()->default_value(-1),177 (composite_delay_opt, po::value<int>()->default_value(-1),
178 "Compositor frame delay in milliseconds (how long to wait for new "178 "Compositor frame delay in milliseconds (how long to wait for new "
179179
=== modified file 'src/server/report/lttng/CMakeLists.txt'
--- src/server/report/lttng/CMakeLists.txt 2016-03-23 06:39:56 +0000
+++ src/server/report/lttng/CMakeLists.txt 2016-07-28 17:57:14 +0000
@@ -14,6 +14,15 @@
14string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS})14string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS})
15set(CMAKE_C_FLAGS ${NO_LTO_FLAGS})15set(CMAKE_C_FLAGS ${NO_LTO_FLAGS})
1616
17# lttng-ust uses urcu headers which contain code blocks inside expressions
18# this is a gnu extension.
19string(REPLACE "-pedantic" "" NO_PEDANTIC_CHECK_FLAGS ${CMAKE_CXX_FLAGS})
20if("${CMAKE_CXX_COMPILER}" MATCHES "clang")
21 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-statement-expression")
22else()
23 set(CMAKE_CXX_FLAGS "${NO_PEDANTIC_CHECK_FLAGS}")
24endif()
25
17set(26set(
18 LTTNG_SOURCES27 LTTNG_SOURCES
1928
2029
=== modified file 'tests/acceptance-tests/CMakeLists.txt'
--- tests/acceptance-tests/CMakeLists.txt 2016-06-10 15:51:56 +0000
+++ tests/acceptance-tests/CMakeLists.txt 2016-07-28 17:57:14 +0000
@@ -93,5 +93,5 @@
9393
94if (MIR_RUN_ACCEPTANCE_TESTS)94if (MIR_RUN_ACCEPTANCE_TESTS)
95 mir_discover_tests_with_fd_leak_detection(mir_acceptance_tests)95 mir_discover_tests_with_fd_leak_detection(mir_acceptance_tests)
96 mir_discover_tests_with_fd_leak_detection_and_env(mir_acceptance_tests "MIR_SERVER_NBUFFERS=0")96 mir_discover_tests_with_fd_leak_detection_and_env(mir_acceptance_tests "MIR_SERVER_NBUFFERS=3")
97endif (MIR_RUN_ACCEPTANCE_TESTS)97endif (MIR_RUN_ACCEPTANCE_TESTS)
9898
=== modified file 'tests/unit-tests/client/test_buffer_vault.cpp'
--- tests/unit-tests/client/test_buffer_vault.cpp 2016-06-02 13:03:43 +0000
+++ tests/unit-tests/client/test_buffer_vault.cpp 2016-07-28 17:57:14 +0000
@@ -348,9 +348,10 @@
348 EXPECT_CALL(mock_requests, allocate_buffer(new_size,_,_));348 EXPECT_CALL(mock_requests, allocate_buffer(new_size,_,_));
349349
350 vault.wire_transfer_inbound(package.buffer_id());350 vault.wire_transfer_inbound(package.buffer_id());
351 Mock::VerifyAndClearExpectations(&mock_requests);
352
351 vault.wire_transfer_inbound(package4.buffer_id());353 vault.wire_transfer_inbound(package4.buffer_id());
352 EXPECT_THAT(vault.withdraw().get()->size(), Eq(new_size));354 EXPECT_THAT(vault.withdraw().get()->size(), Eq(new_size));
353 Mock::VerifyAndClearExpectations(&mock_requests);
354}355}
355356
356TEST_F(StartedBufferVault, withdraw_gives_only_newly_sized_buffers_after_resize)357TEST_F(StartedBufferVault, withdraw_gives_only_newly_sized_buffers_after_resize)
@@ -363,20 +364,6 @@
363 Mock::VerifyAndClearExpectations(&mock_requests);364 Mock::VerifyAndClearExpectations(&mock_requests);
364}365}
365366
366TEST_F(StartedBufferVault, setting_size_frees_unneeded_buffers_right_away)
367{
368 EXPECT_CALL(mock_requests, free_buffer(_)).Times(3);
369 EXPECT_CALL(mock_requests, allocate_buffer(_,_,_)).Times(0);
370 auto const cycles = 30u;
371 geom::Size new_size(80, 100);
372 for(auto i = 0u; i < cycles; i++)
373 {
374 new_size = geom::Size(geom::Width(i), new_size.height);
375 vault.set_size(new_size);
376 }
377 Mock::VerifyAndClearExpectations(&mock_requests);
378}
379
380TEST_F(StartedBufferVault, scaling_resizes_buffers_right_away)367TEST_F(StartedBufferVault, scaling_resizes_buffers_right_away)
381{368{
382 EXPECT_CALL(mock_requests, allocate_buffer(_,_,_))369 EXPECT_CALL(mock_requests, allocate_buffer(_,_,_))
@@ -584,10 +571,28 @@
584 Mock::VerifyAndClearExpectations(&mock_requests);571 Mock::VerifyAndClearExpectations(&mock_requests);
585}572}
586573
574//LP: #1590765 (more efficient allocations, and krillin/mali accommodation)
575TEST_F(StartedBufferVault, doesnt_free_buffer_until_a_newly_sized_buffer_is_called_for)
576{
577 auto i = 0u;
578 auto const num_resizes = 10u;
579 std::array<geom::Size, num_resizes> other_sizes;
580 std::generate(other_sizes.begin(), other_sizes.end(),
581 [&i, this] { return geom::Size{ size.width.as_int() + i, size.height.as_int() + i }; } );
582
583 EXPECT_CALL(mock_requests, free_buffer(_))
584 .Times(0);
585 for(auto const& size : other_sizes)
586 vault.set_size(size);
587 vault.set_size(size); //set back the original size
588
589 auto buffer_future = vault.withdraw();
590 EXPECT_THAT(buffer_future.get()->size(), Eq(size));
591 Mock::VerifyAndClearExpectations(&mock_requests);
592}
593
587TEST_F(StartedBufferVault, doesnt_free_buffers_in_the_driver_after_resize)594TEST_F(StartedBufferVault, doesnt_free_buffers_in_the_driver_after_resize)
588{595{
589 EXPECT_CALL(mock_requests, free_buffer(_))
590 .Times(2);
591 auto buffer = vault.withdraw().get();596 auto buffer = vault.withdraw().get();
592 vault.set_size(new_size);597 vault.set_size(new_size);
593 Mock::VerifyAndClearExpectations(&mock_requests);598 Mock::VerifyAndClearExpectations(&mock_requests);
@@ -603,8 +608,6 @@
603608
604TEST_F(StartedBufferVault, doesnt_free_buffers_with_content_after_resize)609TEST_F(StartedBufferVault, doesnt_free_buffers_with_content_after_resize)
605{610{
606 EXPECT_CALL(mock_requests, free_buffer(_))
607 .Times(2);
608 auto buffer = vault.withdraw().get();611 auto buffer = vault.withdraw().get();
609 vault.deposit(buffer);612 vault.deposit(buffer);
610 vault.set_size(new_size);613 vault.set_size(new_size);
611614
=== added file 'tools/valgrind_suppressions_libhybris'
--- tools/valgrind_suppressions_libhybris 1970-01-01 00:00:00 +0000
+++ tools/valgrind_suppressions_libhybris 2016-07-28 17:57:14 +0000
@@ -0,0 +1,10 @@
1{
2 hw_get_module
3 Memcheck:Leak
4 match-leak-kinds: definite
5 fun:malloc
6 obj:*
7 ...
8 fun:_ZN3mir7options20DefaultConfiguration20add_platform_optionsEv
9 ...
10}

Subscribers

People subscribed via source and target branches