From patchwork Mon Oct 18 13:13:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 261821 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9IDDoJS020092 for ; Mon, 18 Oct 2010 13:13:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754975Ab0JRNNq (ORCPT ); Mon, 18 Oct 2010 09:13:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24517 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754156Ab0JRNNp (ORCPT ); Mon, 18 Oct 2010 09:13:45 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9IDDiV1004850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Oct 2010 09:13:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9IDDhI2018768; Mon, 18 Oct 2010 09:13:44 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o9IDDebr007914; Mon, 18 Oct 2010 09:13:42 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH] KVM test: whql_client_install: fix retrieval of server_dns_suffix Date: Mon, 18 Oct 2010 15:13:38 +0200 Message-Id: <1287407620-30026-2-git-send-email-mgoldish@redhat.com> In-Reply-To: <1287407620-30026-1-git-send-email-mgoldish@redhat.com> References: <1287407620-30026-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 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.3 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Oct 2010 13:13:50 +0000 (UTC) diff --git a/client/tests/kvm/tests/whql_client_install.py b/client/tests/kvm/tests/whql_client_install.py index d866df7..84b91bc 100644 --- a/client/tests/kvm/tests/whql_client_install.py +++ b/client/tests/kvm/tests/whql_client_install.py @@ -60,7 +60,11 @@ def run_whql_client_install(test, params, env): server_workgroup = server_workgroup.splitlines()[-1] regkey = r"HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" cmd = "reg query %s /v Domain" % regkey - server_dns_suffix = server_session.get_command_output(cmd).split()[-1] + o = server_session.get_command_output(cmd).strip().splitlines()[-1] + try: + server_dns_suffix = o.split(None, 2)[2] + except IndexError: + server_dns_suffix = "" # Delete the client machine from the server's data store (if it's there) server_session.get_command_output("cd %s" % server_studio_path) @@ -86,7 +90,7 @@ def run_whql_client_install(test, params, env): # Set the client machine's DNS suffix logging.info("Setting DNS suffix to '%s'" % server_dns_suffix) - cmd = "reg add %s /v Domain /d %s /f" % (regkey, server_dns_suffix) + cmd = 'reg add %s /v Domain /d "%s" /f' % (regkey, server_dns_suffix) if session.get_command_status(cmd, timeout=300) != 0: raise error.TestError("Could not set the client's DNS suffix")