Mir

Merge lp:~robertcarr/mir/fix-1247718 into lp:mir

Proposed by Robert Carr
Status: Superseded
Proposed branch: lp:~robertcarr/mir/fix-1247718
Merge into: lp:mir
Diff against target: 14 lines (+4/-0) (has conflicts)
1 file modified
tests/unit-tests/input/android/test_android_input_manager.cpp (+4/-0)
Text conflict in tests/unit-tests/input/android/test_android_input_manager.cpp
To merge this branch: bzr merge lp:~robertcarr/mir/fix-1247718
Reviewer Review Type Date Requested Status
Daniel van Vugt Needs Fixing
Kevin DuBois (community) Approve
Alan Griffiths Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+194611@code.launchpad.net

This proposal has been superseded by a proposal from 2013-11-12.

Commit message

test_android_communication_package: Do not expect opened fd to be >0, we may
have closed stdin making this a valid value (LP: #1247718)

Description of the change

test_android_communication_package: Do not expect opened fd to be >0, we may have closed stdin making this a valid return value from socket().

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think you forgot the other location mentioned in bug 1247718:
tests/unit-tests/input/android/test_android_input_manager.cpp:159

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

8 - EXPECT_GT(server_fd, 0);
9 - EXPECT_GT(client_fd, 0);

OK, so zero could be valid, but what about <0? Maybe:

EXPECT_LE(0, server_fd);
EXPECT_LE(0, client_fd);

review: Needs Information
Revision history for this message
Robert Carr (robertcarr) wrote :

Changed the test in test_android_input-manager.cpp

instated EXPECT_LE.

Thanks :)

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

OK

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

looks ok

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Landed. Then unlanded because it's causing problems :(

/home/dan/bzr/mir/dev/tests/unit-tests/input/android/test_android_input_manager.cpp: In member function ‘virtual void AndroidInputManagerSetup_manager_returns_android_input_channel_Test::TestBody()’:
/home/dan/bzr/mir/dev/tests/unit-tests/input/android/test_android_input_manager.cpp:159:24: error: ‘dynamic_ptr_cast’ is not a member of ‘std’
     EXPECT_NE(nullptr, std::dynamic_ptr_cast<mia::AndroidInputChannel>(package));
                        ^
/home/dan/bzr/mir/dev/tests/unit-tests/input/android/test_android_input_manager.cpp:159:70: error: expected primary-expression before ‘>’ token
     EXPECT_NE(nullptr, std::dynamic_ptr_cast<mia::AndroidInputChannel>(package));
                                                                      ^
It will be nice when CI is working again :)

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You may also have to resubmit. Because development-branch now has metadata saying this branch is already merged, which is only half true.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit-tests/input/android/test_android_input_manager.cpp'
2--- tests/unit-tests/input/android/test_android_input_manager.cpp 2013-11-12 02:55:58 +0000
3+++ tests/unit-tests/input/android/test_android_input_manager.cpp 2013-11-12 23:10:03 +0000
4@@ -155,6 +155,10 @@
5 mia::InputManager manager(event_hub, dispatcher, reader_thread, dispatcher_thread);
6
7 auto package = manager.make_input_channel();
8+<<<<<<< TREE
9 EXPECT_GT(package->client_fd(), 0);
10 EXPECT_GT(package->server_fd(), 0);
11+=======
12+ EXPECT_NE(nullptr, std::dynamic_pointer_cast<mia::AndroidInputChannel>(package));
13+>>>>>>> MERGE-SOURCE
14 }

Subscribers

People subscribed via source and target branches