Mir

Merge lp:~thomas-voss/mir/wait-for-vt-to-become-active-before-setting-mode into lp:~mir-team/mir/trunk

Proposed by Thomas Voß
Status: Merged
Approved by: Robert Ancell
Approved revision: no longer in the source branch.
Merged at revision: 768
Proposed branch: lp:~thomas-voss/mir/wait-for-vt-to-become-active-before-setting-mode
Merge into: lp:~mir-team/mir/trunk
Diff against target: 32 lines (+8/-2)
2 files modified
src/server/graphics/gbm/linux_virtual_terminal.cpp (+2/-1)
tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp (+6/-1)
To merge this branch: bzr merge lp:~thomas-voss/mir/wait-for-vt-to-become-active-before-setting-mode
Reviewer Review Type Date Requested Status
Robert Ancell Approve
Kevin DuBois (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+171099@code.launchpad.net

Commit message

Wait for vt to become active if we need to activate it.

Description of the change

Wait for vt to become active if we need to activate it.

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
Kevin DuBois (kdub) wrote :

seems sensible

review: Approve
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Evil VT API...

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

Is this a fix for bug 1194054? I will have to test...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/graphics/gbm/linux_virtual_terminal.cpp'
2--- src/server/graphics/gbm/linux_virtual_terminal.cpp 2013-06-21 01:43:11 +0000
3+++ src/server/graphics/gbm/linux_virtual_terminal.cpp 2013-06-24 14:43:45 +0000
4@@ -207,7 +207,8 @@
5 std::runtime_error("Failed to activate VT"))
6 << boost::errinfo_file_name(active_vt_path)
7 << boost::errinfo_errno(errno));
8- }
9+ }
10+ status = fops->ioctl(vt_fd, VT_WAITACTIVE, vt_number);
11 }
12
13 return vt_fd;
14
15=== modified file 'tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp'
16--- tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp 2013-06-21 01:43:11 +0000
17+++ tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp 2013-06-24 14:43:45 +0000
18@@ -126,8 +126,13 @@
19 .WillOnce(Return(fake_vt_fd));
20
21 if (activate)
22+ {
23 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_ACTIVATE, vt_num))
24- .WillOnce(Return(0));
25+ .WillOnce(Return(0));
26+
27+ EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_WAITACTIVE, vt_num))
28+ .WillOnce(Return(0));
29+ }
30
31 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, KDGETMODE, An<void*>()))
32 .WillOnce(DoAll(SetIoctlPointee<int>(fake_kd_mode), Return(0)));

Subscribers

People subscribed via source and target branches