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

Issue 99713002: Factor out a system_properties interface for interacting with getprop/setprop. (Closed)

Created:
7 years ago by tonyg
Modified:
7 years ago
Reviewers:
craigdh, bulach, frankf
CC:
chromium-reviews, craigdh+watch_chromium.org, chrome-speed-team+watch_google.com, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, telemetry+watch_chromium.org, frankf+watch_chromium.org
Visibility:
Public.

Description

Factor out a system_properties interface for interacting with getprop/setprop. Also, teach it to cache read-only properties so that we don't hit the device so often. This caching is a prereq for speed index support in Telemetry which would like to query these often. BUG=323813 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238601

Patch Set 1 #

Total comments: 6

Patch Set 2 : frankf comments #

Total comments: 1

Patch Set 3 : Remove setprop check #

Total comments: 7

Patch Set 4 : Add whitelisted callers #

Total comments: 1

Patch Set 5 : Use shlex.split() #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -48 lines) Patch
M build/android/pylib/android_commands.py View 1 2 3 4 14 chunks +68 lines, -24 lines 0 comments Download
A build/android/pylib/system_properties.py View 1 2 1 chunk +39 lines, -0 lines 1 comment Download
M build/android/pylib/utils/test_environment.py View 1 1 chunk +1 line, -1 line 0 comments Download
M tools/telemetry/telemetry/core/backends/adb_commands.py View 1 3 chunks +10 lines, -3 lines 0 comments Download
M tools/telemetry/telemetry/core/backends/android_rndis.py View 3 chunks +7 lines, -8 lines 0 comments Download
M tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py View 1 3 chunks +5 lines, -5 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py View 1 chunk +3 lines, -7 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
tonyg
7 years ago (2013-12-02 18:39:44 UTC) #1
frankf
Nice refactoring https://codereview.chromium.org/99713002/diff/1/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://codereview.chromium.org/99713002/diff/1/build/android/pylib/android_commands.py#newcode599 build/android/pylib/android_commands.py:599: 'setprop': 'system_properties[<PROPERTY>]', Could you add 'su' to ...
7 years ago (2013-12-03 00:20:27 UTC) #2
tonyg
https://codereview.chromium.org/99713002/diff/1/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://codereview.chromium.org/99713002/diff/1/build/android/pylib/android_commands.py#newcode599 build/android/pylib/android_commands.py:599: 'setprop': 'system_properties[<PROPERTY>]', On 2013/12/03 00:20:27, frankf wrote: > Could ...
7 years ago (2013-12-03 01:02:01 UTC) #3
frankf
https://codereview.chromium.org/99713002/diff/20001/build/android/pylib/system_properties.py File build/android/pylib/system_properties.py (right): https://codereview.chromium.org/99713002/diff/20001/build/android/pylib/system_properties.py#newcode30 build/android/pylib/system_properties.py:30: 'setprop %s "%s"; echo $?' % (key, value), retry_count=3).strip() ...
7 years ago (2013-12-03 01:27:28 UTC) #4
tonyg
On 2013/12/03 01:27:28, frankf wrote: > https://codereview.chromium.org/99713002/diff/20001/build/android/pylib/system_properties.py > File build/android/pylib/system_properties.py (right): > > https://codereview.chromium.org/99713002/diff/20001/build/android/pylib/system_properties.py#newcode30 > ...
7 years ago (2013-12-03 02:38:51 UTC) #5
bulach
lgtm, just some suggestions (and please make sure frank is happy too!) https://codereview.chromium.org/99713002/diff/40001/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py ...
7 years ago (2013-12-03 14:50:48 UTC) #6
tonyg
https://codereview.chromium.org/99713002/diff/40001/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://codereview.chromium.org/99713002/diff/40001/build/android/pylib/android_commands.py#newcode630 build/android/pylib/android_commands.py:630: self._CheckCommandIsValid(command) On 2013/12/03 14:50:49, bulach wrote: > why not ...
7 years ago (2013-12-03 15:29:36 UTC) #7
bulach
still lgtm, but one suggestion: https://codereview.chromium.org/99713002/diff/40001/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://codereview.chromium.org/99713002/diff/40001/build/android/pylib/android_commands.py#newcode630 build/android/pylib/android_commands.py:630: self._CheckCommandIsValid(command) On 2013/12/03 15:29:36, ...
7 years ago (2013-12-03 15:39:30 UTC) #8
tonyg
On 2013/12/03 15:39:30, bulach wrote: > still lgtm, but one suggestion: > > https://codereview.chromium.org/99713002/diff/40001/build/android/pylib/android_commands.py > ...
7 years ago (2013-12-03 17:44:31 UTC) #9
bulach
lgtm, thanks! https://codereview.chromium.org/99713002/diff/60001/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://codereview.chromium.org/99713002/diff/60001/build/android/pylib/android_commands.py#newcode609 build/android/pylib/android_commands.py:609: base_command = command.split()[0] ultra nit: it'd be ...
7 years ago (2013-12-03 17:50:17 UTC) #10
tonyg
On 2013/12/03 17:50:17, bulach wrote: > lgtm, thanks! > > https://codereview.chromium.org/99713002/diff/60001/build/android/pylib/android_commands.py > File build/android/pylib/android_commands.py (right): ...
7 years ago (2013-12-03 17:53:42 UTC) #11
frankf
lgtm with a suggestion for a follow-up https://codereview.chromium.org/99713002/diff/70001/build/android/pylib/system_properties.py File build/android/pylib/system_properties.py (right): https://codereview.chromium.org/99713002/diff/70001/build/android/pylib/system_properties.py#newcode29 build/android/pylib/system_properties.py:29: # TODO(tonyg): ...
7 years ago (2013-12-03 18:44:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tonyg@chromium.org/99713002/70001
7 years ago (2013-12-03 18:58:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tonyg@chromium.org/99713002/70001
7 years ago (2013-12-03 19:19:41 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tonyg@chromium.org/99713002/70001
7 years ago (2013-12-03 23:51:07 UTC) #15
commit-bot: I haz the power
7 years ago (2013-12-04 06:23:47 UTC) #16
Message was sent while issue was closed.
Change committed as 238601

Powered by Google App Engine
This is Rietveld 408576698