From: Ian Jackson Subject: [OSSTEST PATCH 3/9] mg-schema-test-database: Wipe previous local plan data Date: Thu, 17 Dec 2015 17:06:02 +0000 Message-ID: <1450371968-27997-3-git-send-email-ian.jackson@eu.citrix.com> References: <1450371968-27997-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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 In-Reply-To: <1450371968-27997-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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 ;; -- 1.7.10.4