From patchwork Thu Sep 22 14:37:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 4272 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B840423F6E for ; Thu, 22 Sep 2011 14:37:30 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id A75F0A1865F for ; Thu, 22 Sep 2011 14:37:30 +0000 (UTC) Received: by fxe23 with SMTP id 23so3936531fxe.11 for ; Thu, 22 Sep 2011 07:37:30 -0700 (PDT) Received: by 10.223.74.89 with SMTP id t25mr3156015faj.65.1316702237252; Thu, 22 Sep 2011 07:37:17 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.18.198 with SMTP id y6cs170818lad; Thu, 22 Sep 2011 07:37:16 -0700 (PDT) Received: by 10.216.132.18 with SMTP id n18mr677623wei.61.1316702235895; Thu, 22 Sep 2011 07:37:15 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id z51si414999wec.4.2011.09.22.07.37.15 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Sep 2011 07:37:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R6kOp-00047b-AT for ; Thu, 22 Sep 2011 14:37:15 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 3ADB8E1810 for ; Thu, 22 Sep 2011 14:37:15 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 117 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 117: If a test times out, try to kill it on the client. Reboot back to the Message-Id: <20110922143715.25204.11711.launchpad@ackee.canonical.com> Date: Thu, 22 Sep 2011 14:37:15 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13996"; Instance="initZopeless config overlay" X-Launchpad-Hash: 8e0a33dde4fb73bfe9bada7af7ab66c360552d10 ------------------------------------------------------------ revno: 117 fixes bug(s): https://launchpad.net/bugs/844446 committer: Paul Larson branch nick: stop-test-on-timeout timestamp: Tue 2011-09-20 11:39:14 -0500 message: If a test times out, try to kill it on the client. Reboot back to the test image if it doesn't get us back to a command prompt in a reasonable amount of time. modified: lava_dispatcher/actions/lava-test.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/actions/lava-test.py' --- lava_dispatcher/actions/lava-test.py 2011-09-16 02:37:57 +0000 +++ lava_dispatcher/actions/lava-test.py 2011-09-20 16:39:14 +0000 @@ -85,7 +85,15 @@ bundle_name = test_name + "-" + datetime.now().strftime("%H%M%S") cmd = ('lava-test run %s -o %s/%s.bundle' % ( test_name, self.context.lava_result_dir, bundle_name)) - rc = client.run_cmd_tester(cmd, timeout=timeout) + try: + rc = client.run_cmd_tester(cmd, timeout=timeout) + except: + client.proc.sendcontrol('c') + try: + client.run_cmd_tester('true', timeout=20) + except: + client.boot_linaro_image() + raise if rc is None: raise OperationFailed("test case getting return value failed") elif rc != 0: