Mir

Merge lp:~kdub/mir/fix-1661508 into lp:mir

Proposed by Kevin DuBois on 2017-02-03
Status: Merged
Approved by: Cemil Azizoglu on 2017-02-03
Approved revision: 4012
Merged at revision: 4011
Proposed branch: lp:~kdub/mir/fix-1661508
Merge into: lp:mir
Diff against target: 40 lines (+18/-2)
2 files modified
src/client/presentation_chain.cpp (+4/-2)
tests/unit-tests/client/test_presentation_chain.cpp (+14/-0)
To merge this branch: bzr merge lp:~kdub/mir/fix-1661508
Reviewer Review Type Date Requested Status
Cemil Azizoglu (community) 2017-02-03 Approve on 2017-02-03
Mir CI Bot continuous-integration Approve on 2017-02-03
Review via email: mp+316344@code.launchpad.net

Commit message

add missing check for wait handle when configuring swapinterval.

Fixes: LP: #1661508

Description of the change

add missing check for wait handle when configuring swapinterval.

Fixes: LP: #1661508

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4012
https://mir-jenkins.ubuntu.com/job/mir-ci/2935/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/3882
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3961
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3951
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3951
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3951
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3909
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3909/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/3909
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3909/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3909
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3909/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3909
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3909/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/3909
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3909/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/3909
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3909/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Cemil Azizoglu (cemil-azizoglu) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/presentation_chain.cpp'
2--- src/client/presentation_chain.cpp 2017-01-18 16:58:17 +0000
3+++ src/client/presentation_chain.cpp 2017-02-03 15:13:35 +0000
4@@ -87,10 +87,12 @@
5
6 void mcl::PresentationChain::set_dropping_mode()
7 {
8- interval_config.set_swap_interval(0)->wait_for_all();
9+ if (auto wh = interval_config.set_swap_interval(0))
10+ wh->wait_for_all();
11 }
12
13 void mcl::PresentationChain::set_queueing_mode()
14 {
15- interval_config.set_swap_interval(1)->wait_for_all();
16+ if (auto wh = interval_config.set_swap_interval(1))
17+ wh->wait_for_all();
18 }
19
20=== modified file 'tests/unit-tests/client/test_presentation_chain.cpp'
21--- tests/unit-tests/client/test_presentation_chain.cpp 2017-01-18 02:29:37 +0000
22+++ tests/unit-tests/client/test_presentation_chain.cpp 2017-02-03 15:13:35 +0000
23@@ -126,3 +126,17 @@
24 chain.submit_buffer(&buffer);
25 }, std::logic_error);
26 }
27+
28+TEST_F(PresentationChain, double_interval_configure_is_ok)
29+{
30+ mcl::PresentationChain chain(
31+ connection, rpc_id, mock_server,
32+ std::make_shared<mtd::StubClientBufferFactory>(),
33+ std::make_shared<mcl::BufferFactory>());
34+ EXPECT_NO_THROW({
35+ chain.set_dropping_mode();
36+ chain.set_dropping_mode();
37+ chain.set_queueing_mode();
38+ chain.set_queueing_mode();
39+ });
40+}

Subscribers

People subscribed via source and target branches