From patchwork Tue Jul 19 14:44:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 988972 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6JEikXN009104 for ; Tue, 19 Jul 2011 14:44:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751100Ab1GSOoo (ORCPT ); Tue, 19 Jul 2011 10:44:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18866 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917Ab1GSOon (ORCPT ); Tue, 19 Jul 2011 10:44:43 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6JEigaR024449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Jul 2011 10:44:42 -0400 Received: from freedom.redhat.com (vpn-10-36.rdu.redhat.com [10.11.10.36]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6JEieUq014300; Tue, 19 Jul 2011 10:44:41 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] iozone postprocessing: Use path rather than file object printing failure Date: Tue, 19 Jul 2011 11:44:37 -0300 Message-Id: <1311086677-5400-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 19 Jul 2011 14:44:47 +0000 (UTC) Newer versions of gnuplot are not compatible with some of the syntax on the command files generated for iozone graph generation. Let's fix this, also when a problem happens, use the command file path rather than the command file object itself. Signed-off-by: Lucas Meneghel Rodrigues --- client/tests/iozone/postprocessing.py | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/tests/iozone/postprocessing.py b/client/tests/iozone/postprocessing.py index 3a77c83..27d0569 100755 --- a/client/tests/iozone/postprocessing.py +++ b/client/tests/iozone/postprocessing.py @@ -400,10 +400,10 @@ class IOzonePlotter(object): commands_file.write(commands) commands_file.close() try: - utils.run("%s %s" % (self.gnuplot, commands_path)) - except error.CmdError, e: - logging.error("Problem plotting from commands file %s: %s", - commands_file, str(e)) + utils.system("%s %s" % (self.gnuplot, commands_path)) + except error.CmdError: + logging.error("Problem plotting from commands file %s", + commands_path) def plot_3d_graphs(self): @@ -439,10 +439,10 @@ class IOzonePlotter(object): commands_file.write(commands) commands_file.close() try: - utils.run("%s %s" % (self.gnuplot, commands_path)) - except error.CmdError, e: - logging.error("Problem plotting from commands file %s: %s", - commands_file, str(e)) + utils.system("%s %s" % (self.gnuplot, commands_path)) + except error.CmdError: + logging.error("Problem plotting from commands file %s", + commands_path) def plot_all(self):