aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/attr.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/attr.py')
-rw-r--r--tools/perf/tests/attr.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/tests/attr.py b/tools/perf/tests/attr.py
index 6bb50e82a3e3..a13cd780148e 100644
--- a/tools/perf/tests/attr.py
+++ b/tools/perf/tests/attr.py
@@ -237,6 +237,7 @@ class Test(object):
237 # events in result. Fail if there's not any. 237 # events in result. Fail if there's not any.
238 for exp_name, exp_event in expect.items(): 238 for exp_name, exp_event in expect.items():
239 exp_list = [] 239 exp_list = []
240 res_event = {}
240 log.debug(" matching [%s]" % exp_name) 241 log.debug(" matching [%s]" % exp_name)
241 for res_name, res_event in result.items(): 242 for res_name, res_event in result.items():
242 log.debug(" to [%s]" % res_name) 243 log.debug(" to [%s]" % res_name)
@@ -253,7 +254,10 @@ class Test(object):
253 if exp_event.optional(): 254 if exp_event.optional():
254 log.debug(" %s does not match, but is optional" % exp_name) 255 log.debug(" %s does not match, but is optional" % exp_name)
255 else: 256 else:
256 exp_event.diff(res_event) 257 if not res_event:
258 log.debug(" res_event is empty");
259 else:
260 exp_event.diff(res_event)
257 raise Fail(self, 'match failure'); 261 raise Fail(self, 'match failure');
258 262
259 match[exp_name] = exp_list 263 match[exp_name] = exp_list