From patchwork Thu Jul 14 21:53:14 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: 976602 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6ELrP4v012208 for ; Thu, 14 Jul 2011 21:53:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932398Ab1GNVxU (ORCPT ); Thu, 14 Jul 2011 17:53:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39767 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311Ab1GNVxS (ORCPT ); Thu, 14 Jul 2011 17:53:18 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6ELrIwQ020534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Jul 2011 17:53:18 -0400 Received: from freedom.redhat.com (vpn-11-36.rdu.redhat.com [10.11.11.36]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6ELrGqh024752; Thu, 14 Jul 2011 17:53:16 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] KVM test: Fix bug in physical_resources_check Date: Thu, 14 Jul 2011 18:53:14 -0300 Message-Id: <1310680394-18093-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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 (demeter2.kernel.org [140.211.167.43]); Thu, 14 Jul 2011 21:53:25 +0000 (UTC) In r5451, several changes to the test were made, but a very simple one was forgotten: Change the check made in the end of the test to verify whether the test has passed or fail. n_fail is now a list of failures, so we need to test whether it is an empty list or not. Signed-off-by: Lucas Meneghel Rodrigues --- client/tests/kvm/tests/physical_resources_check.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests/physical_resources_check.py b/client/tests/kvm/tests/physical_resources_check.py index 9691d9e..4e83814 100644 --- a/client/tests/kvm/tests/physical_resources_check.py +++ b/client/tests/kvm/tests/physical_resources_check.py @@ -173,7 +173,7 @@ def run_physical_resources_check(test, params, env): catch_serial_cmd) n_fail.extend(f_fail) - if n_fail != 0: + if n_fail: session.close() raise error.TestFail("Physical resources check test " "reported %s failures:\n%s" %