From patchwork Mon May 20 15:41:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 10951721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0523F16C1 for ; Mon, 20 May 2019 15:44:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8EDD288BD for ; Mon, 20 May 2019 15:44:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD881288CA; Mon, 20 May 2019 15:44:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D0AB288C4 for ; Mon, 20 May 2019 15:44:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hSkRX-0006o5-2R; Mon, 20 May 2019 15:43:15 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hSkRV-0006nc-7l for xen-devel@lists.xenproject.org; Mon, 20 May 2019 15:43:13 +0000 X-Inumbo-ID: f9434e59-7b15-11e9-8980-bc764e045a96 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id f9434e59-7b15-11e9-8980-bc764e045a96; Mon, 20 May 2019 15:43:12 +0000 (UTC) Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=Pass smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL02.citrite.net Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com designates 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:23.29.105.83 ip4:162.221.156.83 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL02.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@MIAPEX02MSOL02.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: 0TTEQkWmNlb99UCq+fGMOKVRwTb0AyD0JIqyyfktnyBcc3cFT6NLSGBn8cm+v1QU3bFCJVx8VQ fhrE+8W+ryL/FQd/sEy6+jQ8YIMijO8S4xriZIacALGkEujcpGWp5ZqIVtDCRAGoWtb4hvICOi g8XcTVLUCEVbrZRt1fBNm71Rd+lx9dYQ0RElvGI9V6r76PsV9k41UUBWtVan9k4f9ai+BYPxpw hD2rMIsxkGJUow1j6cjflu2vAbIYnt60NZstdnx0t0IZ8lV76iJ/zFxKxM2Z9z05aGfV6zXgb/ Cs4= X-SBRS: 2.7 X-MesageID: 661831 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,491,1549947600"; d="scan'208";a="661831" From: Ian Jackson To: Date: Mon, 20 May 2019 16:41:46 +0100 Message-ID: <20190520154147.30675-4-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190520154147.30675-1-ian.jackson@eu.citrix.com> References: <20190520154147.30675-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 3/4] mg-repro-setup: Introduce `statictask' variable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP We are going to make a mode where we don't set OSSTEST_TASK. The result is that our subprocesses will do whatever they usually do. Those are mg-allocate (which would allocate for our static task) and mg-execute-flight which will make a dynamic task. We must therefore prevent mg-allocate from running since the allocations would not be useable for the flight execution. No functional change yet, since nothing sets statictask=false and therefore OSSTEST_TASK would always be set. Signed-off-by: Ian Jackson --- mg-repro-setup | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/mg-repro-setup b/mg-repro-setup index 5a52e617..b60389d8 100755 --- a/mg-repro-setup +++ b/mg-repro-setup @@ -103,6 +103,7 @@ duration=28d blessing=play skipcapture=true autoalloc=false +statictask=true while true; do case "$1" in @@ -117,7 +118,7 @@ while true; do -t?*) duration=${arg#-t} ;; --rogue) duration='' ;; --capture) skipcapture=false ;; - --autoalloc-nofree) autoalloc=true ;; + --autoalloc-nofree) autoalloc=true; statictask=true ;; -l*) logfile=${arg#-l} ;; -r^*|-r!*) adjustsets+=("${arg#-r}") ;; # ^ two patterns because there's no way in bash to write @@ -258,16 +259,25 @@ if [ "x$rebuilds_flight" != x ]; then fi fi -OSSTEST_TASK=$(perl -e ' - use Osstest; - use Osstest::Executive; - csreadconfig(); - findtask(); - printf "%s\n", $ENV{'OSSTEST_TASK'} or die $!; -') -export OSSTEST_TASK +if $statictask; then + OSSTEST_TASK=$(perl -e ' + use Osstest; + use Osstest::Executive; + csreadconfig(); + findtask(); + printf "%s\n", $ENV{'OSSTEST_TASK'} or die $!; + ') + export OSSTEST_TASK +fi if [ "${alloc_idents[*]}" ]; then + if [ x"$OSSTEST_TASK" = x ]; then + # We would have to make a dynamic task and hold the + # fd for it in this script. Would be quite awkward. + echo >&2 'cannot hand-allocate in a way that will free' + exit 1 + fi + progress "allocating ${alloc_idents[*]} ..." alloc_output=tmp/$flight.allocations ./mg-allocate \