From patchwork Wed May 13 13:37:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 23536 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4DDcMkh010114 for ; Wed, 13 May 2009 13:38:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756353AbZEMNhs (ORCPT ); Wed, 13 May 2009 09:37:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756237AbZEMNhs (ORCPT ); Wed, 13 May 2009 09:37:48 -0400 Received: from mx2.redhat.com ([66.187.237.31]:38165 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754906AbZEMNhn (ORCPT ); Wed, 13 May 2009 09:37:43 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4DDbinu031212 for ; Wed, 13 May 2009 09:37:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4DDbhfb013694 for ; Wed, 13 May 2009 09:37:43 -0400 Received: from [10.11.12.249] (vpn-12-249.rdu.redhat.com [10.11.12.249]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4DDbe72008823 for ; Wed, 13 May 2009 09:37:41 -0400 Subject: [RFC + PATCHES] Work to get KVM autotest upstream From: Lucas Meneghel Rodrigues To: kvm@vger.kernel.org Date: Wed, 13 May 2009 10:37:40 -0300 Message-Id: <1242221860.2579.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org These are the patches I have so far related to the work to get kvm autotest in shape for upstream merge. Please note that once the patches are applied, the kvm_runtest_2 directory should be placed on a fresh svn trunk checkout to work, so there's a little bit of tweaking to get them working. That said, this haven't had enough testing. I am posting them here only if someone wants to take a look at them. Cheers, From 4ddeaaa8e23c8bba23c7be83ba6d07a4c9efdaa5 Mon Sep 17 00:00:00 2001 From: Lucas Meneghel Rodrigues Date: Wed, 6 May 2009 22:43:14 -0300 Subject: [PATCH 7/7] Import fixes, removing unnecessary shebangs --- client/tests/kvm_runtest_2/calc_md5sum_1m.py | 2 -- client/tests/kvm_runtest_2/kvm_preprocessing.py | 10 ++-------- client/tests/kvm_runtest_2/kvm_runtest_2.py | 4 ---- client/tests/kvm_runtest_2/kvm_tests.py | 2 -- client/tests/kvm_runtest_2/kvm_utils.py | 3 --- 5 files changed, 2 insertions(+), 19 deletions(-) diff --git a/client/tests/kvm_runtest_2/calc_md5sum_1m.py b/client/tests/kvm_runtest_2/calc_md5sum_1m.py index 87a30d5..1f40b42 100755 --- a/client/tests/kvm_runtest_2/calc_md5sum_1m.py +++ b/client/tests/kvm_runtest_2/calc_md5sum_1m.py @@ -12,5 +12,3 @@ else: else: print kvm_utils.md5sum_file(fname, 1024*1024) - - diff --git a/client/tests/kvm_runtest_2/kvm_preprocessing.py b/client/tests/kvm_runtest_2/kvm_preprocessing.py index a3ffa72..8ab258e 100644 --- a/client/tests/kvm_runtest_2/kvm_preprocessing.py +++ b/client/tests/kvm_runtest_2/kvm_preprocessing.py @@ -1,13 +1,7 @@ -#!/usr/bin/python - -import sys, os, time, commands, re - +import sys, os, time, commands, re, logging from autotest_lib.client.bin import test from autotest_lib.client.common_lib import error - -import kvm_vm -import kvm_utils -import logging +import kvm_vm, kvm_utils def preprocess_image(test, params): diff --git a/client/tests/kvm_runtest_2/kvm_runtest_2.py b/client/tests/kvm_runtest_2/kvm_runtest_2.py index 297adc0..a3efc28 100644 --- a/client/tests/kvm_runtest_2/kvm_runtest_2.py +++ b/client/tests/kvm_runtest_2/kvm_runtest_2.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - import sys, os, time, shelve, random, resource, logging from autotest_lib.client.bin import test from autotest_lib.client.common_lib import error @@ -46,8 +44,6 @@ class kvm_runtest_2(test.test): # Enable core dumps resource.setrlimit(resource.RLIMIT_CORE, (-1, -1)) - # Set the logging prefix - #kvm_log.set_prefix(params.get("shortname")) # Report the parameters we've received and write them as keyvals logging.debug("Test parameters:") diff --git a/client/tests/kvm_runtest_2/kvm_tests.py b/client/tests/kvm_runtest_2/kvm_tests.py index 8fc8f67..c1706a7 100644 --- a/client/tests/kvm_runtest_2/kvm_tests.py +++ b/client/tests/kvm_runtest_2/kvm_tests.py @@ -299,9 +299,7 @@ def run_autotest(test, params, env): raise error.TestError(message_error) - # I'm not sure if we need these... - def internal_yum_update(session, command, prompt, timeout): session.sendline(command) end_time = time.time() + timeout diff --git a/client/tests/kvm_runtest_2/kvm_utils.py b/client/tests/kvm_runtest_2/kvm_utils.py index f113472..32bb4d2 100644 --- a/client/tests/kvm_runtest_2/kvm_utils.py +++ b/client/tests/kvm_runtest_2/kvm_utils.py @@ -1,11 +1,8 @@ -#!/usr/bin/python - import md5, thread, subprocess, time, string, random, socket, os, signal, pty import select, re, logging # Functions for working with dicts obtained from the test config file - def get_sub_dict(dict, name): """Return a "sub-dict" corresponding to a specific object. -- 1.6.2.2