Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 097c8758 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1361785972-7431-3-git-send-email-jolsa@redhat.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 66857b5a
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -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)
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];
	char cmd[3*PATH_MAX];


	snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %s",
	if (verbose)
		 d, d, perf, verbose ? "-v" : "");
		vcnt++;

	snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s",
		 d, d, perf, vcnt, v);


	return system(cmd);
	return system(cmd);
}
}
+2 −2
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ class Test(object):
        parser = ConfigParser.SafeConfigParser()
        parser = ConfigParser.SafeConfigParser()
        parser.read(path)
        parser.read(path)


        log.debug("running '%s'" % path)
        log.warning("running '%s'" % path)


        self.path     = path
        self.path     = path
        self.test_dir = options.test_dir
        self.test_dir = options.test_dir
@@ -172,7 +172,7 @@ class Test(object):
              self.perf, self.command, tempdir, self.args)
              self.perf, self.command, tempdir, self.args)
        ret = os.WEXITSTATUS(os.system(cmd))
        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):
        if ret != int(self.ret):
            raise Unsup(self)
            raise Unsup(self)