From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9BBF7A034F; Mon, 6 Dec 2021 13:21:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92AC341169; Mon, 6 Dec 2021 13:21:47 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id C0DF7410E5 for ; Mon, 6 Dec 2021 13:21:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 56D28134296; Mon, 6 Dec 2021 13:21:45 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nuTrvQlNqcjA; Mon, 6 Dec 2021 13:21:44 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 300F9130F7E; Mon, 6 Dec 2021 13:21:44 +0100 (CET) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: lijuan.tu@intel.com, ohilyard@iol.unh.edu Cc: dts@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [PATCH v1] framework/qemu_kvm: fix pylama errors Date: Mon, 6 Dec 2021 13:21:43 +0100 Message-Id: <1638793303-2955-1-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Pylama found the following errors: framework/qemu_kvm.py:1498: [E] E0602 Undefined variable 'assgined_pcis_info' [pylint] framework/qemu_kvm.py:1508: [E] E0602 Undefined variable 'assinged_pcis_info' [pylint] framework/qemu_kvm.py:1508: [E] E1101 Instance of 'QEMUKvm' has no '__vf_has_been_assinged' member [pylint] framework/qemu_kvm.py:1587: [E] E1121 Too many positional arguments for method call [pylint] framework/qemu_kvm.py:1733: [E] E0213 Method should have "self" as first argument [pylint] framework/qemu_kvm.py:1750: [E] E1102 func is not callable [pylint] Signed-off-by: Juraj Linkeš --- Lijuan, please add additional people to review if needed. --- framework/qemu_kvm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index 515a4c04..32cd668e 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -1495,7 +1495,7 @@ class QEMUKvm(VirtBase): if self.__is_vf_pci(pci): assigned_pcis_info[pci]['is_vf'] = True pf_pci = self.__map_vf_to_pf(pci) - assgined_pcis_info[pci]['pf_pci'] = pf_pci + assigned_pcis_info[pci]['pf_pci'] = pf_pci if self.virt_pool.alloc_vf_from_pf(vm=self.vm_name, pf_pci=pf_pci, *[pci]): @@ -1505,7 +1505,7 @@ class QEMUKvm(VirtBase): else: # check that if any VF of specified PF has been # used, raise exception - vf_pci = self.__vf_has_been_assinged(pci, **assinged_pcis_info) + vf_pci = self.__vf_has_been_assigned(pci, **assigned_pcis_info) if vf_pci: raise Exception( "Error: A VF [%s] generated by PF [%s] has " % @@ -1584,7 +1584,7 @@ class QEMUKvm(VirtBase): """ Get IP which VM is connected by bridge. """ - out = self.control_command('ping', '60') + out = self.control_command('ping') if not out: time.sleep(10) out = self.control_command('ifconfig') @@ -1730,6 +1730,7 @@ class QEMUKvm(VirtBase): return cores + @staticmethod def handle_control_session(func): """ Wrapper function to handle serial port, must return serial to host session -- 2.20.1