From d2c10b2a70e08c3d2a51c65de4b4510b9bb5921b Mon Sep 17 00:00:00 2001 From: "George V. Neville-Neil" Date: Tue, 4 Sep 2012 20:14:37 +0000 Subject: [PATCH] Add a reasonable error message telling the caller to specify a program to be executed under hwpmc. If there is no program to run then exit. --- tools/test/hwpmc/pmctest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index e3c12d3ddd5..fb6667db8c0 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -67,6 +67,10 @@ def main(): (options, args) = parser.parse_args() + if (options.program == None): + print "specify program, such as ls, with -p/--program" + sys.exit() + p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE) counters = p.communicate()[0]