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

Issue 720413006: [Telemetry] Improve elevate_privilege handling in LaunchApplication() + Fix killing of power metri… (Closed)

Created:
6 years, 1 month ago by jeremy
Modified:
6 years ago
Reviewers:
dtu, Sami
CC:
chromium-reviews, telemetry+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Telemetry] Improve elevate_privilege handling in LaunchApplication() + Fix killing of power metrics process on bots. 1. Fix case where calling LauchApplication() twice in a row with elevate_privelege=True will not prepend sudo on the second invocation. This behavior occurs because sudo is already authenticated therefore IsElevated() returns True causing CanRunElevatedWithoutSudo() to return True. 2. Moving functions that handle sudo and setuid to a new utility function. 3. Do not prompt to set sticky bit on binaries run with elevate_privilege=True 4. Re-enable power and smoke unit tests on Mac 10.9. BUG=420615, 423688 Committed: https://crrev.com/c045fc3103d04ab47f1cf0e55457979ee203a940 Cr-Commit-Position: refs/heads/master@{#305691}

Patch Set 1 #

Patch Set 2 : Style + comment fixes #

Total comments: 3

Patch Set 3 : Smaller chnage #

Patch Set 4 : Comment fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -17 lines) Patch
M tools/perf/benchmarks/benchmark_smoke_unittest.py View 1 chunk +1 line, -3 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/platform_backend_unittest.py View 1 chunk +0 lines, -2 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/posix_platform_backend.py View 1 2 2 chunks +11 lines, -11 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py View 1 2 3 1 chunk +12 lines, -1 line 0 comments Download

Messages

Total messages: 10 (2 generated)
jeremy
Sami, dtu: This is important for the Fixit, just need a review from one of ...
6 years, 1 month ago (2014-11-23 15:14:06 UTC) #2
Sami
lgtm with one question/suggestion for _KillPowerMetricsProcess. https://codereview.chromium.org/720413006/diff/20001/tools/telemetry/telemetry/core/platform/posix_sudo_util.py File tools/telemetry/telemetry/core/platform/posix_sudo_util.py (right): https://codereview.chromium.org/720413006/diff/20001/tools/telemetry/telemetry/core/platform/posix_sudo_util.py#newcode26 tools/telemetry/telemetry/core/platform/posix_sudo_util.py:26: return os.stat(path).st_mode & ...
6 years ago (2014-11-24 15:05:57 UTC) #3
jeremy
Sami: I made this a smaller change, could you take another look please? https://codereview.chromium.org/720413006/diff/20001/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py File ...
6 years ago (2014-11-25 14:20:27 UTC) #4
Sami
Thanks, lgtm.
6 years ago (2014-11-25 14:28:25 UTC) #5
jeremy
Thanks Sami!! Waiting on chromelabs to add pkill to sudoers file before landing.
6 years ago (2014-11-25 15:23:39 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/720413006/60001
6 years ago (2014-11-25 19:23:14 UTC) #8
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years ago (2014-11-25 20:43:36 UTC) #9
commit-bot: I haz the power
6 years ago (2014-11-25 20:44:21 UTC) #10
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/c045fc3103d04ab47f1cf0e55457979ee203a940
Cr-Commit-Position: refs/heads/master@{#305691}

Powered by Google App Engine
This is Rietveld 408576698