Mir

Merge lp:~andreas-pokorny/mir/band-aid-1521651 into lp:mir

Proposed by Andreas Pokorny
Status: Merged
Approved by: Alberto Aguirre
Approved revision: no longer in the source branch.
Merged at revision: 3164
Proposed branch: lp:~andreas-pokorny/mir/band-aid-1521651
Merge into: lp:mir
Diff against target: 42 lines (+13/-1)
2 files modified
src/platforms/mesa/server/x11/input/input.cpp (+1/-1)
tests/unit-tests/input/test_input_platform_probing.cpp (+12/-0)
To merge this branch: bzr merge lp:~andreas-pokorny/mir/band-aid-1521651
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Approve
Kevin DuBois (community) Approve
Alberto Aguirre (community) Approve
Review via email: mp+279272@code.launchpad.net

Commit message

Disable x11 input platform when --vt is specified on comand line, this is in line.

Description of the change

This is still just a bandaid. It avoids the actual cause... A bit ugly because it uses an option of the kms platform to decide whether it can be enabled. (In some respect this is similar to the test for host-socket)

To post a comment you must log in.
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Works here.

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

I agree it is ugly, but as a *temporary* workaround it avoids an embarrassing regression. On which basis I'd prefer to see a "// TODO" comment about resolving this.

I assume we'll create a more specific bug and mark the linked one fixed?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

I think we need a bug or another way to track that the bandaid is properly fixed at some point in the near future too. LGTM as a bandaid.

Also, waiting on this for 0.18

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

made a bug to track: https://bugs.launchpad.net/mir/+bug/1522104
top-approving

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

> made a bug to track: https://bugs.launchpad.net/mir/+bug/1522104
> top-approving

Cool

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

NestedServer.display_configuration_reset_when_application_exits failed, which seems unrelated. Trying again.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/mesa/server/x11/input/input.cpp'
2--- src/platforms/mesa/server/x11/input/input.cpp 2015-11-25 20:26:59 +0000
3+++ src/platforms/mesa/server/x11/input/input.cpp 2015-12-02 13:29:29 +0000
4@@ -48,7 +48,7 @@
5 mo::Option const& options)
6 {
7 mir::assert_entry_point_signature<mi::ProbePlatform>(&probe_input_platform);
8- if (options.is_set("host-socket"))
9+ if (options.is_set("host-socket") || options.is_set("vt"))
10 return mi::PlatformPriority::unsupported;
11
12 auto display_available = x11_resources.get_conn() != nullptr;
13
14=== modified file 'tests/unit-tests/input/test_input_platform_probing.cpp'
15--- tests/unit-tests/input/test_input_platform_probing.cpp 2015-11-20 15:25:12 +0000
16+++ tests/unit-tests/input/test_input_platform_probing.cpp 2015-12-02 13:29:29 +0000
17@@ -53,6 +53,7 @@
18 void add(mir::ModuleEmergencyCleanupHandler) override {}
19 };
20 char const platform_input_lib[] = "platform-input-lib";
21+char const vt[] = "vt";
22 char const platform_path[] = "platform-path";
23
24 struct InputPlatformProbe : ::testing::Test
25@@ -147,6 +148,17 @@
26
27 EXPECT_THAT(platforms, UnorderedElementsAre(OfPtrType<mi::evdev::Platform>(), OfPtrType<mi::X::XInputPlatform>()));
28 }
29+
30+TEST_F(InputPlatformProbe, x11_input_platform_not_used_when_vt_specified)
31+{
32+ ON_CALL(mock_options, is_set(StrEq(vt))).WillByDefault(Return(true));
33+ auto platforms =
34+ mi::probe_input_platforms(mock_options, mt::fake_shared(stub_emergency), mt::fake_shared(mock_registry),
35+ mr::null_input_report(), *stub_prober_report);
36+
37+ EXPECT_THAT(platforms, ElementsAre(OfPtrType<mi::evdev::Platform>()));
38+}
39+
40 #endif
41
42 TEST_F(InputPlatformProbe, allows_forcing_stub_input_platform)

Subscribers

People subscribed via source and target branches