Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1692625
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf tests attr: Rename compare_data to data_equal |
| Date | Thu, 20 Jul 2017 11:00:05 +0200 |
| Message-ID | <u5ftr-4U4-87@gated-at.bofh.it> (permalink) |
| References | <tZaZu-2UC-97@gated-at.bofh.it> |
| Reply-To | jolsa@kernel.org, hpa@zytor.com, tmricht@linux.vnet.ibm.com, acme@redhat.com, mingo@kernel.org, namhyung@kernel.org, tglx@linutronix.de, a.p.zijlstra@chello.nl, dsahern@gmail.com, linux-kernel@vger.kernel.org |
| Git-Commit-ID | dde622a5063c71a1864a41dfaed4baaabfa84ba6 |
| X-Mailer | tip-git-log-daemon |
| Robot-ID | <tip-bot.git.kernel.org> |
| Robot-Unsubscribe | Contact <mailto:hpa@kernel.org> to get blacklisted from these emails |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 8bit |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Disposition | inline |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 63 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | hpa@zytor.com, jolsa@kernel.org, tmricht@linux.vnet.ibm.com, mingo@kernel.org, acme@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, a.p.zijlstra@chello.nl, dsahern@gmail.com |
| X-Original-Date | Thu, 20 Jul 2017 01:52:13 -0700 |
| X-Original-Message-ID | <tip-dde622a5063c71a1864a41dfaed4baaabfa84ba6@git.kernel.org> |
| X-Original-References | <20170703145030.12903-6-jolsa@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1692625 |
Show key headers only | View raw
Commit-ID: dde622a5063c71a1864a41dfaed4baaabfa84ba6
Gitweb: http://git.kernel.org/tip/dde622a5063c71a1864a41dfaed4baaabfa84ba6
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 3 Jul 2017 16:50:20 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 18 Jul 2017 23:14:16 -0300
perf tests attr: Rename compare_data to data_equal
The data_equal name fits better to the return value of the function.
It's true when the data is equal.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20170703145030.12903-6-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/attr.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/tests/attr.py b/tools/perf/tests/attr.py
index bb671cd..b03261c 100644
--- a/tools/perf/tests/attr.py
+++ b/tools/perf/tests/attr.py
@@ -9,7 +9,7 @@ import logging
import shutil
import ConfigParser
-def compare_data(a, b):
+def data_equal(a, b):
# Allow multiple values in assignment separated by '|'
a_list = a.split('|')
b_list = b.split('|')
@@ -101,7 +101,7 @@ class Event(dict):
log.debug(" [%s] %s %s" % (t, self[t], other[t]));
if not self.has_key(t) or not other.has_key(t):
return False
- if not compare_data(self[t], other[t]):
+ if not data_equal(self[t], other[t]):
return False
return True
@@ -109,7 +109,7 @@ class Event(dict):
for t in Event.terms:
if not self.has_key(t) or not other.has_key(t):
continue
- if not compare_data(self[t], other[t]):
+ if not data_equal(self[t], other[t]):
log.warning("expected %s=%s, got %s" % (t, self[t], other[t]))
# Test file description needs to have following sections:
@@ -220,7 +220,7 @@ class Test(object):
log.info(" '%s' ret '%s', expected '%s'" % (cmd, str(ret), str(self.ret)))
- if not compare_data(str(ret), str(self.ret)):
+ if not data_equal(str(ret), str(self.ret)):
raise Unsup(self)
def compare(self, expect, result):
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[tip:perf/core] perf tests attr: Rename compare_data to data_equal tip-bot for Jiri Olsa <tipbot@zytor.com> - 2017-07-20 11:00 +0200
csiph-web