From patchwork Sun Oct 24 11:01:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 265402 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 o9OB1KGT008694 for ; Sun, 24 Oct 2010 11:01:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932476Ab0JXLBS (ORCPT ); Sun, 24 Oct 2010 07:01:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35284 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932459Ab0JXLBQ (ORCPT ); Sun, 24 Oct 2010 07:01:16 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9OB1FDL019148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 24 Oct 2010 07:01:15 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9OB1FFv000936; Sun, 24 Oct 2010 07:01:15 -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 o9OB1BC4007247; Sun, 24 Oct 2010 07:01:13 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 2/7] KVM test: VM.get_address(): fix handling of multiple NICs Date: Sun, 24 Oct 2010 13:01:05 +0200 Message-Id: <1287918070-4579-2-git-send-email-mgoldish@redhat.com> In-Reply-To: <1287918070-4579-1-git-send-email-mgoldish@redhat.com> References: <1287918070-4579-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 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]); Sun, 24 Oct 2010 11:01:20 +0000 (UTC) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 51e7cfa..f3e803b 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -930,11 +930,7 @@ class VM: "%s" % mac) return None # Make sure the IP address is assigned to this guest - nic_dicts = [kvm_utils.get_sub_dict(self.params, nic) - for nic in nics] - macs = [kvm_utils.get_mac_ip_pair_from_dict(dict)[0] - for dict in nic_dicts] - macs.append(mac) + macs = [self.get_mac_address(i) for i in range(len(nics))] if not kvm_utils.verify_ip_address_ownership(ip, macs): logging.debug("Could not verify MAC-IP address mapping: " "%s ---> %s" % (mac, ip))