diff options
author | Kevin Lubick <kjlubick@google.com> | 2017-12-13 16:01:07 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-14 11:49:01 +0000 |
commit | 32af335e7abbf562dad8f1bd21bb013610b8b021 (patch) | |
tree | 146dd34d1f1b251cd9e493640cd59e006636a42b | |
parent | 4793d3bd2cfbb116748fa0052067106eea2263ad (diff) |
Disable extra CPUs during Nanobench
The previous experiment revealed that nanobench can
run on any of the online CPUs, so rather than put
the ones we don't need/want into powersave mode, just
disable them.
Maybe in the future we can run CPU tests on the big
or LITTLE cpus to get perf data on higher end or
lower end cpus, but only if we get very stable
results from this.
Bug: skia:7378
notry=true
notreechecks=true
Change-Id: I057513a691093e7f73c0f5790e17fab1a5ec0bc4
Reviewed-on: https://skia-review.googlesource.com/84820
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
22 files changed, 1008 insertions, 559 deletions
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json index 29cf14260a..a583f1239f 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json @@ -762,9 +762,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Debug", @@ -773,7 +774,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -783,6 +784,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -790,12 +792,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -804,9 +806,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Debug", @@ -815,7 +818,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -824,21 +827,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json index 8428bbc0b1..8e3d47c9a5 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json @@ -644,7 +644,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "0", + "2", "userspace" ], "env": { @@ -654,7 +654,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to userspace", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -689,7 +689,7 @@ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", "0.6", - "0" + "2" ], "env": { "BUILDTYPE": "Debug", @@ -698,7 +698,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Scale CPU 0 to 0.600000", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -762,9 +762,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "0", + "0" ], "env": { "BUILDTYPE": "Debug", @@ -773,7 +774,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Disabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -783,6 +784,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -790,8 +792,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", @@ -804,9 +806,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "3" + "1", + "0" ], "env": { "BUILDTYPE": "Debug", @@ -815,7 +818,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Disabling CPU 1", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -825,6 +828,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -832,8 +836,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json index 11f0d75ee0..f4ae7ce6b1 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json @@ -642,10 +642,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "4", - "ondemand" + "0", + "1" ], "env": { "BUILDTYPE": "Debug", @@ -654,7 +654,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 4's governor to ondemand", + "name": "Enabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -664,7 +664,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -672,12 +672,144 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/opt/infra-android/tools/adb", + "1", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 1", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/opt/infra-android/tools/adb", + "2", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 2", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/opt/infra-android/tools/adb", + "3", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 3", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -688,7 +820,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "0", + "4", "ondemand" ], "env": { @@ -698,7 +830,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to ondemand", + "name": "Set CPU 4's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json index b09404dfaf..c0676e6154 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json @@ -642,10 +642,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2", - "ondemand" + "0", + "1" ], "env": { "BUILDTYPE": "Debug", @@ -654,7 +654,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 2's governor to ondemand", + "name": "Enabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -664,7 +664,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -672,12 +672,56 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/usr/bin/adb.1.0.35", + "1", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 1", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -688,7 +732,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "0", + "2", "ondemand" ], "env": { @@ -698,7 +742,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to ondemand", + "name": "Set CPU 2's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json index 56a8b85170..592125e87d 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json @@ -840,9 +840,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Debug", @@ -851,7 +852,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -861,6 +862,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -868,12 +870,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -882,9 +884,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Debug", @@ -893,7 +896,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -902,21 +905,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json index 9a8ef6c86e..55ffab776c 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json @@ -762,9 +762,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Debug", @@ -773,7 +774,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -783,6 +784,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -790,12 +792,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -804,9 +806,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Debug", @@ -815,7 +818,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -824,21 +827,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json index 6508c98600..d091841ddd 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json @@ -816,9 +816,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Debug", @@ -827,7 +828,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -837,6 +838,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -844,12 +846,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -858,9 +860,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Debug", @@ -869,7 +872,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -878,21 +881,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json index 83f7dfd673..9e010c6169 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json @@ -816,9 +816,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Debug", @@ -827,7 +828,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -837,6 +838,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -844,12 +846,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -858,9 +860,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Debug", @@ -869,7 +872,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -878,21 +881,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py index 6997541c99..23c7409ee7 100644 --- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -73,32 +73,25 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): rootable_blacklist = ['GalaxyS6', 'GalaxyS7_G930A', 'GalaxyS7_G930FD', 'MotoG4', 'NVIDIA_Shield'] - # Maps device type -> cpu ids that need to be set when scaling, with the - # primary CPU being listed first. CPUs are configured together, - # for example, the Nexus 5x has cpu0-3 and cpu4-5 linked together, each - # group using the same configuration - anything that happens to cpu0, - # happens to cpu1-3. - # cpus at index 1+ will be clocked down to powersave during nanobench. - # TODO(kjlubick): determine this dynamically - should be able to look - # at which cores have the highest frequency and affected_cpus. + # Maps device type -> cpus that should be scaled for nanobench. Some devices + # have multiple of the same CPU (e.g. NexusPlayer), so we should scale all + # similar CPUs the same. cpus_to_scale = { - 'Nexus5x': [4, 0], - 'NexusPlayer': [2, 0], - 'Pixel': [2, 0], - 'Pixel2XL': [4, 0] + 'Nexus5x': [4], + 'NexusPlayer': [0, 2], + 'Pixel': [2], + 'Pixel2XL': [4] } - # Maps device -> number of cores. TODO(kjlubick) if we want to do this - # long term, compute this dynamically. - total_cpus = { - 'AndroidOne': 4, - 'Nexus5': 4, - 'Nexus7': 4, - 'Nexus5x': 6, - 'NexusPlayer': 4, - 'Pixel': 4, - 'Pixel2XL': 8, - 'PixelC': 4, + # Maps device type -> cpu ids. E.g. Nexus5x has cpu0-3 as one chip and cpu4-5 + # as the other. Thus, if one wants to run a single-threaded application, one + # can disable cpu0-3 and scale cpu 4 to have only cpu4 and 5 at the same + # frequency + disable_for_nanobench = { + 'Nexus5x': range(0, 4), + 'Pixel': range(0, 2), + 'Pixel2XL': range(0, 4), + 'PixelC': range(0, 2) } def _scale_for_dm(self): @@ -107,6 +100,9 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): self.m.vars.internal_hardware_label): return + for i in self.disable_for_nanobench.get(device, []): + self._power_cpu(i, True) # enable + for i in self.cpus_to_scale.get(device, [0]): # AndroidOne doesn't support ondemand governor. hotplug is similar. if device == 'AndroidOne': @@ -120,13 +116,12 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): self.m.vars.internal_hardware_label): return - # Scale just the first two cpus. - self._set_governor(0, 'userspace') - self._scale_cpu(0, 0.6) + for i in self.cpus_to_scale.get(device, [0]): + self._set_governor(i, 'userspace') + self._scale_cpu(i, 0.6) - for i in range(2, self.total_cpus[device]): - # NexusPlayer only has "ondemand userspace interactive performance" - self._disable_cpu(i) + for i in self.disable_for_nanobench.get(device, []): + self._power_cpu(i, False) # disable def _set_governor(self, cpu, gov): @@ -162,10 +157,15 @@ if actual_gov != gov: timeout=30) - def _disable_cpu(self, cpu): + def _power_cpu(self, cpu, enable): self._ever_ran_adb = True + value = 0 + msg = 'Disabling' + if enable: + value = 1 + msg = 'Enabling' self.m.run.with_retry(self.m.python.inline, - 'Disabling CPU %d' % cpu, + '%s CPU %d' % (msg, cpu), 3, # attempts program=""" import os @@ -174,6 +174,7 @@ import sys import time ADB = sys.argv[1] cpu = int(sys.argv[2]) +value = int(sys.argv[3]) log = subprocess.check_output([ADB, 'root']) # check for message like 'adbd cannot run as root in production builds' @@ -181,15 +182,15 @@ print log if 'cannot' in log: raise Exception('adb root failed') -subprocess.check_output([ADB, 'shell', 'echo 0 > ' - '/sys/devices/system/cpu/cpu%d/online' % cpu]) +subprocess.check_output([ADB, 'shell', 'echo %s > ' + '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)]) actual_status = subprocess.check_output([ADB, 'shell', 'cat ' '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip() if actual_status != str(0): raise Exception('(actual, expected) (%s, %d)' % (actual_gov, gov)) """, - args = [self.ADB_BINARY, cpu], + args = [self.ADB_BINARY, cpu, value], infra_step=True, timeout=30) diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json index fe15e71223..565c11a168 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json @@ -658,90 +658,6 @@ }, { "cmd": [ - "python", - "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", - "2" - ], - "env": { - "BUILDTYPE": "Debug", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/out" - }, - "infra_step": true, - "name": "Disabling CPU 2", - "timeout": 30, - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@import time@@@", - "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", - "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", - "@@@STEP_LOG_LINE@python.inline@print log@@@", - "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", - "3" - ], - "env": { - "BUILDTYPE": "Debug", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/out" - }, - "infra_step": true, - "name": "Disabling CPU 3", - "timeout": 30, - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@import time@@@", - "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", - "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", - "@@@STEP_LOG_LINE@python.inline@print log@@@", - "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ "/usr/bin/adb.1.0.35", "push", "[START_DIR]/out/Debug/nanobench", diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json index f8657e537c..790a719d05 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json @@ -578,7 +578,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "0", + "4", "userspace" ], "env": { @@ -588,7 +588,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to userspace", + "name": "Set CPU 4's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -623,7 +623,7 @@ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/opt/infra-android/tools/adb", "0.6", - "0" + "4" ], "env": { "BUILDTYPE": "Release", @@ -632,7 +632,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Scale CPU 0 to 0.600000", + "name": "Scale CPU 4 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -696,9 +696,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "2" + "0", + "0" ], "env": { "BUILDTYPE": "Release", @@ -707,7 +708,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Disabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -717,6 +718,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -724,8 +726,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", @@ -738,9 +740,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "3" + "1", + "0" ], "env": { "BUILDTYPE": "Release", @@ -749,7 +752,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Disabling CPU 1", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -759,6 +762,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -766,8 +770,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", @@ -780,9 +784,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "4" + "2", + "0" ], "env": { "BUILDTYPE": "Release", @@ -791,7 +796,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 4", + "name": "Disabling CPU 2", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -801,6 +806,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -808,8 +814,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", @@ -822,9 +828,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "5" + "3", + "0" ], "env": { "BUILDTYPE": "Release", @@ -833,7 +840,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 5", + "name": "Disabling CPU 3", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -843,6 +850,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -850,8 +858,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json index 2ad527215d..6ee0ce1b68 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android.json @@ -694,90 +694,6 @@ }, { "cmd": [ - "python", - "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", - "2" - ], - "env": { - "BUILDTYPE": "Release", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/out" - }, - "infra_step": true, - "name": "Disabling CPU 2", - "timeout": 30, - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@import time@@@", - "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", - "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", - "@@@STEP_LOG_LINE@python.inline@print log@@@", - "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", - "3" - ], - "env": { - "BUILDTYPE": "Release", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/out" - }, - "infra_step": true, - "name": "Disabling CPU 3", - "timeout": 30, - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@import time@@@", - "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", - "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", - "@@@STEP_LOG_LINE@python.inline@print log@@@", - "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ "/usr/bin/adb.1.0.35", "push", "[START_DIR]/out/Release/nanobench", diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json index 0e96e04ee5..5ec1e27a1e 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json @@ -694,90 +694,6 @@ }, { "cmd": [ - "python", - "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", - "2" - ], - "env": { - "BUILDTYPE": "Release", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/out" - }, - "infra_step": true, - "name": "Disabling CPU 2", - "timeout": 30, - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@import time@@@", - "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", - "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", - "@@@STEP_LOG_LINE@python.inline@print log@@@", - "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", - "/usr/bin/adb.1.0.35", - "3" - ], - "env": { - "BUILDTYPE": "Release", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/out" - }, - "infra_step": true, - "name": "Disabling CPU 3", - "timeout": 30, - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@import time@@@", - "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", - "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", - "@@@STEP_LOG_LINE@python.inline@print log@@@", - "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ "/usr/bin/adb.1.0.35", "push", "[START_DIR]/out/Release/nanobench", diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json index 17b09773ed..bd588a0e16 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json @@ -696,9 +696,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Release", @@ -707,7 +708,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -717,6 +718,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -724,12 +726,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -738,9 +740,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Release", @@ -749,7 +752,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -758,21 +761,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json index 23cc4b1f1d..7962b2bf15 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json @@ -696,9 +696,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Release", @@ -707,7 +708,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -717,6 +718,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -724,12 +726,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -738,9 +740,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Release", @@ -749,7 +752,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -758,21 +761,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json index c5debd25d9..ebf17f4573 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json @@ -696,9 +696,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "0", + "0" ], "env": { "BUILDTYPE": "Release", @@ -707,7 +708,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Disabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -717,6 +718,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -724,8 +726,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", @@ -738,9 +740,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "3" + "1", + "0" ], "env": { "BUILDTYPE": "Release", @@ -749,7 +752,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Disabling CPU 1", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -759,6 +762,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -766,8 +770,8 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", diff --git a/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json b/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json index 8350a207f1..14d842ec3f 100644 --- a/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json +++ b/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json @@ -738,9 +738,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2" + "2", + "userspace" ], "env": { "BUILDTYPE": "Debug", @@ -749,7 +750,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 2", + "name": "Set CPU 2's governor to userspace", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -759,6 +760,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -766,12 +768,12 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -780,9 +782,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu%d/online' % cpu])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", "/usr/bin/adb.1.0.35", - "3" + "0.6", + "2" ], "env": { "BUILDTYPE": "Debug", @@ -791,7 +794,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Disabling CPU 3", + "name": "Scale CPU 2 to 0.600000", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -800,21 +803,54 @@ "@@@STEP_LOG_LINE@python.inline@import sys@@@", "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@target_percent = float(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", "@@@STEP_LOG_LINE@python.inline@print log@@@", "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# All devices we test on give a list of their available frequencies.@@@", + "@@@STEP_LOG_LINE@python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@", + "@@@STEP_LOG_LINE@python.inline@ 'cat %s/scaling_available_frequencies' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# Check for message like '/system/bin/sh: file not found'@@@", + "@@@STEP_LOG_LINE@python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs = sorted(@@@", + "@@@STEP_LOG_LINE@python.inline@ int(i) for i in available_freqs.strip().split())@@@", + "@@@STEP_LOG_LINE@python.inline@else:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('Could not get list of available frequencies: %s' %@@@", + "@@@STEP_LOG_LINE@python.inline@ available_freqs)@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@maxfreq = available_freqs[-1]@@@", + "@@@STEP_LOG_LINE@python.inline@target = int(round(maxfreq * target_percent))@@@", + "@@@STEP_LOG_LINE@python.inline@freq = maxfreq@@@", + "@@@STEP_LOG_LINE@python.inline@for f in reversed(available_freqs):@@@", + "@@@STEP_LOG_LINE@python.inline@ if f <= target:@@@", + "@@@STEP_LOG_LINE@python.inline@ freq = f@@@", + "@@@STEP_LOG_LINE@python.inline@ break@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@print 'Setting frequency to %d' % freq@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@", + "@@@STEP_LOG_LINE@python.inline@# We must set min first, because if we try to set max to be less than min@@@", + "@@@STEP_LOG_LINE@python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@", + "@@@STEP_LOG_LINE@python.inline@# perplexing permissions error.@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_min_freq' % root])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_max_freq' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_setspeed' % (freq, root)])@@@", + "@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@", + "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '%s/scaling_cur_freq' % root]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_freq != str(freq):@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", "@@@STEP_LOG_END@python.inline@@@" ] }, diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json index 882e404514..509e15838e 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android_NoGPUThreads.json @@ -657,10 +657,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "4", - "ondemand" + "0", + "1" ], "env": { "BUILDTYPE": "Debug", @@ -669,7 +669,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 4's governor to ondemand", + "name": "Enabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -679,7 +679,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -687,12 +687,144 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/opt/infra-android/tools/adb", + "1", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 1", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/opt/infra-android/tools/adb", + "2", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 2", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/opt/infra-android/tools/adb", + "3", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 3", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -703,7 +835,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/opt/infra-android/tools/adb", - "0", + "4", "ondemand" ], "env": { @@ -713,7 +845,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to ondemand", + "name": "Set CPU 4's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json index 8f84cf3f49..34708515e5 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json @@ -659,7 +659,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2", + "0", "ondemand" ], "env": { @@ -669,7 +669,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 2's governor to ondemand", + "name": "Set CPU 0's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -703,7 +703,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "0", + "2", "ondemand" ], "env": { @@ -713,7 +713,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to ondemand", + "name": "Set CPU 2's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json index 0a813f8877..358efb1873 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json @@ -659,7 +659,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2", + "0", "ondemand" ], "env": { @@ -669,7 +669,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 2's governor to ondemand", + "name": "Set CPU 0's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -703,7 +703,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "0", + "2", "ondemand" ], "env": { @@ -713,7 +713,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to ondemand", + "name": "Set CPU 2's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json index 129ba430cf..ae363996da 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json @@ -657,10 +657,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2", - "ondemand" + "0", + "1" ], "env": { "BUILDTYPE": "Debug", @@ -669,7 +669,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 2's governor to ondemand", + "name": "Enabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -679,7 +679,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -687,12 +687,56 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/usr/bin/adb.1.0.35", + "1", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 1", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -703,7 +747,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "0", + "2", "ondemand" ], "env": { @@ -713,7 +757,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to ondemand", + "name": "Set CPU 2's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json index 7e00ea6af5..6b398b1a19 100644 --- a/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json +++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json @@ -657,10 +657,10 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "2", - "ondemand" + "0", + "1" ], "env": { "BUILDTYPE": "Debug", @@ -669,7 +669,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 2's governor to ondemand", + "name": "Enabling CPU 0", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", @@ -679,7 +679,7 @@ "@@@STEP_LOG_LINE@python.inline@import time@@@", "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", - "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", @@ -687,12 +687,56 @@ "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", - "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", + "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(0):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_gov, gov))\n", + "/usr/bin/adb.1.0.35", + "1", + "1" + ], + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "Enabling CPU 1", + "timeout": 30, + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@import time@@@", + "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", + "@@@STEP_LOG_LINE@python.inline@value = int(sys.argv[3])@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", + "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", + "@@@STEP_LOG_LINE@python.inline@print log@@@", + "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@", + "@@@STEP_LOG_LINE@python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@", + "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@", + "@@@STEP_LOG_LINE@python.inline@if actual_status != str(0):@@@", + "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %d)'@@@", "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", "@@@STEP_LOG_END@python.inline@@@" ] @@ -703,7 +747,7 @@ "-u", "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", "/usr/bin/adb.1.0.35", - "0", + "2", "ondemand" ], "env": { @@ -713,7 +757,7 @@ "SKIA_OUT": "[START_DIR]/out" }, "infra_step": true, - "name": "Set CPU 0's governor to ondemand", + "name": "Set CPU 2's governor to ondemand", "timeout": 30, "~followup_annotations": [ "@@@STEP_LOG_LINE@python.inline@@@@", |