From patchwork Tue Feb 18 10:11:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 24819 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 649FD202B2 for ; Tue, 18 Feb 2014 10:13:25 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id up15sf38340779pbc.3 for ; Tue, 18 Feb 2014 02:13:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:from:to:date:in-reply-to :references:organization:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=+oe4NTtBlpZaJbAdYPYQgYIWI+lkpcwtCd2Uxjwg3sk=; b=OdyEd20gJxEr3WnPtlnMbpef9vDsyP8K0Q80sz3/kNNy11zKJCG/m3rJ8bufeXDAxA +bczkZgpHjxgjg0py9Yt9ickwUas2PQO4IllCyiDaj0bya/9uUBnbGQQMug+lC4n3/+Y cH/v/xkaARWG6/66J0Th2NS/ebEcdbtI/LplXpfkpd0RpRyJTgv3djUwS3sqo3x1DLaK fXLGzYGJCeCR5jU5bhPXpbVB2HnzYIGVUXUl4Pct0sCX8gVX+BD87Tulu9Qr7HTHGOSy B3YW+HNLvAZ26DPipBoIad9oWDgQAZFoi5QxRnXbMLKZpYL+e9cD+wMj8lpRiGEWuG8u nsaA== X-Gm-Message-State: ALoCoQmU2qwWA1eBD8WoViCW0ZVsEDGlU1erHmaxTYqrCBRabodBbDgHekLVcl9S6E6Am6KhHw8k X-Received: by 10.66.250.200 with SMTP id ze8mr12183267pac.29.1392718404621; Tue, 18 Feb 2014 02:13:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.136 with SMTP id 8ls1262322qgl.27.gmail; Tue, 18 Feb 2014 02:13:24 -0800 (PST) X-Received: by 10.52.181.199 with SMTP id dy7mr4003719vdc.43.1392718404514; Tue, 18 Feb 2014 02:13:24 -0800 (PST) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id sx1si5335804vdc.153.2014.02.18.02.13.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:13:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id ld13so12772480vcb.18 for ; Tue, 18 Feb 2014 02:13:24 -0800 (PST) X-Received: by 10.221.40.10 with SMTP id to10mr16043949vcb.22.1392718404367; Tue, 18 Feb 2014 02:13:24 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp205304vcz; Tue, 18 Feb 2014 02:13:23 -0800 (PST) X-Received: by 10.50.43.170 with SMTP id x10mr21175197igl.20.1392718403633; Tue, 18 Feb 2014 02:13:23 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id d20si15911468igo.58.2014.02.18.02.13.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:13:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WFheP-0006sG-8S; Tue, 18 Feb 2014 10:11:41 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WFheN-0006s7-5r for xen-devel@lists.xenproject.org; Tue, 18 Feb 2014 10:11:39 +0000 Received: from [85.158.137.68:65291] by server-8.bemta-3.messagelabs.com id 4A/3D-16039-AD133035; Tue, 18 Feb 2014 10:11:38 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1392718296!2580460!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14805 invoked from network); 18 Feb 2014 10:11:37 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-15.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 18 Feb 2014 10:11:37 -0000 X-IronPort-AV: E=Sophos;i="4.97,501,1389744000"; d="scan'208";a="101687621" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 18 Feb 2014 10:11:35 +0000 Received: from [10.80.2.80] (10.80.2.80) by FTLPEX01CL03.citrite.net (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 18 Feb 2014 05:11:35 -0500 Message-ID: <1392718294.11080.10.camel@kazak.uk.xensource.com> From: Ian Campbell To: Ian Jackson Date: Tue, 18 Feb 2014 10:11:34 +0000 In-Reply-To: <21246.25423.419772.949039@mariner.uk.xensource.com> References: <1391005955.21756.7.camel@Abyss> <1392401513.32038.348.camel@Solace> <21246.25423.419772.949039@mariner.uk.xensource.com> Organization: Citrix Systems, Inc. X-Mailer: Evolution 3.4.4-3 MIME-Version: 1.0 X-Originating-IP: [10.80.2.80] X-DLP: MIA2 Cc: xen-devel , raistlin@linux.it Subject: Re: [Xen-devel] [OSSTest] standalone-reset: actually honour '-f' option X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On Fri, 2014-02-14 at 18:41 +0000, Ian Jackson wrote: > Dario Faggioli writes ("Re: [Xen-devel] [OSSTest] standalone-reset: actually honour '-f' option"): > > On mer, 2014-01-29 at 14:32 +0000, Dario Faggioli wrote: > > > standalone-reset's usage says: > > > > > > usage: ./standalone-reset [] [ [ []]] > > > branch and xenbranch default, separately, to xen-unstable > > > options: > > > -f generate flight "flight", default is "standalone" > > > > > > but then there is no place where '-f' is processed, and hence > > > no real way to pass a specific flight name to make-flight. > > > > > > Signed-off-by: Dario Faggioli > ... > > I know it's a busy period for OSSTest, but this should be pretty > > straightforward, and it only affects standalone mode. > > Right. I don't use standalone mode much, so sorry about that. I > looked for a comment from Ian C but didn't find one. > > Acked-by: Ian Jackson > > > > Anyway, I can put it on hold and resubmit in a while, if that's > > considered better. > > No, pinging now is good. > > This patch leads me to an observation: I looked at the code in > standalone-reset and it appears to me that there is not currently > anything which sets "$flight". This patch from Dario does it I think. > So the "DELETE" statements used if there's an existing db won't have > any effect. This doesn't cause any strange effects because > Osstest/JobDB/Standalone.pm deletes them too. > > I think it would be best to delete that part of standalone-reset. Do > you agree ? FWIW I've been carrying the following with the intention of using it from my standalone helper script, since as you've just point out Standalone.pm also does it then it seems like I could drop the forget-flight bit. 8<----------------- >From 98f57473e4787620c6cad443ee15cc38b330065d Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 12 Feb 2014 11:19:45 +0000 Subject: [PATCH] standalone: refactor out some useful bits of standalone-reset I sometimes want just these bits. Signed-off-by: Ian Campbell --- standalone-forget-flight | 39 +++++++++++++++++++++++++++++++++ standalone-init-db | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ standalone-reset | 30 ++------------------------ 3 files changed, 97 insertions(+), 28 deletions(-) create mode 100755 standalone-forget-flight create mode 100755 standalone-init-db diff --git a/standalone-forget-flight b/standalone-forget-flight new file mode 100755 index 0000000..6dd6a84 --- /dev/null +++ b/standalone-forget-flight @@ -0,0 +1,39 @@ +#!/bin/bash + +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2014 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +set -e + +usage(){ + cat <&2 + exit 1 +fi + +db="$1" +flight="$1" + +sqlite3 "$db" <. + +set -e + +usage(){ + cat <&2 + exit 1 +fi + +db="$1" + +sqlite3 "$db" <