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

[Xen-devel] [OSSTEST PATCH 09/10] rump kernel tests: Cancel unneeded edits of guest config



If the guest config is already set up to preserve, cancel the edit.
We are going to repeat this test, and this avoids creating many
identical copies of the same file in the log output.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ts-rumpuserxen-demo-xenstorels |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ts-rumpuserxen-demo-xenstorels b/ts-rumpuserxen-demo-xenstorels
index ed46843..a54fbf4 100755
--- a/ts-rumpuserxen-demo-xenstorels
+++ b/ts-rumpuserxen-demo-xenstorels
@@ -32,7 +32,11 @@ our $gn = $gho->{Guest};
 sub arrangepreserve () {
     target_editfile_root($ho,$r{"$gho->{Guest}_cfgpath"}, sub {
        while (<EI>) {
-           next if m/^\s*on_poweroff\s*=/;
+           if (m/^\s*on_poweroff\s*=/) {
+               target_editfile_cancel("already configured to preserve")
+                   if m/\bpreserve\b/;
+               next;
+           }
            print EO or die $!;
        }
        print EO "\n","on_poweroff='preserve'\n" or die $!;
-- 
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®.