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@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v3: handle situation when no extra= is in $cfg
$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 () {