aboutsummaryrefslogtreecommitdiff
path: root/crosperf/results_cache_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'crosperf/results_cache_unittest.py')
-rwxr-xr-xcrosperf/results_cache_unittest.py319
1 files changed, 250 insertions, 69 deletions
diff --git a/crosperf/results_cache_unittest.py b/crosperf/results_cache_unittest.py
index 1e7f04a1..91ceed22 100755
--- a/crosperf/results_cache_unittest.py
+++ b/crosperf/results_cache_unittest.py
@@ -21,6 +21,8 @@ import test_flag
from label import MockLabel
from results_cache import CacheConditions
+from results_cache import PerfDataReadError
+from results_cache import PidVerificationError
from results_cache import Result
from results_cache import ResultsCache
from results_cache import TelemetryResult
@@ -158,6 +160,34 @@ keyvals = {
'b_string_strstr___abcdefghijklmnopqrstuvwxyz__': '0.0134553343333'
}
+PERF_DATA_HEADER = """
+# ========
+# captured on : Thu Jan 01 00:00:00 1980
+# header version : 1
+# data offset : 536
+# data size : 737678672
+# feat offset : 737679208
+# hostname : localhost
+# os release : 5.4.61
+# perf version :
+# arch : aarch64
+# nrcpus online : 8
+# nrcpus avail : 8
+# total memory : 5911496 kB
+# cmdline : /usr/bin/perf record -e instructions -p {pid}
+# event : name = instructions, , id = ( 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193 ), type = 8, size = 112
+# event : name = dummy:u, , id = ( 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204 ), type = 1, size = 112, config = 0x9
+# CPU_TOPOLOGY info available, use -I to display
+# pmu mappings: software = 1, uprobe = 6, cs_etm = 8, breakpoint = 5, tracepoint = 2, armv8_pmuv3 = 7
+# contains AUX area data (e.g. instruction trace)
+# time of first sample : 0.000000
+# time of last sample : 0.000000
+# sample duration : 0.000 ms
+# missing features: TRACING_DATA CPUDESC CPUID NUMA_TOPOLOGY BRANCH_STACK GROUP_DESC STAT CACHE MEM_TOPOLOGY CLOCKID DIR_FORMAT
+# ========
+#
+"""
+
TURBOSTAT_LOG_OUTPUT = \
"""CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IRQ CoreTmp
- 329 12.13 2723 2393 10975 77
@@ -223,40 +253,52 @@ TOP_LOG = \
"""
TOP_DATA = [
{
- 'cmd': 'chrome',
- 'cpu_avg': 124.75,
+ 'cmd': 'chrome-5745',
+ 'cpu_use_avg': 115.35,
'count': 2,
- 'top5': [125.7, 123.8],
+ 'top5_cpu_use': [122.8, 107.9],
},
{
- 'cmd': 'irq/cros-ec',
- 'cpu_avg': 1.0,
+ 'cmd': 'chrome-5713',
+ 'cpu_use_avg': 8.9,
'count': 1,
- 'top5': [2.0],
+ 'top5_cpu_use': [17.8]
},
{
- 'cmd': 'spi5',
- 'cpu_avg': 0.5,
+ 'cmd': 'irq/cros-ec-912',
+ 'cpu_use_avg': 1.0,
'count': 1,
- 'top5': [1.0],
+ 'top5_cpu_use': [2.0],
},
{
- 'cmd': 'sshd',
- 'cpu_avg': 0.5,
+ 'cmd': 'chrome-5205',
+ 'cpu_use_avg': 0.5,
'count': 1,
- 'top5': [1.0],
+ 'top5_cpu_use': [1.0]
},
{
- 'cmd': 'rcu_preempt',
- 'cpu_avg': 0.5,
+ 'cmd': 'spi5-121',
+ 'cpu_use_avg': 0.5,
'count': 1,
- 'top5': [1.0],
+ 'top5_cpu_use': [1.0],
},
{
- 'cmd': 'kworker/4:2',
- 'cpu_avg': 0.5,
+ 'cmd': 'sshd-4811',
+ 'cpu_use_avg': 0.5,
'count': 1,
- 'top5': [1.0],
+ 'top5_cpu_use': [1.0],
+ },
+ {
+ 'cmd': 'rcu_preempt-7',
+ 'cpu_use_avg': 0.5,
+ 'count': 1,
+ 'top5_cpu_use': [1.0],
+ },
+ {
+ 'cmd': 'kworker/4:2-855',
+ 'cpu_use_avg': 0.5,
+ 'count': 1,
+ 'top5_cpu_use': [1.0],
},
]
TOP_OUTPUT = \
@@ -433,6 +475,7 @@ class ResultTest(unittest.TestCase):
self.callGetTurbostatFile = False
self.callGetCpustatsFile = False
self.callGetTopFile = False
+ self.callGetCpuinfoFile = False
self.callGetWaitTimeFile = False
self.args = None
self.callGatherPerfResults = False
@@ -457,6 +500,7 @@ class ResultTest(unittest.TestCase):
def setUp(self):
self.result = Result(self.mock_logger, self.mock_label, 'average',
self.mock_cmd_exec)
+ self.result.chromeos_root = '/tmp/chromeos'
@mock.patch.object(os.path, 'isdir')
@mock.patch.object(command_executer.CommandExecuter, 'RunCommand')
@@ -501,6 +545,9 @@ class ResultTest(unittest.TestCase):
@mock.patch.object(Result, 'CopyFilesTo')
def test_copy_results_to(self, mockCopyFilesTo):
+ results_file = [
+ '/tmp/result.json.0', '/tmp/result.json.1', '/tmp/result.json.2'
+ ]
perf_data_files = [
'/tmp/perf.data.0', '/tmp/perf.data.1', '/tmp/perf.data.2'
]
@@ -508,16 +555,19 @@ class ResultTest(unittest.TestCase):
'/tmp/perf.report.0', '/tmp/perf.report.1', '/tmp/perf.report.2'
]
+ self.result.results_file = results_file
self.result.perf_data_files = perf_data_files
self.result.perf_report_files = perf_report_files
self.result.CopyFilesTo = mockCopyFilesTo
self.result.CopyResultsTo('/tmp/results/')
- self.assertEqual(mockCopyFilesTo.call_count, 2)
- self.assertEqual(len(mockCopyFilesTo.call_args_list), 2)
+ self.assertEqual(mockCopyFilesTo.call_count, 3)
+ self.assertEqual(len(mockCopyFilesTo.call_args_list), 3)
self.assertEqual(mockCopyFilesTo.call_args_list[0][0],
- ('/tmp/results/', perf_data_files))
+ ('/tmp/results/', results_file))
self.assertEqual(mockCopyFilesTo.call_args_list[1][0],
+ ('/tmp/results/', perf_data_files))
+ self.assertEqual(mockCopyFilesTo.call_args_list[2][0],
('/tmp/results/', perf_report_files))
def test_get_new_keyvals(self):
@@ -688,7 +738,8 @@ class ResultTest(unittest.TestCase):
self.assertEqual(mock_chrootruncmd.call_count, 1)
self.assertEqual(
mock_chrootruncmd.call_args_list[0][0],
- ('/tmp', ('./generate_test_report --no-color --csv %s') % TMP_DIR1))
+ (self.result.chromeos_root,
+ ('./generate_test_report --no-color --csv %s') % TMP_DIR1))
self.assertEqual(mock_getpath.call_count, 1)
self.assertEqual(mock_mkdtemp.call_count, 1)
self.assertEqual(res, {'Total': [10, 'score'], 'first_time': [680, 'ms']})
@@ -861,6 +912,15 @@ class ResultTest(unittest.TestCase):
self.assertEqual(found_no_logs, '')
@mock.patch.object(command_executer.CommandExecuter, 'RunCommandWOutput')
+ def test_get_cpuinfo_file_finds_single_log(self, mock_runcmd):
+ """Expected behavior when a single cpuinfo file found."""
+ self.result.results_dir = '/tmp/test_results'
+ self.result.ce.RunCommandWOutput = mock_runcmd
+ mock_runcmd.return_value = (0, 'some/long/path/cpuinfo.log', '')
+ found_single_log = self.result.GetCpuinfoFile()
+ self.assertEqual(found_single_log, 'some/long/path/cpuinfo.log')
+
+ @mock.patch.object(command_executer.CommandExecuter, 'RunCommandWOutput')
def test_get_cpustats_file_finds_single_log(self, mock_runcmd):
"""Expected behavior when a single log file found."""
self.result.results_dir = '/tmp/test_results'
@@ -888,6 +948,101 @@ class ResultTest(unittest.TestCase):
found_no_logs = self.result.GetCpustatsFile()
self.assertEqual(found_no_logs, '')
+ def test_verify_perf_data_pid_ok(self):
+ """Verify perf PID which is present in TOP_DATA."""
+ self.result.top_cmds = TOP_DATA
+ # pid is present in TOP_DATA.
+ with mock.patch.object(
+ Result, 'ReadPidFromPerfData', return_value=['5713']):
+ self.result.VerifyPerfDataPID()
+
+ def test_verify_perf_data_pid_fail(self):
+ """Test perf PID missing in top raises the error."""
+ self.result.top_cmds = TOP_DATA
+ # pid is not in the list of top processes.
+ with mock.patch.object(
+ Result, 'ReadPidFromPerfData', return_value=['9999']):
+ with self.assertRaises(PidVerificationError):
+ self.result.VerifyPerfDataPID()
+
+ @mock.patch.object(command_executer.CommandExecuter,
+ 'ChrootRunCommandWOutput')
+ def test_read_pid_from_perf_data_ok(self, mock_runcmd):
+ """Test perf header parser, normal flow."""
+ self.result.ce.ChrootRunCommandWOutput = mock_runcmd
+ self.result.perf_data_files = ['/tmp/chromeos/chroot/tmp/results/perf.data']
+ exp_pid = '12345'
+ mock_runcmd.return_value = (0, PERF_DATA_HEADER.format(pid=exp_pid), '')
+ pids = self.result.ReadPidFromPerfData()
+ self.assertEqual(pids, [exp_pid])
+
+ @mock.patch.object(command_executer.CommandExecuter,
+ 'ChrootRunCommandWOutput')
+ def test_read_pid_from_perf_data_mult_profiles(self, mock_runcmd):
+ """Test multiple perf.data files with PID."""
+ self.result.ce.ChrootRunCommandWOutput = mock_runcmd
+ # self.result.chromeos_root = '/tmp/chromeos'
+ self.result.perf_data_files = [
+ '/tmp/chromeos/chroot/tmp/results/perf.data.0',
+ '/tmp/chromeos/chroot/tmp/results/perf.data.1',
+ ]
+ # There is '-p <pid>' in command line but it's still system-wide: '-a'.
+ cmd_line = '# cmdline : /usr/bin/perf record -e instructions -p {pid}'
+ exp_perf_pids = ['1111', '2222']
+ mock_runcmd.side_effect = [
+ (0, cmd_line.format(pid=exp_perf_pids[0]), ''),
+ (0, cmd_line.format(pid=exp_perf_pids[1]), ''),
+ ]
+ pids = self.result.ReadPidFromPerfData()
+ self.assertEqual(pids, exp_perf_pids)
+
+ @mock.patch.object(command_executer.CommandExecuter,
+ 'ChrootRunCommandWOutput')
+ def test_read_pid_from_perf_data_no_pid(self, mock_runcmd):
+ """Test perf.data without PID."""
+ self.result.ce.ChrootRunCommandWOutput = mock_runcmd
+ self.result.perf_data_files = ['/tmp/chromeos/chroot/tmp/results/perf.data']
+ cmd_line = '# cmdline : /usr/bin/perf record -e instructions'
+ mock_runcmd.return_value = (0, cmd_line, '')
+ pids = self.result.ReadPidFromPerfData()
+ # pids is empty.
+ self.assertEqual(pids, [])
+
+ @mock.patch.object(command_executer.CommandExecuter,
+ 'ChrootRunCommandWOutput')
+ def test_read_pid_from_perf_data_system_wide(self, mock_runcmd):
+ """Test reading from system-wide profile with PID."""
+ self.result.ce.ChrootRunCommandWOutput = mock_runcmd
+ self.result.perf_data_files = ['/tmp/chromeos/chroot/tmp/results/perf.data']
+ # There is '-p <pid>' in command line but it's still system-wide: '-a'.
+ cmd_line = '# cmdline : /usr/bin/perf record -e instructions -a -p 1234'
+ mock_runcmd.return_value = (0, cmd_line, '')
+ pids = self.result.ReadPidFromPerfData()
+ # pids should be empty since it's not a per-process profiling.
+ self.assertEqual(pids, [])
+
+ @mock.patch.object(command_executer.CommandExecuter,
+ 'ChrootRunCommandWOutput')
+ def test_read_pid_from_perf_data_read_fail(self, mock_runcmd):
+ """Failure to read perf.data raises the error."""
+ self.result.ce.ChrootRunCommandWOutput = mock_runcmd
+ self.result.perf_data_files = ['/tmp/chromeos/chroot/tmp/results/perf.data']
+ # Error status of the profile read.
+ mock_runcmd.return_value = (1, '', '')
+ with self.assertRaises(PerfDataReadError):
+ self.result.ReadPidFromPerfData()
+
+ @mock.patch.object(command_executer.CommandExecuter,
+ 'ChrootRunCommandWOutput')
+ def test_read_pid_from_perf_data_fail(self, mock_runcmd):
+ """Failure to find cmdline in perf.data header raises the error."""
+ self.result.ce.ChrootRunCommandWOutput = mock_runcmd
+ self.result.perf_data_files = ['/tmp/chromeos/chroot/tmp/results/perf.data']
+ # Empty output.
+ mock_runcmd.return_value = (0, '', '')
+ with self.assertRaises(PerfDataReadError):
+ self.result.ReadPidFromPerfData()
+
def test_process_turbostat_results_with_valid_data(self):
"""Normal case when log exists and contains valid data."""
self.result.turbostat_log_file = '/tmp/somelogfile.log'
@@ -988,69 +1143,84 @@ class ResultTest(unittest.TestCase):
mo.assert_has_calls(calls)
self.assertEqual(topcalls, [])
- def test_format_string_top5_cmds(self):
- """Test formatted string with top5 commands."""
+ def test_format_string_top_cmds(self):
+ """Test formatted string with top commands."""
self.result.top_cmds = [
{
- 'cmd': 'chrome',
- 'cpu_avg': 119.753453465,
+ 'cmd': 'chrome-111',
+ 'cpu_use_avg': 119.753453465,
'count': 44444,
- 'top5': [222.8, 217.9, 217.8, 191.0, 189.9],
+ 'top5_cpu_use': [222.8, 217.9, 217.8, 191.0, 189.9],
+ },
+ {
+ 'cmd': 'chrome-222',
+ 'cpu_use_avg': 100,
+ 'count': 33333,
+ 'top5_cpu_use': [200.0, 195.0, 190.0, 185.0, 180.0],
},
{
'cmd': 'irq/230-cros-ec',
- 'cpu_avg': 10.000000000000001,
+ 'cpu_use_avg': 10.000000000000001,
'count': 1000,
- 'top5': [11.5, 11.4, 11.3, 11.2, 11.1],
+ 'top5_cpu_use': [11.5, 11.4, 11.3, 11.2, 11.1],
},
{
'cmd': 'powerd',
- 'cpu_avg': 2.0,
+ 'cpu_use_avg': 2.0,
'count': 2,
- 'top5': [3.0, 1.0]
+ 'top5_cpu_use': [3.0, 1.0]
},
{
- 'cmd': 'cmd1',
- 'cpu_avg': 1.0,
+ 'cmd': 'cmd3',
+ 'cpu_use_avg': 1.0,
'count': 1,
- 'top5': [1.0],
+ 'top5_cpu_use': [1.0],
},
{
- 'cmd': 'cmd2',
- 'cpu_avg': 1.0,
+ 'cmd': 'cmd4',
+ 'cpu_use_avg': 1.0,
'count': 1,
- 'top5': [1.0],
+ 'top5_cpu_use': [1.0],
},
{
- 'cmd': 'not_for_print',
+ 'cmd': 'cmd5',
+ 'cpu_use_avg': 1.0,
+ 'count': 1,
+ 'top5_cpu_use': [1.0],
+ },
+ {
+ 'cmd': 'cmd6_not_for_print',
'cpu_avg': 1.0,
'count': 1,
'top5': [1.0],
},
]
- form_str = self.result.FormatStringTop5()
+ form_str = self.result.FormatStringTopCommands()
self.assertEqual(
form_str, '\n'.join([
- 'Top 5 commands with highest CPU usage:',
+ 'Top commands with highest CPU usage:',
' COMMAND AVG CPU% COUNT HIGHEST 5',
'-' * 50,
- ' chrome 119.75 44444 '
+ ' chrome-111 119.75 44444 '
'[222.8, 217.9, 217.8, 191.0, 189.9]',
+ ' chrome-222 100.00 33333 '
+ '[200.0, 195.0, 190.0, 185.0, 180.0]',
' irq/230-cros-ec 10.00 1000 '
'[11.5, 11.4, 11.3, 11.2, 11.1]',
' powerd 2.00 2 [3.0, 1.0]',
- ' cmd1 1.00 1 [1.0]',
- ' cmd2 1.00 1 [1.0]',
+ ' cmd3 1.00 1 [1.0]',
+ ' cmd4 1.00 1 [1.0]',
+ ' cmd5 1.00 1 [1.0]',
'-' * 50,
]))
- def test_format_string_top5_calls_no_data(self):
- """Test formatted string of top5 with no data."""
+ def test_format_string_top_calls_no_data(self):
+ """Test formatted string of top with no data."""
self.result.top_cmds = []
- form_str = self.result.FormatStringTop5()
+ form_str = self.result.FormatStringTopCommands()
self.assertEqual(
form_str, '\n'.join([
- 'Top 5 commands with highest CPU usage:',
+ 'Top commands with highest CPU usage:',
' COMMAND AVG CPU% COUNT HIGHEST 5',
'-' * 50,
'[NO DATA FROM THE TOP LOG]',
@@ -1069,10 +1239,11 @@ class ResultTest(unittest.TestCase):
# Debug path not found
self.result.label.debug_path = ''
tmp = self.result.GeneratePerfReportFiles()
- self.assertEqual(tmp, ['/tmp/chroot%s' % fake_file])
+ self.assertEqual(tmp, ['/tmp/chromeos/chroot%s' % fake_file])
self.assertEqual(mock_chrootruncmd.call_args_list[0][0],
- ('/tmp', ('/usr/sbin/perf report -n '
- '-i %s --stdio > %s') % (fake_file, fake_file)))
+ (self.result.chromeos_root,
+ ('/usr/sbin/perf report -n '
+ '-i %s --stdio > %s') % (fake_file, fake_file)))
@mock.patch.object(misc, 'GetInsideChrootPath')
@mock.patch.object(command_executer.CommandExecuter, 'ChrootRunCommand')
@@ -1087,11 +1258,12 @@ class ResultTest(unittest.TestCase):
# Debug path found
self.result.label.debug_path = '/tmp/debug'
tmp = self.result.GeneratePerfReportFiles()
- self.assertEqual(tmp, ['/tmp/chroot%s' % fake_file])
+ self.assertEqual(tmp, ['/tmp/chromeos/chroot%s' % fake_file])
self.assertEqual(mock_chrootruncmd.call_args_list[0][0],
- ('/tmp', ('/usr/sbin/perf report -n --symfs /tmp/debug '
- '--vmlinux /tmp/debug/boot/vmlinux '
- '-i %s --stdio > %s') % (fake_file, fake_file)))
+ (self.result.chromeos_root,
+ ('/usr/sbin/perf report -n --symfs /tmp/debug '
+ '--vmlinux /tmp/debug/boot/vmlinux '
+ '-i %s --stdio > %s') % (fake_file, fake_file)))
@mock.patch.object(misc, 'GetOutsideChrootPath')
def test_populate_from_run(self, mock_getpath):
@@ -1124,6 +1296,10 @@ class ResultTest(unittest.TestCase):
self.callGetTopFile = True
return []
+ def FakeGetCpuinfoFile():
+ self.callGetCpuinfoFile = True
+ return []
+
def FakeGetWaitTimeFile():
self.callGetWaitTimeFile = True
return []
@@ -1136,7 +1312,6 @@ class ResultTest(unittest.TestCase):
if mock_getpath:
pass
mock.get_path = '/tmp/chromeos/tmp/results_dir'
- self.result.chromeos_root = '/tmp/chromeos'
self.callGetResultsDir = False
self.callGetResultsFile = False
@@ -1145,6 +1320,7 @@ class ResultTest(unittest.TestCase):
self.callGetTurbostatFile = False
self.callGetCpustatsFile = False
self.callGetTopFile = False
+ self.callGetCpuinfoFile = False
self.callGetWaitTimeFile = False
self.callProcessResults = False
@@ -1155,6 +1331,7 @@ class ResultTest(unittest.TestCase):
self.result.GetTurbostatFile = FakeGetTurbostatFile
self.result.GetCpustatsFile = FakeGetCpustatsFile
self.result.GetTopFile = FakeGetTopFile
+ self.result.GetCpuinfoFile = FakeGetCpuinfoFile
self.result.GetWaitTimeFile = FakeGetWaitTimeFile
self.result.ProcessResults = FakeProcessResults
@@ -1167,6 +1344,7 @@ class ResultTest(unittest.TestCase):
self.assertTrue(self.callGetTurbostatFile)
self.assertTrue(self.callGetCpustatsFile)
self.assertTrue(self.callGetTopFile)
+ self.assertTrue(self.callGetCpuinfoFile)
self.assertTrue(self.callGetWaitTimeFile)
self.assertTrue(self.callProcessResults)
@@ -1403,8 +1581,7 @@ class ResultTest(unittest.TestCase):
u'crypto-md5__crypto-md5': [10.5, u'ms'],
u'string-tagcloud__string-tagcloud': [52.8, u'ms'],
u'access-nbody__access-nbody': [8.5, u'ms'],
- 'retval':
- 0,
+ 'retval': 0,
u'math-spectral-norm__math-spectral-norm': [6.6, u'ms'],
u'math-cordic__math-cordic': [8.7, u'ms'],
u'access-binary-trees__access-binary-trees': [4.5, u'ms'],
@@ -1442,8 +1619,7 @@ class ResultTest(unittest.TestCase):
u'crypto-md5__crypto-md5': [10.5, u'ms'],
u'string-tagcloud__string-tagcloud': [52.8, u'ms'],
u'access-nbody__access-nbody': [8.5, u'ms'],
- 'retval':
- 0,
+ 'retval': 0,
u'math-spectral-norm__math-spectral-norm': [6.6, u'ms'],
u'math-cordic__math-cordic': [8.7, u'ms'],
u'access-binary-trees__access-binary-trees': [4.5, u'ms'],
@@ -1672,8 +1848,9 @@ class TelemetryResultTest(unittest.TestCase):
'autotest_dir', 'debug_dir', '/tmp', 'lumpy',
'remote', 'image_args', 'cache_dir', 'average',
'gcc', False, None)
- self.mock_machine = machine_manager.MockCrosMachine(
- 'falco.cros', '/tmp/chromeos', 'average')
+ self.mock_machine = machine_manager.MockCrosMachine('falco.cros',
+ '/tmp/chromeos',
+ 'average')
def test_populate_from_run(self):
@@ -1753,10 +1930,12 @@ class ResultsCacheTest(unittest.TestCase):
def FakeGetMachines(label):
if label:
pass
- m1 = machine_manager.MockCrosMachine(
- 'lumpy1.cros', self.results_cache.chromeos_root, 'average')
- m2 = machine_manager.MockCrosMachine(
- 'lumpy2.cros', self.results_cache.chromeos_root, 'average')
+ m1 = machine_manager.MockCrosMachine('lumpy1.cros',
+ self.results_cache.chromeos_root,
+ 'average')
+ m2 = machine_manager.MockCrosMachine('lumpy2.cros',
+ self.results_cache.chromeos_root,
+ 'average')
return [m1, m2]
mock_checksum.return_value = 'FakeImageChecksumabc123'
@@ -1798,10 +1977,12 @@ class ResultsCacheTest(unittest.TestCase):
def FakeGetMachines(label):
if label:
pass
- m1 = machine_manager.MockCrosMachine(
- 'lumpy1.cros', self.results_cache.chromeos_root, 'average')
- m2 = machine_manager.MockCrosMachine(
- 'lumpy2.cros', self.results_cache.chromeos_root, 'average')
+ m1 = machine_manager.MockCrosMachine('lumpy1.cros',
+ self.results_cache.chromeos_root,
+ 'average')
+ m2 = machine_manager.MockCrosMachine('lumpy2.cros',
+ self.results_cache.chromeos_root,
+ 'average')
return [m1, m2]
mock_checksum.return_value = 'FakeImageChecksumabc123'