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
=== modified file 'src/server/graphics/gbm/linux_virtual_terminal.cpp'
--- src/server/graphics/gbm/linux_virtual_terminal.cpp 2013-06-21 01:43:11 +0000
+++ src/server/graphics/gbm/linux_virtual_terminal.cpp 2013-06-24 14:43:45 +0000
@@ -207,7 +207,8 @@
207 std::runtime_error("Failed to activate VT"))207 std::runtime_error("Failed to activate VT"))
208 << boost::errinfo_file_name(active_vt_path)208 << boost::errinfo_file_name(active_vt_path)
209 << boost::errinfo_errno(errno));209 << boost::errinfo_errno(errno));
210 } 210 }
211 status = fops->ioctl(vt_fd, VT_WAITACTIVE, vt_number);
211 }212 }
212213
213 return vt_fd;214 return vt_fd;
214215
=== modified file 'tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp'
--- tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp 2013-06-21 01:43:11 +0000
+++ tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp 2013-06-24 14:43:45 +0000
@@ -126,8 +126,13 @@
126 .WillOnce(Return(fake_vt_fd));126 .WillOnce(Return(fake_vt_fd));
127127
128 if (activate)128 if (activate)
129 {
129 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_ACTIVATE, vt_num))130 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_ACTIVATE, vt_num))
130 .WillOnce(Return(0)); 131 .WillOnce(Return(0));
132
133 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_WAITACTIVE, vt_num))
134 .WillOnce(Return(0));
135 }
131136
132 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, KDGETMODE, An<void*>()))137 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, KDGETMODE, An<void*>()))
133 .WillOnce(DoAll(SetIoctlPointee<int>(fake_kd_mode), Return(0)));138 .WillOnce(DoAll(SetIoctlPointee<int>(fake_kd_mode), Return(0)));

Subscribers

People subscribed via source and target branches