From patchwork Wed Jan 13 06:32:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yolkfull Chow X-Patchwork-Id: 72508 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0D6WCqs000870 for ; Wed, 13 Jan 2010 06:32:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751609Ab0AMGcL (ORCPT ); Wed, 13 Jan 2010 01:32:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751312Ab0AMGcK (ORCPT ); Wed, 13 Jan 2010 01:32:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485Ab0AMGcH (ORCPT ); Wed, 13 Jan 2010 01:32:07 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0D6W6G5015241 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Jan 2010 01:32:06 -0500 Received: from localhost.localdomain (dhcp-65-181.nay.redhat.com [10.66.65.181]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0D6W062028489; Wed, 13 Jan 2010 01:32:04 -0500 From: Yolkfull Chow To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Yolkfull Chow Subject: [Autotest PATCH 2/2] KVM-test: subtest guest_s4: Add check of if there's enough space left for S4 Date: Wed, 13 Jan 2010 14:32:03 +0800 Message-Id: <1263364323-16506-2-git-send-email-yzhou@redhat.com> In-Reply-To: <1263364323-16506-1-git-send-email-yzhou@redhat.com> References: <1263364323-16506-1-git-send-email-yzhou@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/client/tests/kvm/tests/guest_s4.py b/client/tests/kvm/tests/guest_s4.py index 82572f6..a289148 100644 --- a/client/tests/kvm/tests/guest_s4.py +++ b/client/tests/kvm/tests/guest_s4.py @@ -15,11 +15,11 @@ def run_guest_s4(test, params, env): session = kvm_test_utils.wait_for_login(vm) logging.info("Checking whether guest OS supports suspend to disk (S4)...") - status = session.get_command_status(params.get("check_s4_support_cmd")) - if status is None: - logging.error("Failed to check if guest OS supports S4") - elif status != 0: - raise error.TestFail("Guest OS does not support S4") + s, o = session.get_command_status_output(params.get("check_s4_support_cmd")) + if "not enough space" in o: + raise error.TestError("Check S4 support failed: %s" % o) + elif s != 0: + raise error.TestNAError("Guest OS does not support S4") logging.info("Waiting until all guest OS services are fully started...") time.sleep(float(params.get("services_up_timeout", 30)))