mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf tests: Make attr script verbose friendly
Making the attr test script runner to pass proper verbose option. Also making single '-v' be more reader friendly and display just the test name. Making the current output to be display for '-vv'. Signed-off-by: Jiri Olsa <[email protected]> Cc: Corey Ashford <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
66857b5a8b
commit
097c87582c
2 changed files with 9 additions and 4 deletions
|
|
@ -147,10 +147,15 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
|
|||
|
||||
static int run_dir(const char *d, const char *perf)
|
||||
{
|
||||
char v[] = "-vvvvv";
|
||||
int vcnt = min(verbose, (int) sizeof(v) - 1);
|
||||
char cmd[3*PATH_MAX];
|
||||
|
||||
snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %s",
|
||||
d, d, perf, verbose ? "-v" : "");
|
||||
if (verbose)
|
||||
vcnt++;
|
||||
|
||||
snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s",
|
||||
d, d, perf, vcnt, v);
|
||||
|
||||
return system(cmd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class Test(object):
|
|||
parser = ConfigParser.SafeConfigParser()
|
||||
parser.read(path)
|
||||
|
||||
log.debug("running '%s'" % path)
|
||||
log.warning("running '%s'" % path)
|
||||
|
||||
self.path = path
|
||||
self.test_dir = options.test_dir
|
||||
|
|
@ -172,7 +172,7 @@ class Test(object):
|
|||
self.perf, self.command, tempdir, self.args)
|
||||
ret = os.WEXITSTATUS(os.system(cmd))
|
||||
|
||||
log.warning(" running '%s' ret %d " % (cmd, ret))
|
||||
log.info(" '%s' ret %d " % (cmd, ret))
|
||||
|
||||
if ret != int(self.ret):
|
||||
raise Unsup(self)
|
||||
|
|
|
|||
Loading…
Reference in a new issue