[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 3/9] mg-schema-test-database: Wipe previous local plan data



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@xxxxxxxxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.