From patchwork Thu Dec 17 17:06:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 7875151 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 0BB13BEEE5 for ; Thu, 17 Dec 2015 17:09:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 348372042C for ; Thu, 17 Dec 2015 17:09:21 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E9EB20254 for ; Thu, 17 Dec 2015 17:09:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9c0U-0005ue-Qn; Thu, 17 Dec 2015 17:06:22 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9c0T-0005tv-6t for xen-devel@lists.xenproject.org; Thu, 17 Dec 2015 17:06:21 +0000 Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id B9/E2-25438-C8BE2765; Thu, 17 Dec 2015 17:06:20 +0000 X-Env-Sender: prvs=7867bb76c=Ian.Jackson@citrix.com X-Msg-Ref: server-12.tower-27.messagelabs.com!1450371977!11725696!2 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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18140 invoked from network); 17 Dec 2015 17:06:19 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 Dec 2015 17:06:19 -0000 X-IronPort-AV: E=Sophos;i="5.20,442,1444694400"; d="scan'208";a="326045245" From: Ian Jackson To: Date: Thu, 17 Dec 2015 17:06:02 +0000 Message-ID: <1450371968-27997-3-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1450371968-27997-1-git-send-email-ian.jackson@eu.citrix.com> References: <1450371968-27997-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson , Ian Campbell Subject: [Xen-devel] [OSSTEST PATCH 3/9] mg-schema-test-database: Wipe previous local plan data X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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 Whatever is in the user's cwd is unlikely to correspond to anything real. In principle it might be possible to obtain an official copy from the real daemons, and massage it, or something, but that's a lot of work. Instead, just remove it when we start the test db daemons. In principle it would be more correct to remove it when we set up the test db, because it is at that point that we create the new view of the world. Removing the old plan data when we start daemons means that if the user, who is testing, restarts the daemons, the newly-created queue daemon does not have information about allocations made with the previous daemon, and instead regards those allocations as rogue. However, removing the file only when the daemons are started means that if the user has saved a data-plan.pl in their cwd for some other reason we don't remove it unless the user is actually going to run the daemons. So I think this is preferable. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- mg-schema-test-database | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mg-schema-test-database b/mg-schema-test-database index 818cf89..a4cb732 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -553,6 +553,8 @@ daemons) withtest \ exec_resetting_sigint ./ms-queuedaemon & + rm -f data-plan.pl + wait ;;