Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1562)

Unified Diff: client/cros/login.py

Issue 6719026: Fix faulty renice: -ve priority numbers mean more scheduling priority. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: . Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cros/login.py
diff --git a/client/cros/login.py b/client/cros/login.py
index 8cc7fd95781ef284e94952c0adaa0f8c632af2b1..4e3d8a262091683f5e4c7e1343590c16357036c1 100644
--- a/client/cros/login.py
+++ b/client/cros/login.py
@@ -12,10 +12,6 @@ from autotest_lib.client.common_lib import error
_DEFAULT_TIMEOUT = 30
_DEFAULT_OWNERSHIP_TIMEOUT = 60
-# Priority increase to use when logging in to make sure we aren't descheduled at
-# inopportune times.
-_LOGIN_NICE = 20
-
# Log messages used to signal when we're in a logout situation. Used to detect
# crashes by cros_ui_test.UITest.
LOGOUT_ATTEMPT_MSG = 'cros/login.py: Attempting logout...'
@@ -153,26 +149,22 @@ def attempt_login(username, password, timeout=_DEFAULT_TIMEOUT):
# Up our priority so we don't get descheduled in the middle of sending key
# press and key release events.
- utils.system('renice +%d -p %d' % (_LOGIN_NICE, os.getpid()))
- try:
- ax = cros_ui.get_autox()
- # navigate to login screen
- ax.send_hotkey("Ctrl+Alt+L")
- # escape out of any login screen menus (e.g., the network select menu)
- ax.send_hotkey("Escape")
- time.sleep(0.5)
- if (username):
- # focus username
- ax.send_hotkey("Alt+U")
- ax.send_text(username)
- # focus password
- ax.send_hotkey("Alt+P")
- ax.send_text(password)
- ax.send_hotkey("Return")
- else:
- ax.send_hotkey("Alt+B") # Browse without signing-in
- finally:
- utils.system('renice -%d -p %d' % (_LOGIN_NICE, os.getpid()))
+ ax = cros_ui.get_autox()
+ # navigate to login screen
+ ax.send_hotkey("Ctrl+Alt+L")
+ # escape out of any login screen menus (e.g., the network select menu)
+ ax.send_hotkey("Escape")
+ time.sleep(0.5)
+ if (username):
+ # focus username
+ ax.send_hotkey("Alt+U")
+ ax.send_text(username)
+ # focus password
+ ax.send_hotkey("Alt+P")
+ ax.send_text(password)
+ ax.send_hotkey("Return")
+ else:
+ ax.send_hotkey("Alt+B") # Browse without signing-in
wait_for_condition(condition=logged_in,
timeout_msg='Timed out waiting for login',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698