]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
mg-schema-test-database: Wipe previous local plan data
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 17 Dec 2015 12:10:07 +0000 (12:10 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 5 Jan 2016 17:46:12 +0000 (17:46 +0000)
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 <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
mg-schema-test-database

index 818cf899b0d1007f64d4f828dc37de786533d886..a4cb732b15a78583cf9df57ea6faa40f8df93538 100755 (executable)
@@ -553,6 +553,8 @@ daemons)
        withtest \
        exec_resetting_sigint ./ms-queuedaemon &
 
+       rm -f data-plan.pl
+
        wait
 
        ;;