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

[Xen-devel] [OSSTEST PATCH 09/62] ts-debian-fixup: merge origin extra= to our own if necessary



From: Wei Liu <wei.liu2@xxxxxxxxxx>

The original extra= was not removed, so there were two extra= in the
resulting config file.

It wasn't a problem for xl because the second extra= took precedence.
However libvirt tests would only pick up the first extra= so they
worked by chance.

Fix this issue by merging the original. If there isn't already extra=
in $cfg, use our own.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v3: handle situation when no extra= is in $cfg
---
 ts-debian-fixup | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ts-debian-fixup b/ts-debian-fixup
index 3e5cdb97..478dc2af 100755
--- a/ts-debian-fixup
+++ b/ts-debian-fixup
@@ -178,7 +178,11 @@ sub otherfixupcfg () {
         $extra .= " iommu=soft";
     }
 
-    $cfg .= "\nextra='$extra'\n";
+    if ($cfg =~ m/extra\s*=\s*['"](.*)['"]/) {
+       $cfg =~ s/extra\s*=\s*['"](.*)['"]/extra = '$1 $extra'/;
+    } else {
+       $cfg .= "extra = '$extra'\n";
+    }
 };
 
 sub writecfg () {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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