From patchwork Mon Apr 11 16:37:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 8804521 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1D667C0555 for ; Mon, 11 Apr 2016 16:49:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2FCC820303 for ; Mon, 11 Apr 2016 16:49:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D903F20270 for ; Mon, 11 Apr 2016 16:49:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apf0H-0006ZW-RC; Mon, 11 Apr 2016 16:47:57 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apf0G-0006Yw-E3 for xen-devel@lists.xenproject.org; Mon, 11 Apr 2016 16:47:56 +0000 Received: from [193.109.254.147] by server-3.bemta-14.messagelabs.com id B8/A0-03281-B35DB075; Mon, 11 Apr 2016 16:47:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeJIrShJLcpLzFFi42JxWrrBXtf6Kne 4wZJznBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8b0iw8ZC5rYK56/msTYwHiTtYuRk0NCwF9i 5r9jbCA2m4CuRNOWv0A2B4eIgIrE7b0GICazQKjEjheWIBXCAp4SN0/+YwKxWQRUJS53/mAGs XkFPCRWbl/DDjFRUaL72QSwKUICahJz18dDlAhKnJz5hAXEZhaQkDj44gUzRDm3xO3TU5knMP LMQlI2C0nZAkamVYwaxalFZalFuoZGeklFmekZJbmJmTm6hoYmermpxcWJ6ak5iUnFesn5uZs YgeHBAAQ7GM9Ocz7EKMnBpCTKu3M+d7gQX1J+SmVGYnFGfFFpTmrxIUYZDg4lCd7pV4BygkWp 6akVaZk5wECFSUtw8CiJ8C4FSfMWFyTmFmemQ6ROMepyLPhxey2TEEtefl6qlDhvPEiRAEhRR mke3AhY1FxilJUS5mUEOkqIpyC1KDezBFX+FaM4B6OSMG8FyBSezLwSuE2vgI5gAjri2T9OkC NKEhFSUg2MiwtlhPbs7TFeJmp2bvuVO5uOv7EMCFt8yNtTzryh4u0W25blgWy7g7exLe72Ur/ 9u3h3c0sor1PLrP2THScWC8vcb3oykfdy07SnImFhVxsPTG274j9nTsaObf6mHhwLAq6oTr10 znbu862LZ56JtQ/qZN1f6Xu8oGWl9S1LjitLEqMSl9z8rsRSnJFoqMVcVJwIAICbCwyVAgAA X-Env-Sender: prvs=902b7e3ca=Ian.Jackson@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1460393273!34622181!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 48869 invoked from network); 11 Apr 2016 16:47:54 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 11 Apr 2016 16:47:54 -0000 X-IronPort-AV: E=Sophos;i="5.24,462,1454976000"; d="scan'208";a="352968185" From: Ian Jackson To: Date: Mon, 11 Apr 2016 17:37:53 +0100 Message-ID: <1460392674-7226-1-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 1/2] sg-run-job: nested: Break out nested-hosts-p X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We are going to want to test this elsewhere, too. No functional change. Signed-off-by: Ian Jackson --- sg-run-job | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sg-run-job b/sg-run-job index 3e0f966..d1bd124 100755 --- a/sg-run-job +++ b/sg-run-job @@ -75,7 +75,7 @@ proc run-job {job} { while 1 { per-host-finish - if {![llength $nested_layers_hosts]} break + if {![nested-hosts-p]} break per-host-ts . final-poweroff {ts-host-powercycle --power=0} @@ -257,6 +257,11 @@ proc per-host-ts {iffail ident script args} { } } +proc nested-hosts-p {} { + global nested_layers_hosts + expr {!![llength nested_layers_hosts]} +} + proc nested-layer-descend {nested_hosts} { # We save need_xen_hosts on a stack in nested_layers_hosts # It gets popped again during the cleanup part of run-job