Devel
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- 41 participants
- 40447 discussions
The documentation on the new storage feature is either a little short,
or I totally missed it. Anyway, I am looking for some help on how to
use it. If anyone could maybe give me an example xml file that would
be incredibly helpful, because based on the format description I can't
exactly figure out what information I am supposed to put where (for
ISCSI).
Thanks!
--
$ ./Mark
4
17
23 May '08
I got fed up trying to figure out how to fix the coverage reports to merge
data from multiple runs correctly, so this patch rips out all our test
coverage support. In its place is a makefile rule which just calls out to
the lcov program. It requires lcov >= 1.6 since earlier versions were
too dumb to deal with .libs/ directories properly. This version has just
been submitted to Fedora updates repos.
Makefile.am | 26 +---
a/scripts/.cvsignore | 2
a/scripts/Makefile.am | 4
a/scripts/README | 3
a/scripts/coverage-report-entry.pl | 77 -------------
a/scripts/coverage-report.pl | 167 ----------------------------
a/scripts/coverage-report.xsl | 217 -------------------------------------
configure.in | 2
src/Makefile.am | 20 ---
9 files changed, 12 insertions(+), 506 deletions(-)
Dan.
diff -r ddd05d94cc2d Makefile.am
--- a/Makefile.am Thu May 22 17:13:05 2008 -0400
+++ b/Makefile.am Thu May 22 17:27:30 2008 -0400
@@ -1,7 +1,10 @@
## Process this file with automake to produce Makefile.in
+LCOV = lcov
+GENHTML = genhtml
+
SUBDIRS = gnulib/lib include src qemud proxy docs gnulib/tests \
- python tests po scripts
+ python tests po
ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
@@ -28,24 +31,15 @@
@(if [ "$(pythondir)" != "" ] ; then cd python ; \
$(MAKE) MAKEFLAGS+=--silent tests ; fi)
-cov: cov-recursive cov-am
+cov: clean-cov
+ mkdir $(top_builddir)/coverage
+ $(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp -d $(top_srcdir)/src -d $(top_srcdir)/qemud -d $(top_srcdir)/tests
+ $(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp -o $(top_builddir)/coverage/libvirt.info *usr*
+ rm $(top_builddir)/coverage/libvirt.info.tmp
+ $(GENHTML) -s -t "libvirt" -o $(top_builddir)/coverage --legend $(top_builddir)/coverage/libvirt.info
clean-cov:
rm -rf $(top_builddir)/coverage
- cd src && $(MAKE) $(AM_MAKEFLAGS) clean-cov
-
-cov-recursive:
- cd src && $(MAKE) $(AM_MAKEFLAGS) cov
-
-cov-am:
- rm -rf $(top_builddir)/coverage
- mkdir $(top_builddir)/coverage
- perl $(srcdir)/scripts/coverage-report.pl src/*.cov > $(top_builddir)/coverage/index.xml
- xsltproc $(srcdir)/scripts/coverage-report.xsl \
- $(top_builddir)/coverage/index.xml \
- > $(top_builddir)/coverage/index.html
- for i in $(top_builddir)/src/*.gcov ; do o=`echo $$i | sed -e 's,$(top_builddir)/src,coverage,'` ; \
- perl $(srcdir)/scripts/coverage-report-entry.pl $$i > $$o.html ; done
# disable this check
distuninstallcheck:
diff -r ddd05d94cc2d configure.in
--- a/configure.in Thu May 22 17:13:05 2008 -0400
+++ b/configure.in Thu May 22 17:27:30 2008 -0400
@@ -1001,7 +1001,7 @@
gnulib/lib/Makefile \
gnulib/tests/Makefile \
libvirt.pc libvirt.spec \
- po/Makefile.in scripts/Makefile \
+ po/Makefile.in \
include/libvirt/Makefile include/libvirt/libvirt.h \
python/Makefile python/tests/Makefile \
qemud/Makefile \
diff -r ddd05d94cc2d scripts/.cvsignore
--- a/scripts/.cvsignore Thu May 22 17:13:05 2008 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff -r ddd05d94cc2d scripts/Makefile.am
--- a/scripts/Makefile.am Thu May 22 17:13:05 2008 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-
-EXTRA_DIST = coverage-report.pl \
- coverage-report-entry.pl \
- coverage-report.xsl
diff -r ddd05d94cc2d scripts/README
--- a/scripts/README Thu May 22 17:13:05 2008 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-This directory provides a collection of tools used in the
-build / test process. They are not installed / used after
-deployment.
diff -r ddd05d94cc2d scripts/coverage-report-entry.pl
--- a/scripts/coverage-report-entry.pl Thu May 22 17:13:05 2008 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (C) 2006-2007 Daniel P. Berrange
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Author: Daniel P. Berrange <berrange(a)redhat.com>
-#
-# coverage-report-entry.pl: convert gcov annotated source into HTML
-#
-# This script takes a gcov annotated source code files on STDIN
-# converts it to HTML, coloured according to coverage, and sends
-# it to STDOUT
-
-print <<EOF;
-<html>
-<head>
-<title>Coverage report for $ARGV[0]</title>
-<style type="text/css">
- span.perfect {
- background: rgb(0,255,0);
- }
- span.terrible {
- background: rgb(255,0,0);
- }
-</style>
-</head>
-<body>
-<h1>Coverage report for $ARGV[0]</h1>
-
-<pre>
-EOF
-
-
-while (<>) {
- s/&/&/g;
- s/</</g;
- s/>/>/g;
-
- if (/^\s*function (\S+) called (\d+) returned \d+% blocks executed \d+%/) {
- my $class = $2 > 0 ? "perfect" : "terrible";
- $_ = "<span class=\"$class\" id=\"" . $1 . "\">$_</span>";
- } elsif (/^\s*branch\s+\d+\s+taken\s+(\d+)%\s+.*$/) {
- my $class = $1 > 0 ? "perfect" : "terrible";
- $_ = "<span class=\"$class\">$_</span>";
- } elsif (/^\s*branch\s+\d+\s+never executed.*$/) {
- my $class = "terrible";
- $_ = "<span class=\"$class\">$_</span>";
- } elsif (/^\s*call\s+\d+\s+never executed.*$/) {
- my $class = "terrible";
- $_ = "<span class=\"$class\">$_</span>";
- } elsif (/^\s*call\s+\d+\s+returned\s+(\d+)%.*$/) {
- my $class = $1 > 0 ? "perfect" : "terrible";
- $_ = "<span class=\"$class\">$_</span>";
- }
-
-
- print;
-}
-
-print <<EOF;
-</pre>
-</body>
-</html>
-EOF
diff -r ddd05d94cc2d scripts/coverage-report.pl
--- a/scripts/coverage-report.pl Thu May 22 17:13:05 2008 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (C) 2006-2007 Daniel P. Berrange
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Author: Daniel P. Berrange <berrange(a)redhat.com>
-#
-# coverage-report.pl: generate XML coverage summary report
-#
-# This script takes a listof gcov .cov files as args, and generates
-# an XML document summarizing the coverage per function and per
-# source file.
-
-use warnings;
-use strict;
-
-my %coverage = ( function => {}, file => {} );
-
-my @functionBlackList = (
- "__memcpy",
- "__memmove",
- "__memset",
- "__strcat",
- "__strcpy",
- "__strncpy",
- "__strsep",
- "__strtok"
- );
-
-my %filemap;
-
-my $type;
-my $name;
-
-my @functions;
-
-while (<>) {
- if (/^Function '(.*)'\s*$/) {
- $type = "function";
- $name = $1;
- $coverage{$type}->{$name} = {};
- push @functions, $name;
- } elsif (/^File '(.*?)'\s*$/) {
- $type = "file";
- $name = $1;
- $coverage{$type}->{$name} = {};
-
- foreach my $func (@functions) {
- $coverage{"function"}->{$func}->{file} = $name;
- }
- @functions = ();
- } elsif (/^Lines executed:(.*)%\s*of\s*(\d+)\s*$/) {
- $coverage{$type}->{$name}->{lines} = $2;
- $coverage{$type}->{$name}->{linesCoverage} = $1;
- } elsif (/^No executable lines\s*$/) {
- $coverage{$type}->{$name}->{lines} = 0;
- $coverage{$type}->{$name}->{linesCoverage} = "100.00";
- } elsif (/^Branches executed:(.*)%\s*of\s*(\d+)\s*$/) {
- $coverage{$type}->{$name}->{branches} = $2;
- $coverage{$type}->{$name}->{branchesCoverage} = $1;
- } elsif (/^Taken at least once:(.*)%\s*of\s*(\d+)\s*$/) {
- $coverage{$type}->{$name}->{conds} = $2;
- $coverage{$type}->{$name}->{condsCoverage} = $1;
- } elsif (/^Calls executed:(.*)%\s*of\s*(\d+)\s*$/) {
- $coverage{$type}->{$name}->{calls} = $2;
- $coverage{$type}->{$name}->{callsCoverage} = $1;
- } elsif (/^No branches$/) {
- $coverage{$type}->{$name}->{branches} = 0;
- $coverage{$type}->{$name}->{branchesCoverage} = "100.00";
- $coverage{$type}->{$name}->{conds} = 0;
- $coverage{$type}->{$name}->{condsCoverage} = "100.00";
- } elsif (/^No calls$/) {
- $coverage{$type}->{$name}->{calls} = 0;
- $coverage{$type}->{$name}->{callsCoverage} = "100.00";
- } elsif (/^\s*(.*):creating '(.*)'\s*$/) {
- $filemap{$1} = $2;
- } elsif (/^\s*$/) {
- # nada
- } else {
- warn "unexpected input [$_]\n";
- }
-}
-
-my %summary;
-foreach my $type ("function", "file") {
- $summary{$type} = {};
- foreach my $m ("lines", "branches", "conds", "calls") {
- my $totalGot = 0;
- my $totalMiss = 0;
- my $count = 0;
- foreach my $func (keys %{$coverage{function}}) {
- my $blacklisted = 0;
- foreach my $blackName (@functionBlackList) {
- $blacklisted = 1 if $func =~ /^$blackName/;
- }
- next if $blacklisted;
-
- $count++;
- my $got = $coverage{function}->{$func}->{$m};
- $totalGot += $got;
- my $miss = $got * $coverage{function}->{$func}->{$m ."Coverage"} / 100;
- $totalMiss += $miss;
- }
- $summary{$type}->{$m} = sprintf("%d", $totalGot);
- if ($totalGot == 0) {
- $summary{$type}->{$m . "Coverage"} = "100.00";
- } else {
- $summary{$type}->{$m . "Coverage"} = sprintf("%.2f", $totalMiss / $totalGot * 100);
- }
- }
-}
-
-
-
-print "<coverage>\n";
-
-foreach my $type ("function", "file") {
- printf "<%ss>\n", $type;
- foreach my $name (sort { $a cmp $b } keys %{$coverage{$type}}) {
- if ($type eq "file") {
- next if $name =~ m,^/usr,;
- } else {
- my $blacklisted = 0;
- foreach my $blackName (@functionBlackList) {
- $blacklisted = 1 if $name =~ /^$blackName/;
- }
- next if $blacklisted;
- }
-
- my $rec = $coverage{$type}->{$name};
- printf " <entry name=\"%s\" details=\"%s\">\n", $name, ($type eq "file" ? $filemap{$name} : $filemap{$rec->{file}});
- printf " <lines count=\"%s\" coverage=\"%s\"/>\n", $rec->{lines}, $rec->{linesCoverage};
- if (exists $rec->{branches}) {
- printf " <branches count=\"%s\" coverage=\"%s\"/>\n", $rec->{branches}, $rec->{branchesCoverage};
- }
- if (exists $rec->{conds}) {
- printf " <conditions count=\"%s\" coverage=\"%s\"/>\n", $rec->{conds}, $rec->{condsCoverage};
- }
- if (exists $rec->{calls}) {
- printf " <calls count=\"%s\" coverage=\"%s\"/>\n", $rec->{calls}, $rec->{callsCoverage};
- }
- print " </entry>\n";
- }
-
- printf " <summary>\n";
- printf " <lines count=\"%s\" coverage=\"%s\"/>\n", $summary{$type}->{lines}, $summary{$type}->{linesCoverage};
- printf " <branches count=\"%s\" coverage=\"%s\"/>\n", $summary{$type}->{branches}, $summary{$type}->{branchesCoverage};
- printf " <conditions count=\"%s\" coverage=\"%s\"/>\n", $summary{$type}->{conds}, $summary{$type}->{condsCoverage};
- printf " <calls count=\"%s\" coverage=\"%s\"/>\n", $summary{$type}->{calls}, $summary{$type}->{callsCoverage};
- printf " </summary>\n";
- printf "</%ss>\n", $type;
-}
-
-print "</coverage>\n";
diff -r ddd05d94cc2d scripts/coverage-report.xsl
--- a/scripts/coverage-report.xsl Thu May 22 17:13:05 2008 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:output method="html"/>
-
- <xsl:template match="coverage">
- <html>
- <head>
- <title>Coverage report</title>
- <style type="text/css">
- tbody tr.odd td.label {
- border-top: 1px solid rgb(128,128,128);
- border-bottom: 1px solid rgb(128,128,128);
- }
- tbody tr.odd td.label {
- background: rgb(200,200,200);
- }
-
- thead, tfoot {
- background: rgb(60,60,60);
- color: white;
- font-weight: bold;
- }
-
- tr td.perfect {
- background: rgb(0,255,0);
- color: black;
- }
- tr td.excellant {
- background: rgb(140,255,140);
- color: black;
- }
- tr td.good {
- background: rgb(160,255,0);
- color: black;
- }
- tr td.poor {
- background: rgb(255,160,0);
- color: black;
- }
- tr td.bad {
- background: rgb(255,140,140);
- color: black;
- }
- tr td.terrible {
- background: rgb(255,0,0);
- color: black;
- }
- </style>
- </head>
- <body>
- <h1>Coverage report</h1>
- <xsl:apply-templates/>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template match="functions">
- <h2>Function coverage</h2>
- <xsl:call-template name="content">
- <xsl:with-param name="type" select="'function'"/>
- </xsl:call-template>
- </xsl:template>
-
-
- <xsl:template match="files">
- <h2>File coverage</h2>
- <xsl:call-template name="content">
- <xsl:with-param name="type" select="'file'"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="content">
- <xsl:param name="type"/>
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Lines</th>
- <th>Branches</th>
- <th>Conditions</th>
- <th>Calls</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="entry">
- <xsl:call-template name="entry">
- <xsl:with-param name="type" select="$type"/>
- <xsl:with-param name="class">
- <xsl:choose>
- <xsl:when test="position() mod 2">
- <xsl:text>odd</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>even</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:for-each>
- </tbody>
- <tfoot>
- <xsl:for-each select="summary">
- <xsl:call-template name="entry">
- <xsl:with-param name="type" select="'summary'"/>
- <xsl:with-param name="class">
- <xsl:choose>
- <xsl:when test="position() mod 2">
- <xsl:text>odd</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>even</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:for-each>
- </tfoot>
- </table>
- </xsl:template>
-
- <xsl:template name="entry">
- <xsl:param name="type"/>
- <xsl:param name="class"/>
- <tr class="{$class}">
- <xsl:choose>
- <xsl:when test="$type = 'function'">
- <td class="label"><a href="{@details}.html#{@name}"><xsl:value-of select="@name"/></a></td>
- </xsl:when>
- <xsl:when test="$type = 'file'">
- <td class="label"><a href="{(a)details}.html"><xsl:value-of select="@name"/></a></td>
- </xsl:when>
- <xsl:otherwise>
- <td class="label">Summary</td>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:if test="count(lines)">
- <xsl:apply-templates select="lines"/>
- </xsl:if>
- <xsl:if test="not(count(lines))">
- <xsl:call-template name="missing"/>
- </xsl:if>
-
- <xsl:if test="count(branches)">
- <xsl:apply-templates select="branches"/>
- </xsl:if>
- <xsl:if test="not(count(branches))">
- <xsl:call-template name="missing"/>
- </xsl:if>
-
- <xsl:if test="count(conditions)">
- <xsl:apply-templates select="conditions"/>
- </xsl:if>
- <xsl:if test="not(count(conditions))">
- <xsl:call-template name="missing"/>
- </xsl:if>
-
- <xsl:if test="count(calls)">
- <xsl:apply-templates select="calls"/>
- </xsl:if>
- <xsl:if test="not(count(calls))">
- <xsl:call-template name="missing"/>
- </xsl:if>
-
- </tr>
- </xsl:template>
-
- <xsl:template match="lines">
- <xsl:call-template name="row"/>
- </xsl:template>
-
- <xsl:template match="branches">
- <xsl:call-template name="row"/>
- </xsl:template>
-
- <xsl:template match="conditions">
- <xsl:call-template name="row"/>
- </xsl:template>
-
- <xsl:template match="calls">
- <xsl:call-template name="row"/>
- </xsl:template>
-
- <xsl:template name="missing">
- <td></td>
- </xsl:template>
-
- <xsl:template name="row">
- <xsl:variable name="quality">
- <xsl:choose>
- <xsl:when test="@coverage = 100">
- <xsl:text>perfect</xsl:text>
- </xsl:when>
- <xsl:when test="@coverage >= 80.0">
- <xsl:text>excellant</xsl:text>
- </xsl:when>
- <xsl:when test="@coverage >= 60.0">
- <xsl:text>good</xsl:text>
- </xsl:when>
- <xsl:when test="@coverage >= 40.0">
- <xsl:text>poor</xsl:text>
- </xsl:when>
- <xsl:when test="@coverage >= 20.0">
- <xsl:text>bad</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>terrible</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <td class="{$quality}"><xsl:value-of select="@coverage"/>% of <xsl:value-of select="@count"/></td>
- </xsl:template>
-
-</xsl:stylesheet>
diff -r ddd05d94cc2d src/Makefile.am
--- a/src/Makefile.am Thu May 22 17:13:05 2008 -0400
+++ b/src/Makefile.am Thu May 22 17:27:30 2008 -0400
@@ -149,22 +149,4 @@
EXTRA_DIST += parthelper.c
endif
-cov: clean-cov
- for i in $(CLIENT_SOURCES); do \
- case $$i in *.c) ;; *) continue;; esac; \
- b=$$(basename $$i .c); \
- o_files=; \
- for i in '' _test; do \
- g="$(LV_LIBTOOL_OBJDIR)/libvirt$${i}_la-$$b.gcda"; \
- o="$(LV_LIBTOOL_OBJDIR)/libvirt$${i}_la-$$b.o"; \
- test -f "$$o" -a -f "$$g" \
- && o_files="$$o_files $$o"; \
- done; \
- test -n "$$o_files" \
- && gcov -o $(LV_LIBTOOL_OBJDIR) -b -f $$o_files > $$b.cov; \
- done
-
-clean-cov:
- rm -f *.cov *.gcov
-
-CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
+CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
2
1
[libvirt] How to solve the runtime error: "libvir: Remote error : unknown procedure: 72"?
by Amudhan Gunasekaran 23 May '08
by Amudhan Gunasekaran 23 May '08
23 May '08
Hi,
I am getting the above said runtime error (libvir: Remote error : unknown procedure: 72) when I ran a program using the api virConnectListStoragePools. I googled but I could not get any solution. Please help me solve the issue.
Thanks and Regards,
Amudhan.
3
2
Hi,
I am just trying to use libvirt storage api from python terminal, and i am
getting the following error.
>>> import libvirt
>>> con = libvirt.open(<my uri using ssh>)
>>> con.numOfDefinedStoragePools()
libvir: Remote error : Broken pipe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/libvirt.py", line 1022, in
numOfDefinedStoragePools
ret = libvirtmod.virConnectNumOfDefinedStoragePools(self._o)
AttributeError: 'module' object has no attribute
'virConnectNumOfDefinedStoragePools'
>>>
I have checked in the libvirt.c file and the function
"virConnectNumOfDefinedStoragePools(virConnectPtr conn)" is implemented.
Thanks,
3
2
23 May '08
There's a warning about type-punning in CVS libvirt.
We normally rewrite the code generated by glibc rpcgen to avoid these
warnings, but because the variable in question has a name containing
an uppercase letter, and because the regexp we're using is
case-sensitive and only matches lowercase identifiers, the rewrite
wasn't happening.
Attached patch fixes this.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
3
2
I found a couple more small bugs in the qparams code
- In the qparam_query_parse() method, after appending each (name,value)
pair of params, it failed to free the temporary buffers for the
(name,value) pair.
- Did not allow for ';' as a valid query parameter separator
- In a couple of OOM cleanup scenarios it failed to free buffers allocated
earlier on
In looking at this I decide we ought to have a test suite for this code
so I'm also including one. It has 100% coverage of all the non-OOM code
paths. The test case now passes when run under valgrind
[berrange@t60wlan libvirt-numa]$ diffstat .hg/patches/qparam-test
b/tests/qparamtest.c | 224 +++++++++++++++++++++++++++++++++++++++++++++
scripts/coverage-report.pl | 3
src/qparams.c | 26 ++++-
tests/Makefile.am | 8 +
4 files changed, 253 insertions(+), 8 deletions(-)
Dan.
diff -r aa244ae10e9e scripts/coverage-report.pl
--- a/scripts/coverage-report.pl Wed May 21 19:13:06 2008 -0400
+++ b/scripts/coverage-report.pl Wed May 21 19:42:55 2008 -0400
@@ -65,6 +65,9 @@
} elsif (/^Lines executed:(.*)%\s*of\s*(\d+)\s*$/) {
$coverage{$type}->{$name}->{lines} = $2;
$coverage{$type}->{$name}->{linesCoverage} = $1;
+ } elsif (/^No executable lines\s*$/) {
+ $coverage{$type}->{$name}->{lines} = 0;
+ $coverage{$type}->{$name}->{linesCoverage} = "100.00";
} elsif (/^Branches executed:(.*)%\s*of\s*(\d+)\s*$/) {
$coverage{$type}->{$name}->{branches} = $2;
$coverage{$type}->{$name}->{branchesCoverage} = $1;
diff -r aa244ae10e9e src/qparams.c
--- a/src/qparams.c Wed May 21 19:13:06 2008 -0400
+++ b/src/qparams.c Wed May 21 19:42:55 2008 -0400
@@ -166,7 +166,7 @@
qparam_query_parse (const char *query)
{
struct qparam_set *ps;
- const char *name, *value, *end, *eq;
+ const char *end, *eq;
ps = new_qparam_set (0, NULL);
if (!ps) return NULL;
@@ -174,9 +174,14 @@
if (!query || query[0] == '\0') return ps;
while (*query) {
+ char *name = NULL, *value = NULL;
+
/* Find the next separator, or end of the string. */
end = strchr (query, '&');
- if (!end) end = query + strlen (query);
+ if (!end)
+ end = strchr (query, ';');
+ if (!end)
+ end = query + strlen (query);
/* Find the first '=' character between here and end. */
eq = strchr (query, '=');
@@ -191,7 +196,6 @@
*/
else if (!eq) {
name = xmlURIUnescapeString (query, end - query, NULL);
- value = "";
if (!name) goto out_of_memory;
}
/* Or if we have "name=" here (works around annoying
@@ -199,7 +203,6 @@
*/
else if (eq+1 == end) {
name = xmlURIUnescapeString (query, eq - query, NULL);
- value = "";
if (!name) goto out_of_memory;
}
/* If the '=' character is at the beginning then we have
@@ -211,12 +214,23 @@
/* Otherwise it's "name=value". */
else {
name = xmlURIUnescapeString (query, eq - query, NULL);
+ if (!name)
+ goto out_of_memory;
value = xmlURIUnescapeString (eq+1, end - (eq+1), NULL);
- if (!name || !value) goto out_of_memory;
+ if (!value) {
+ VIR_FREE(name);
+ goto out_of_memory;
+ }
}
/* Append to the parameter set. */
- if (append_qparam (ps, name, value) == -1) goto out_of_memory;
+ if (append_qparam (ps, name, value ? value : "") == -1) {
+ VIR_FREE(name);
+ VIR_FREE(value);
+ goto out_of_memory;
+ }
+ VIR_FREE(name);
+ VIR_FREE(value);
next:
query = end;
diff -r aa244ae10e9e tests/Makefile.am
--- a/tests/Makefile.am Wed May 21 19:13:06 2008 -0400
+++ b/tests/Makefile.am Wed May 21 19:42:55 2008 -0400
@@ -41,7 +41,7 @@
noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
- nodeinfotest statstest
+ nodeinfotest statstest qparamtest
test_scripts = \
daemon-conf \
@@ -53,7 +53,7 @@
TESTS = xml2sexprtest sexpr2xmltest virshtest test_conf.sh xmconfigtest \
xencapstest qemuxml2argvtest qemuxml2xmltest nodeinfotest \
- statstest $(test_scripts)
+ statstest qparamtest $(test_scripts)
if ENABLE_XEN_TESTS
TESTS += reconnect
endif
@@ -130,6 +130,10 @@
statstest.c testutils.h testutils.c
statstest_LDADD = $(LDADDS)
+qparamtest_SOURCES = \
+ qparamtest.c testutils.h testutils.c
+qparamtest_LDADD = $(LDADDS)
+
reconnect_SOURCES = \
reconnect.c
reconnect_LDADD = $(LDADDS)
diff -r aa244ae10e9e tests/qparamtest.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/qparamtest.c Wed May 21 19:42:55 2008 -0400
@@ -0,0 +1,224 @@
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "testutils.h"
+#include "qparams.h"
+#include "util.h"
+
+struct qparamParseDataEntry {
+ const char *name;
+ const char *value;
+};
+
+struct qparamParseData {
+ const char *queryIn;
+ const char *queryOut;
+ int nparams;
+ const struct qparamParseDataEntry *params;
+};
+
+static int
+qparamParseTest(const void *data)
+{
+ const struct qparamParseData *expect = data;
+ struct qparam_set *actual = qparam_query_parse(expect->queryIn);
+ int ret = -1, i;
+ if (!actual)
+ return -1;
+
+ if (actual->n != expect->nparams)
+ goto fail;
+
+ for (i = 0 ; i < actual->n ; i++) {
+ if (!STREQ(expect->params[i].name,
+ actual->p[i].name))
+ goto fail;
+ if (!STREQ(expect->params[i].value,
+ actual->p[i].value))
+ goto fail;
+ }
+
+ ret = 0;
+
+fail:
+ free_qparam_set(actual);
+ return ret;
+}
+
+static int
+qparamFormatTest(const void *data)
+{
+ const struct qparamParseData *expect = data;
+ struct qparam_set *actual = qparam_query_parse(expect->queryIn);
+ char *output = NULL;
+ int ret = -1;
+
+ if (!actual)
+ return -1;
+
+ output = qparam_get_query(actual);
+ if (!output)
+ goto fail;
+
+ if (!STREQ(output, expect->queryOut))
+ goto fail;
+
+ ret = 0;
+
+fail:
+ free(output);
+ free_qparam_set(actual);
+ return ret;
+}
+
+static int
+qparamBuildTest(const void *data)
+{
+ const struct qparamParseData *expect = data;
+ struct qparam_set *actual = new_qparam_set(0, NULL);
+ int ret = -1, i;
+ if (!actual)
+ return -1;
+
+ for (i = 0 ; i < expect->nparams ; i++) {
+ if (append_qparam(actual,
+ expect->params[i].name,
+ expect->params[i].value) < 0)
+ goto fail;
+ }
+
+ if (actual->n != expect->nparams)
+ goto fail;
+
+ for (i = 0 ; i < actual->n ; i++) {
+ if (!STREQ(expect->params[i].name,
+ actual->p[i].name))
+ goto fail;
+ if (!STREQ(expect->params[i].value,
+ actual->p[i].value))
+ goto fail;
+ }
+
+ ret = 0;
+
+fail:
+ free_qparam_set(actual);
+ return ret;
+}
+
+
+static int
+qparamTestNewVargs(const void *data ATTRIBUTE_UNUSED)
+{
+ struct qparam_set *actual = new_qparam_set(0, "foo", "one", "bar", "two", NULL);
+ int ret = -1;
+ if (!actual)
+ return -1;
+
+ if (actual->n != 2)
+ goto fail;
+
+ if (!STREQ(actual->p[0].name, "foo"))
+ goto fail;
+
+ if (!STREQ(actual->p[0].value, "one"))
+ goto fail;
+
+ if (!STREQ(actual->p[1].name, "bar"))
+ goto fail;
+
+ if (!STREQ(actual->p[1].value, "two"))
+ goto fail;
+
+ ret = 0;
+
+fail:
+ free_qparam_set(actual);
+ return ret;
+}
+
+static int
+qparamTestAddVargs(const void *data ATTRIBUTE_UNUSED)
+{
+ struct qparam_set *actual = new_qparam_set(0, NULL);
+ int ret = -1;
+ if (!actual)
+ return -1;
+
+ if (append_qparams(actual, "foo", "one", "bar", "two", NULL) < 0)
+ goto fail;
+
+ if (actual->n != 2)
+ goto fail;
+
+ if (!STREQ(actual->p[0].name, "foo"))
+ goto fail;
+
+ if (!STREQ(actual->p[0].value, "one"))
+ goto fail;
+
+ if (!STREQ(actual->p[1].name, "bar"))
+ goto fail;
+
+ if (!STREQ(actual->p[1].value, "two"))
+ goto fail;
+
+ ret = 0;
+
+fail:
+ free_qparam_set(actual);
+ return ret;
+}
+
+static const struct qparamParseDataEntry params1[] = { { "foo", "one" }, { "bar", "two" } };
+static const struct qparamParseDataEntry params2[] = { { "foo", "one" }, { "foo", "two" } };
+static const struct qparamParseDataEntry params3[] = { { "foo", "&one" }, { "bar", "&two" } };
+static const struct qparamParseDataEntry params4[] = { { "foo", "" } };
+static const struct qparamParseDataEntry params5[] = { { "foo", "one two" } };
+static const struct qparamParseDataEntry params6[] = { { "foo", "one" } };
+
+int
+main(void)
+{
+ int ret = 0;
+
+#define DO_TEST(queryIn,queryOut,params) \
+ do { \
+ struct qparamParseData info = { \
+ queryIn, \
+ queryOut ? queryOut : queryIn, \
+ sizeof(params)/sizeof(params[0]), \
+ params }; \
+ if (virtTestRun("Parse " queryIn, \
+ 1, qparamParseTest, &info) < 0) \
+ ret = -1; \
+ if (virtTestRun("Format " queryIn, \
+ 1, qparamFormatTest, &info) < 0) \
+ ret = -1; \
+ if (virtTestRun("Build " queryIn, \
+ 1, qparamBuildTest, &info) < 0) \
+ ret = -1; \
+ } while (0)
+
+
+ DO_TEST("foo=one&bar=two", NULL, params1);
+ DO_TEST("foo=one&foo=two", NULL, params2);
+ DO_TEST("foo=one&&foo=two", "foo=one&foo=two", params2);
+ DO_TEST("foo=one;foo=two", "foo=one&foo=two", params2);
+ DO_TEST("foo", "foo=", params4);
+ DO_TEST("foo=", NULL, params4);
+ DO_TEST("foo=&", "foo=", params4);
+ DO_TEST("foo=&&", "foo=", params4);
+ DO_TEST("foo=one%20two", NULL, params5);
+ DO_TEST("=bogus&foo=one", "foo=one", params6);
+
+ if (virtTestRun("New vargs", 1, qparamTestNewVargs, NULL) < 0)
+ ret = -1;
+ if (virtTestRun("Add vargs", 1, qparamTestAddVargs, NULL) < 0)
+ ret = -1;
+
+ exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
+}
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
4
5
Daniel pointed out that the way we build up the QEMU argv strnig is becoming
rather unscalable / error prone. This patch refactors it into to use a short
macro to do memory allocation/reallocation, which clears it up quite nicely
qemu_conf.c | 293 +++++++++++++++++++++++-------------------------------------
1 file changed, 116 insertions(+), 177 deletions(-)
Regards,
Daniel
diff -r 7c1231eebae9 src/qemu_conf.c
--- a/src/qemu_conf.c Thu May 22 12:31:13 2008 -0400
+++ b/src/qemu_conf.c Thu May 22 12:31:46 2008 -0400
@@ -2411,8 +2419,8 @@
int qemudBuildCommandLine(virConnectPtr conn,
struct qemud_driver *driver,
struct qemud_vm *vm,
- char ***argv) {
- int len, n = -1, i;
+ char ***retargv) {
+ int i;
char memory[50];
char vcpus[50];
char boot[QEMUD_MAX_BOOT_DEVS+1];
@@ -2424,6 +2432,8 @@
struct qemud_vm_chr_def *parallel = vm->def->parallels;
struct utsname ut;
int disableKQEMU = 0;
+ int qargc = 0, qarga = 0;
+ char **qargv = NULL;
if (vm->qemuVersion == 0) {
if (qemudExtractVersionInfo(vm->def->os.binary,
@@ -2451,65 +2461,46 @@
vm->def->virtType == QEMUD_VIRT_QEMU)
disableKQEMU = 1;
- len = 1 + /* qemu */
- 1 + /* Stopped */
- 2 + /* machine type */
- disableKQEMU + /* Disable kqemu */
- (vm->qemuCmdFlags & QEMUD_CMD_FLAG_NAME ? 2 : 0) + /* -name XXX */
- 2 * vm->def->ndisks + /* disks*/
- (vm->def->nnets > 0 ? (4 * vm->def->nnets) : 2) + /* networks */
- 1 + /* usb */
- 2 * vm->def->ninputs + /* input devices */
- ((vm->def->nsounds > 0) ? 2 : 0) + /* sound */
- (vm->def->nserials > 0 ? (2 * vm->def->nserials) : 2) + /* character devices */
- (vm->def->nparallels > 0 ? (2 * vm->def->nparallels) : 2) + /* character devices */
- 2 + /* memory*/
- 2 + /* cpus */
- 2 + /* boot device */
- 2 + /* monitor */
- (vm->def->localtime ? 1 : 0) + /* localtime */
- (vm->qemuCmdFlags & QEMUD_CMD_FLAG_NO_REBOOT &&
- vm->def->noReboot ? 1 : 0) + /* no-reboot */
- (vm->def->features & QEMUD_FEATURE_ACPI ? 0 : 1) + /* acpi */
- (vm->def->os.kernel[0] ? 2 : 0) + /* kernel */
- (vm->def->os.initrd[0] ? 2 : 0) + /* initrd */
- (vm->def->os.cmdline[0] ? 2 : 0) + /* cmdline */
- (vm->def->os.bootloader[0] ? 2 : 0) + /* bootloader */
- (vm->def->graphicsType == QEMUD_GRAPHICS_VNC ? 2 :
- (vm->def->graphicsType == QEMUD_GRAPHICS_SDL ? 0 : 1)) + /* graphics */
- (vm->migrateFrom[0] ? 2 : 0); /* migrateFrom */
+#define ADD_ARG_SPACE \
+ do { \
+ if (qargc == qarga) { \
+ qarga += 10; \
+ if (VIR_REALLOC_N(qargv, qarga) < 0) \
+ goto no_memory; \
+ } \
+ } while (0)
+
+#define ADD_ARG(thisarg) \
+ do { \
+ ADD_ARG_SPACE; \
+ qargv[qargc++] = thisarg; \
+ } while (0)
+
+#define ADD_ARG_LIT(thisarg) \
+ do { \
+ ADD_ARG_SPACE; \
+ if ((qargv[qargc++] = strdup(thisarg)) == NULL) \
+ goto no_memory; \
+ } while (0)
snprintf(memory, sizeof(memory), "%lu", vm->def->memory/1024);
snprintf(vcpus, sizeof(vcpus), "%d", vm->def->vcpus);
- if (!(*argv = calloc(len+1, sizeof(**argv))))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->os.binary)))
- goto no_memory;
- if (!((*argv)[++n] = strdup("-S")))
- goto no_memory;
- if (!((*argv)[++n] = strdup("-M")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->os.machine)))
- goto no_memory;
- if (disableKQEMU) {
- if (!((*argv)[++n] = strdup("-no-kqemu")))
- goto no_memory;
- }
- if (!((*argv)[++n] = strdup("-m")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(memory)))
- goto no_memory;
- if (!((*argv)[++n] = strdup("-smp")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vcpus)))
- goto no_memory;
+
+ ADD_ARG_LIT(vm->def->os.binary);
+ ADD_ARG_LIT("-S");
+ ADD_ARG_LIT("-M");
+ ADD_ARG_LIT(vm->def->os.machine);
+ if (disableKQEMU)
+ ADD_ARG_LIT("-no-kqemu");
+ ADD_ARG_LIT("-m");
+ ADD_ARG_LIT(memory);
+ ADD_ARG_LIT("-smp");
+ ADD_ARG_LIT(vcpus);
if (vm->qemuCmdFlags & QEMUD_CMD_FLAG_NAME) {
- if (!((*argv)[++n] = strdup("-name")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->name)))
- goto no_memory;
+ ADD_ARG_LIT("-name");
+ ADD_ARG_LIT(vm->def->name);
}
/*
* NB, -nographic *MUST* come before any serial, or monitor
@@ -2518,31 +2509,21 @@
* if you ask for nographic. So we have to make sure we override
* these defaults ourselves...
*/
- if (vm->def->graphicsType == QEMUD_GRAPHICS_NONE) {
- if (!((*argv)[++n] = strdup("-nographic")))
- goto no_memory;
- }
-
- if (!((*argv)[++n] = strdup("-monitor")))
- goto no_memory;
- if (!((*argv)[++n] = strdup("pty")))
- goto no_memory;
-
- if (vm->def->localtime) {
- if (!((*argv)[++n] = strdup("-localtime")))
- goto no_memory;
- }
-
- if (vm->qemuCmdFlags & QEMUD_CMD_FLAG_NO_REBOOT &&
- vm->def->noReboot) {
- if (!((*argv)[++n] = strdup("-no-reboot")))
- goto no_memory;
- }
-
- if (!(vm->def->features & QEMUD_FEATURE_ACPI)) {
- if (!((*argv)[++n] = strdup("-no-acpi")))
- goto no_memory;
- }
+ if (vm->def->graphicsType == QEMUD_GRAPHICS_NONE)
+ ADD_ARG_LIT("-nographic");
+
+ ADD_ARG_LIT("-monitor");
+ ADD_ARG_LIT("pty");
+
+ if (vm->def->localtime)
+ ADD_ARG_LIT("-localtime");
+
+ if ((vm->qemuCmdFlags & QEMUD_CMD_FLAG_NO_REBOOT) &&
+ vm->def->noReboot)
+ ADD_ARG_LIT("-no-reboot");
+
+ if (!(vm->def->features & QEMUD_FEATURE_ACPI))
+ ADD_ARG_LIT("-no-acpi");
if (!vm->def->os.bootloader[0]) {
for (i = 0 ; i < vm->def->os.nBootDevs ; i++) {
@@ -2565,34 +2546,24 @@
}
}
boot[vm->def->os.nBootDevs] = '\0';
- if (!((*argv)[++n] = strdup("-boot")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(boot)))
- goto no_memory;
+ ADD_ARG_LIT("-boot");
+ ADD_ARG_LIT(boot);
if (vm->def->os.kernel[0]) {
- if (!((*argv)[++n] = strdup("-kernel")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->os.kernel)))
- goto no_memory;
+ ADD_ARG_LIT("-kernel");
+ ADD_ARG_LIT(vm->def->os.kernel);
}
if (vm->def->os.initrd[0]) {
- if (!((*argv)[++n] = strdup("-initrd")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->os.initrd)))
- goto no_memory;
+ ADD_ARG_LIT("-initrd");
+ ADD_ARG_LIT(vm->def->os.initrd);
}
if (vm->def->os.cmdline[0]) {
- if (!((*argv)[++n] = strdup("-append")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->os.cmdline)))
- goto no_memory;
- }
- } else {
- if (!((*argv)[++n] = strdup("-bootloader")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->os.bootloader)))
- goto no_memory;
+ ADD_ARG_LIT("-append");
+ ADD_ARG_LIT(vm->def->os.cmdline);
+ }
+ } else {
+ ADD_ARG_LIT("-bootloader");
+ ADD_ARG_LIT(vm->def->os.bootloader);
}
/* If QEMU supports -drive param instead of old -hda, -hdb, -cdrom .. */
@@ -2621,8 +2592,6 @@
const char *media = NULL;
int bootable = 0;
int idx = virDiskNameToIndex(disk->dst);
- if (!((*argv)[++n] = strdup("-drive")))
- goto no_memory;
if (idx < 0) {
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
@@ -2654,8 +2623,8 @@
idx,
bootable ? ",boot=on" : "");
- if (!((*argv)[++n] = strdup(opt)))
- goto no_memory;
+ ADD_ARG_LIT("-drive");
+ ADD_ARG_LIT(opt);
disk = disk->next;
}
} else {
@@ -2684,20 +2653,16 @@
snprintf(file, PATH_MAX, "%s", disk->src);
- if (!((*argv)[++n] = strdup(dev)))
- goto no_memory;
- if (!((*argv)[++n] = strdup(file)))
- goto no_memory;
+ ADD_ARG_LIT(dev);
+ ADD_ARG_LIT(file);
disk = disk->next;
}
}
if (!net) {
- if (!((*argv)[++n] = strdup("-net")))
- goto no_memory;
- if (!((*argv)[++n] = strdup("none")))
- goto no_memory;
+ ADD_ARG_LIT("-net");
+ ADD_ARG_LIT("none");
} else {
int vlan = 0;
while (net) {
@@ -2712,19 +2677,14 @@
(net->model[0] ? ",model=" : ""), net->model) >= sizeof(nic))
goto error;
- if (!((*argv)[++n] = strdup("-net")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(nic)))
- goto no_memory;
-
- if (!((*argv)[++n] = strdup("-net")))
- goto no_memory;
+ ADD_ARG_LIT("-net");
+ ADD_ARG_LIT(nic);
+ ADD_ARG_LIT("-net");
switch (net->type) {
case QEMUD_NET_NETWORK:
case QEMUD_NET_BRIDGE:
- if (!((*argv)[++n] = qemudNetworkIfaceConnect(conn, driver, vm, net, vlan)))
- goto error;
+ ADD_ARG(qemudNetworkIfaceConnect(conn, driver, vm, net, vlan));
break;
case QEMUD_NET_ETHERNET:
@@ -2736,8 +2696,7 @@
vlan) >= (PATH_MAX-1))
goto error;
- if (!((*argv)[++n] = strdup(arg)))
- goto no_memory;
+ ADD_ARG_LIT(arg);
}
break;
@@ -2765,8 +2724,7 @@
vlan) >= (PATH_MAX-1))
goto error;
- if (!((*argv)[++n] = strdup(arg)))
- goto no_memory;
+ ADD_ARG_LIT(arg);
}
break;
@@ -2777,8 +2735,7 @@
if (snprintf(arg, PATH_MAX-1, "user,vlan=%d", vlan) >= (PATH_MAX-1))
goto error;
- if (!((*argv)[++n] = strdup(arg)))
- goto no_memory;
+ ADD_ARG_LIT(arg);
}
}
@@ -2788,10 +2745,8 @@
}
if (!serial) {
- if (!((*argv)[++n] = strdup("-serial")))
- goto no_memory;
- if (!((*argv)[++n] = strdup("none")))
- goto no_memory;
+ ADD_ARG_LIT("-serial");
+ ADD_ARG_LIT("none");
} else {
while (serial) {
char buf[4096];
@@ -2799,20 +2754,16 @@
if (qemudBuildCommandLineChrDevStr(serial, buf, sizeof(buf)) < 0)
goto error;
- if (!((*argv)[++n] = strdup("-serial")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(buf)))
- goto no_memory;
+ ADD_ARG_LIT("-serial");
+ ADD_ARG_LIT(buf);
serial = serial->next;
}
}
if (!parallel) {
- if (!((*argv)[++n] = strdup("-parallel")))
- goto no_memory;
- if (!((*argv)[++n] = strdup("none")))
- goto no_memory;
+ ADD_ARG_LIT("-parallel");
+ ADD_ARG_LIT("none");
} else {
while (parallel) {
char buf[4096];
@@ -2820,23 +2771,18 @@
if (qemudBuildCommandLineChrDevStr(parallel, buf, sizeof(buf)) < 0)
goto error;
- if (!((*argv)[++n] = strdup("-parallel")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(buf)))
- goto no_memory;
+ ADD_ARG_LIT("-parallel");
+ ADD_ARG_LIT(buf);
parallel = parallel->next;
}
}
- if (!((*argv)[++n] = strdup("-usb")))
- goto no_memory;
+ ADD_ARG_LIT("-usb");
while (input) {
if (input->bus == QEMU_INPUT_BUS_USB) {
- if (!((*argv)[++n] = strdup("-usbdevice")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(input->type == QEMU_INPUT_TYPE_MOUSE ? "mouse" : "tablet")))
- goto no_memory;
+ ADD_ARG_LIT("-usbdevice");
+ ADD_ARG_LIT(input->type == QEMU_INPUT_TYPE_MOUSE ? "mouse" : "tablet");
}
input = input->next;
@@ -2870,15 +2816,11 @@
if (ret < 0 || ret >= (int)sizeof(vncdisplay))
goto error;
- if (!((*argv)[++n] = strdup("-vnc")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vncdisplay)))
- goto no_memory;
+ ADD_ARG_LIT("-vnc");
+ ADD_ARG_LIT(vncdisplay);
if (vm->def->keymap) {
- if (!((*argv)[++n] = strdup("-k")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->def->keymap)))
- goto no_memory;
+ ADD_ARG_LIT("-k");
+ ADD_ARG_LIT(vm->def->keymap);
}
} else if (vm->def->graphicsType == QEMUD_GRAPHICS_NONE) {
/* Nada - we added -nographic earlier in this function */
@@ -2892,12 +2834,11 @@
char *modstr = calloc(1, size+1);
if (!modstr)
goto no_memory;
- if (!((*argv)[++n] = strdup("-soundhw")))
- goto no_memory;
while(sound && size > 0) {
const char *model = qemudSoundModelToString(sound->model);
if (!model) {
+ free(modstr);
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"%s", _("invalid sound model"));
goto error;
@@ -2908,19 +2849,18 @@
if (sound)
strncat(modstr, ",", size--);
}
- if (!((*argv)[++n] = modstr))
- goto no_memory;
+ ADD_ARG_LIT("-soundhw");
+ ADD_ARG(modstr);
}
if (vm->migrateFrom[0]) {
- if (!((*argv)[++n] = strdup("-incoming")))
- goto no_memory;
- if (!((*argv)[++n] = strdup(vm->migrateFrom)))
- goto no_memory;
- }
-
- (*argv)[++n] = NULL;
-
+ ADD_ARG_LIT("-incoming");
+ ADD_ARG_LIT(vm->migrateFrom);
+ }
+
+ ADD_ARG(NULL);
+
+ *retargv = qargv;
return 0;
no_memory:
@@ -2934,11 +2874,10 @@
vm->tapfds = NULL;
vm->ntapfds = 0;
}
- if (argv) {
- for (i = 0 ; i < n ; i++)
- free((*argv)[i]);
- free(*argv);
- *argv = NULL;
+ if (qargv) {
+ for (i = 0 ; i < qargc ; i++)
+ free((qargv)[i]);
+ free(qargv);
}
return -1;
}
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
3
3
./configure --prefix=/usr --with-xen --without-sasl --without-avahi
--without-test --without-libvirtd --sysconfdir=/etc --localstatedir=/var
--without-qemu --without-storage-lvm --without-storage-iscsi
gcc -DUSE_READLINE -g -O2 -Wall -Wformat -Wformat-security
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fasynchronous-unwind-tables -o .libs/virsh virsh-virsh.o
virsh-console.o virsh-util-lib.o -Wall -Wformat -Wformat-security
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fasynchronous-unwind-tables ./.libs/libvirt.so
/usr/lib64/libxml2.so -ldl -lm /usr/lib64/libgnutls.so -L/usr/lib64
/usr/lib64/libtasn1.so -lz /usr/lib64/libgcrypt.so
/usr/lib64/libgpg-error.so ../gnulib/lib/.libs/libgnu.a -lreadline
-lxenstore
./.libs/libvirt.so: undefined reference to `storageRegister'
collect2: ld returned 1 exit status
make[2]: *** [virsh] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/libvirt_test_la-remote_internal.Tpo
.deps/libvirt_test_la-remote_internal.Plo
make[2]: Leaving directory `/home/skinkie/external/libvirt/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/skinkie/external/libvirt'
make: *** [all] Error 2
2
2
22 May '08
Would it be possible to enable fetch of the interface stats of the dom0
via the API?
Stefan
4
4
22 May '08
The XML format allows for an initial CPU mask to be specified for a guests
vCPUs. eg with this XML:
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
Since we have CPU pinning support from my previous patch, adding in the
initial pinning is fairly easy. We first pass the '-S' arg to QEMU when
forking it. This causes it to initialize, but not start the CPUs in the
guest. We then set the affinity mask for all its CPUs, and then send
the 'cont' command to the monitor to start execution.
src/qemu_conf.c | 44 +++++++
src/qemu_conf.h | 3
src/qemu_driver.c | 77 +++++++++----
src/xml.c | 5
src/xml.h | 4
tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args | 2
tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args | 2
tests/qemuxml2argvdata/qemuxml2argv-boot-network.args | 2
tests/qemuxml2argvdata/qemuxml2argv-bootloader.args | 2
tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args | 2
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args | 2
tests/qemuxml2argvdata/qemuxml2argv-console-compat.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-many.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args | 2
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args | 2
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args | 2
tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args | 2
tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args | 2
tests/qemuxml2argvdata/qemuxml2argv-input-xen.args | 2
tests/qemuxml2argvdata/qemuxml2argv-minimal.args | 2
tests/qemuxml2argvdata/qemuxml2argv-minimal.xml | 2
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args | 2
tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args | 2
tests/qemuxml2argvdata/qemuxml2argv-net-user.args | 2
tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args | 2
tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-file.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-many.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args | 2
tests/qemuxml2argvdata/qemuxml2argv-sound.args | 2
39 files changed, 140 insertions(+), 61 deletions(-)
Dan.
diff -r 3bbea433803f src/qemu_conf.c
--- a/src/qemu_conf.c Fri May 16 17:39:29 2008 -0400
+++ b/src/qemu_conf.c Fri May 16 17:40:39 2008 -0400
@@ -56,6 +56,7 @@
#include "memory.h"
#include "verify.h"
#include "c-ctype.h"
+#include "xml.h"
#define qemudLog(level, msg...) fprintf(stderr, msg)
@@ -1743,6 +1744,25 @@
}
xmlXPathFreeObject(obj);
+ /* Extract domain vcpu info */
+ obj = xmlXPathEval(BAD_CAST "string(/domain/vcpu[1]/@cpuset)", ctxt);
+ if ((obj == NULL) || (obj->type != XPATH_STRING) ||
+ (obj->stringval == NULL) || (obj->stringval[0] == 0)) {
+ /* Allow use on all CPUS */
+ memset(def->cpumask, 1, QEMUD_CPUMASK_LEN);
+ } else {
+ char *set = (char *)obj->stringval;
+ memset(def->cpumask, 0, QEMUD_CPUMASK_LEN);
+ if (virParseCpuSet(conn, (const char **)&set,
+ 0, def->cpumask,
+ QEMUD_CPUMASK_LEN) < 0) {
+ qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ "%s", _("malformed vcpu mask information"));
+ goto error;
+ }
+ }
+ xmlXPathFreeObject(obj);
+
/* See if ACPI feature is requested */
obj = xmlXPathEval(BAD_CAST "/domain/features/acpi", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
@@ -2431,6 +2451,7 @@
disableKQEMU = 1;
len = 1 + /* qemu */
+ 1 + /* Stopped */
2 + /* machine type */
disableKQEMU + /* Disable kqemu */
(vm->qemuCmdFlags & QEMUD_CMD_FLAG_NAME ? 2 : 0) + /* -name XXX */
@@ -2464,6 +2485,8 @@
goto no_memory;
if (!((*argv)[++n] = strdup(vm->def->os.binary)))
goto no_memory;
+ if (!((*argv)[++n] = strdup("-S")))
+ goto no_memory;
if (!((*argv)[++n] = strdup("-M")))
goto no_memory;
if (!((*argv)[++n] = strdup(vm->def->os.machine)))
@@ -3876,7 +3899,7 @@
const struct qemud_vm_sound_def *sound;
const struct qemud_vm_chr_def *chr;
const char *type = NULL;
- int n;
+ int n, allones = 1;
if (!(type = qemudVirtTypeToString(def->virtType))) {
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
@@ -3897,7 +3920,24 @@
virBufferVSprintf(&buf, " <memory>%lu</memory>\n", def->maxmem);
virBufferVSprintf(&buf, " <currentMemory>%lu</currentMemory>\n", def->memory);
- virBufferVSprintf(&buf, " <vcpu>%d</vcpu>\n", def->vcpus);
+
+ for (n = 0 ; n < QEMUD_CPUMASK_LEN ; n++)
+ if (def->cpumask[n] != 1)
+ allones = 0;
+
+ if (allones) {
+ virBufferVSprintf(&buf, " <vcpu>%d</vcpu>\n", def->vcpus);
+ } else {
+ char *cpumask = NULL;
+ if ((cpumask = virSaveCpuSet(conn, def->cpumask, QEMUD_CPUMASK_LEN)) == NULL) {
+ qemudReportError(conn, NULL, NULL, VIR_ERR_NO_MEMORY,
+ "%s", _("allocating cpu mask"));
+ goto cleanup;
+ }
+ virBufferVSprintf(&buf, " <vcpu cpuset='%s'>%d</vcpu>\n", cpumask, def->vcpus);
+ free(cpumask);
+ }
+
if (def->os.bootloader[0])
virBufferVSprintf(&buf, " <bootloader>%s</bootloader>\n", def->os.bootloader);
virBufferAddLit(&buf, " <os>\n");
diff -r 3bbea433803f src/qemu_conf.h
--- a/src/qemu_conf.h Fri May 16 17:39:29 2008 -0400
+++ b/src/qemu_conf.h Fri May 16 17:40:39 2008 -0400
@@ -33,6 +33,7 @@
#include "iptables.h"
#include "capabilities.h"
#include <netinet/in.h>
+#include <sched.h>
#define qemudDebug(fmt, ...) do {} while(0)
@@ -104,6 +105,7 @@
#define QEMUD_MAX_NAME_LEN 50
#define QEMUD_MAX_XML_LEN 4096
#define QEMUD_MAX_ERROR_LEN 1024
+#define QEMUD_CPUMASK_LEN CPU_SETSIZE
/* Stores the virtual network interface configuration */
struct qemud_vm_net_def {
@@ -282,6 +284,7 @@
unsigned long memory;
unsigned long maxmem;
int vcpus;
+ char cpumask[QEMUD_CPUMASK_LEN];
int noReboot;
diff -r 3bbea433803f src/qemu_driver.c
--- a/src/qemu_driver.c Fri May 16 17:39:29 2008 -0400
+++ b/src/qemu_driver.c Fri May 16 17:40:39 2008 -0400
@@ -713,6 +713,50 @@
return 0;
}
+static int
+qemudInitCpus(virConnectPtr conn,
+ struct qemud_driver *driver,
+ struct qemud_vm *vm) {
+ char *info = NULL;
+ cpu_set_t mask;
+ int i, maxcpu = QEMUD_CPUMASK_LEN;
+ virNodeInfo nodeinfo;
+
+ if (virNodeInfoPopulate(conn, &nodeinfo) < 0)
+ return -1;
+
+ /* setaffinity fails if you set bits for CPUs which
+ * aren't present, so we have to limit ourselves */
+ if (maxcpu > nodeinfo.cpus)
+ maxcpu = nodeinfo.cpus;
+
+ CPU_ZERO(&mask);
+ for (i = 0 ; i < maxcpu ; i++)
+ if (vm->def->cpumask[i])
+ CPU_SET(i, &mask);
+
+ for (i = 0 ; i < vm->nvcpupids ; i++) {
+ if (sched_setaffinity(vm->vcpupids[i],
+ sizeof(mask), &mask) < 0) {
+ qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ _("failed to set CPU affinity %s"),
+ strerror(errno));
+ return -1;
+ }
+ }
+
+ /* Allow the CPUS to start executing */
+ if (qemudMonitorCommand(driver, vm, "cont", &info) < 0) {
+ qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ "%s", _("resume operation failed"));
+ return -1;
+ }
+ free(info);
+
+ return 0;
+}
+
+
static int qemudNextFreeVNCPort(struct qemud_driver *driver ATTRIBUTE_UNUSED) {
int i;
@@ -870,28 +914,17 @@
}
if (ret == 0) {
- if (virEventAddHandle(vm->stdout,
- POLLIN | POLLERR | POLLHUP,
- qemudDispatchVMEvent,
- driver) < 0) {
- qemudShutdownVMDaemon(conn, driver, vm);
- return -1;
- }
-
- if (virEventAddHandle(vm->stderr,
- POLLIN | POLLERR | POLLHUP,
- qemudDispatchVMEvent,
- driver) < 0) {
- qemudShutdownVMDaemon(conn, driver, vm);
- return -1;
- }
-
- if (qemudWaitForMonitor(conn, driver, vm) < 0) {
- qemudShutdownVMDaemon(conn, driver, vm);
- return -1;
- }
-
- if (qemudDetectVcpuPIDs(conn, driver, vm) < 0) {
+ if ((virEventAddHandle(vm->stdout,
+ POLLIN | POLLERR | POLLHUP,
+ qemudDispatchVMEvent,
+ driver) < 0) ||
+ (virEventAddHandle(vm->stderr,
+ POLLIN | POLLERR | POLLHUP,
+ qemudDispatchVMEvent,
+ driver) < 0) ||
+ (qemudWaitForMonitor(conn, driver, vm) < 0) ||
+ (qemudDetectVcpuPIDs(conn, driver, vm) < 0) ||
+ (qemudInitCpus(conn, driver, vm) < 0)) {
qemudShutdownVMDaemon(conn, driver, vm);
return -1;
}
diff -r 3bbea433803f src/xml.c
--- a/src/xml.c Fri May 16 17:39:29 2008 -0400
+++ b/src/xml.c Fri May 16 17:40:39 2008 -0400
@@ -60,7 +60,7 @@
* Parser and converter for the CPUset strings used in libvirt *
* *
************************************************************************/
-#if WITH_XEN
+#if WITH_XEN || WITH_QEMU
/**
* parseCpuNumber:
* @str: pointer to the char pointer used
@@ -249,8 +249,9 @@
_("topology cpuset syntax error"), 0);
return (-1);
}
+#endif
-
+#if WITH_XEN
/**
* virConvertCpuSet:
* @conn: connection
diff -r 3bbea433803f src/xml.h
--- a/src/xml.h Fri May 16 17:39:29 2008 -0400
+++ b/src/xml.h Fri May 16 17:40:39 2008 -0400
@@ -32,7 +32,7 @@
xmlXPathContextPtr ctxt,
xmlNodePtr **list);
-#if WITH_XEN
+#if WITH_XEN || WITH_QEMU
int virParseCpuSet (virConnectPtr conn,
const char **str,
char sep,
@@ -41,6 +41,8 @@
char * virSaveCpuSet (virConnectPtr conn,
char *cpuset,
int maxcpu);
+#endif
+#if WITH_XEN
char * virConvertCpuSet(virConnectPtr conn,
const char *str,
int maxcpu);
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot d -cdrom /dev/cdrom -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot d -cdrom /dev/cdrom -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot a -hda /dev/HostVG/QEMUGuest1 -fda /tmp/firmware.img -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot a -hda /dev/HostVG/QEMUGuest1 -fda /tmp/firmware.img -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-boot-network.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot n -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot n -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-bootloader.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu-kvm -M xenner -m 214 -smp 1 -nographic -monitor pty -no-acpi -bootloader /usr/bin/pygrub -cdrom /dev/cdrom -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu-kvm -S -M xenner -m 214 -smp 1 -nographic -monitor pty -no-acpi -bootloader /usr/bin/pygrub -cdrom /dev/cdrom -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -localtime -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -localtime -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-console-compat.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -cdrom /root/boot.iso -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -cdrom /root/boot.iso -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -fda /dev/fd0 -fdb /tmp/firmware.img -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -fda /dev/fd0 -fdb /tmp/firmware.img -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-disk-many.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -hdb /dev/HostVG/QEMUGuest2 -hdc /tmp/data.img -hdd /tmp/logs.img -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -hdb /dev/HostVG/QEMUGuest2 -hdc /tmp/data.img -hdd /tmp/logs.img -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=virtio,index=0 -drive file=/tmp/logs.img,if=virtio,index=6 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=virtio,index=0 -drive file=/tmp/logs.img,if=virtio,index=6 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=xen,index=0 -drive file=/tmp/logs.img,if=xen,index=6 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=xen,index=0 -drive file=/tmp/logs.img,if=xen,index=6 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice mouse
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice mouse
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice tablet
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice tablet
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-input-xen.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/xenner -M xenner -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc :-5901
\ No newline at end of file
+/usr/bin/xenner -S -M xenner -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc :-5901
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-minimal.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -name QEMUGuest1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -name QEMUGuest1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
--- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml Fri May 16 17:40:39 2008 -0400
@@ -3,7 +3,7 @@
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219200</memory>
<currentMemory>219200</currentMemory>
- <vcpu>1</vcpu>
+ <vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-reboot -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-reboot -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-net-user.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0 -net user,vlan=0 -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0 -net user,vlan=0 -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0,model=virtio -net user,vlan=0 -serial none -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0,model=virtio -net user,vlan=0 -serial none -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel tcp:127.0.0.1:9999,listen -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel tcp:127.0.0.1:9999,listen -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial /dev/ttyS2 -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial /dev/ttyS2 -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-file.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial file:/tmp/serial.log -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial file:/tmp/serial.log -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-many.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -serial file:/tmp/serial.log -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -serial file:/tmp/serial.log -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial telnet:127.0.0.1:9999,listen -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial telnet:127.0.0.1:9999,listen -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial tcp:127.0.0.1:9999 -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial tcp:127.0.0.1:9999 -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial udp:127.0.0.1:9998@127.0.0.1:9999 -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial udp:127.0.0.1:9998@127.0.0.1:9999 -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial unix:/tmp/serial.sock -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial unix:/tmp/serial.sock -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial vc -parallel none -usb
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial vc -parallel none -usb
\ No newline at end of file
diff -r 3bbea433803f tests/qemuxml2argvdata/qemuxml2argv-sound.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.args Fri May 16 17:39:29 2008 -0400
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.args Fri May 16 17:40:39 2008 -0400
@@ -1,1 +1,1 @@
-/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16
\ No newline at end of file
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16
\ No newline at end of file
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
5
5