[libvirt] [PATCH] build: fix mingw build without sasl
by Eric Blake
Detected by autogen.sh on a cross-mingw build.
* src/libvirt_private.syms (virnetsaslcontext.h): Move symbols...
* src/libvirt_sasl.syms: ...to new file.
* src/Makefile.am (USED_SYM_FILES) [HAVE_SASL]: Use new file.
(EXTRA_DIST): Ship it.
---
Pushing under the build-breaker rule.
src/Makefile.am | 13 +++++++++----
src/libvirt_private.syms | 15 ---------------
src/libvirt_sasl.syms | 20 ++++++++++++++++++++
3 files changed, 29 insertions(+), 19 deletions(-)
create mode 100644 src/libvirt_sasl.syms
diff --git a/src/Makefile.am b/src/Makefile.am
index 272dfbf..302d395 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1188,18 +1188,23 @@ if WITH_NETWORK
USED_SYM_FILES += libvirt_network.syms
endif
+if HAVE_SASL
+USED_SYM_FILES += libvirt_sasl.syms
+endif
+
EXTRA_DIST += \
libvirt_public.syms \
libvirt_private.syms \
libvirt_driver_modules.syms \
libvirt_bridge.syms \
+ libvirt_daemon.syms \
libvirt_linux.syms \
libvirt_macvtap.syms \
- libvirt_daemon.syms \
- libvirt_nwfilter.syms \
+ libvirt_network.syms \
+ libvirt_nwfilter.syms \
+ libvirt_sasl.syms \
libvirt_vmx.syms \
- libvirt_xenxs.syms \
- libvirt_network.syms
+ libvirt_xenxs.syms
GENERATED_SYM_FILES = libvirt.syms libvirt.def libvirt_qemu.def
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index d79f65c..caf9f59 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1178,20 +1178,6 @@ virNetMessageQueueServe;
virNetMessageSaveError;
-# virnetsaslcontext.h
-virNetSASLContextCheckIdentity;
-virNetSASLContextNewServer;
-virNetSASLSessionExtKeySize;
-virNetSASLSessionFree;
-virNetSASLSessionGetIdentity;
-virNetSASLSessionGetKeySize;
-virNetSASLSessionListMechanisms;
-virNetSASLSessionNewServer;
-virNetSASLSessionSecProps;
-virNetSASLSessionServerStart;
-virNetSASLSessionServerStep;
-
-
# virnetserver.h
virNetServerAddProgram;
virNetServerAddService;
@@ -1232,7 +1218,6 @@ virNetServerClientSendMessage;
virNetServerClientSetCloseHook;
virNetServerClientSetIdentity;
virNetServerClientSetPrivateData;
-virNetServerClientSetSASLSession;
# virnetserverprogram.h
diff --git a/src/libvirt_sasl.syms b/src/libvirt_sasl.syms
new file mode 100644
index 0000000..2c278c8
--- /dev/null
+++ b/src/libvirt_sasl.syms
@@ -0,0 +1,20 @@
+#
+# SASL-specific symbols
+#
+
+# virnetsaslcontext.h
+virNetSASLContextCheckIdentity;
+virNetSASLContextNewServer;
+virNetSASLSessionExtKeySize;
+virNetSASLSessionFree;
+virNetSASLSessionGetIdentity;
+virNetSASLSessionGetKeySize;
+virNetSASLSessionListMechanisms;
+virNetSASLSessionNewServer;
+virNetSASLSessionSecProps;
+virNetSASLSessionServerStart;
+virNetSASLSessionServerStep;
+
+
+# virnetserverclient.h
+virNetServerClientSetSASLSession;
--
1.7.4.4
13 years, 1 month
[libvirt] [PATCH] build: fix 'make rpm'
by Eric Blake
Since commit ddf3bd3, 'make rpm' failed with:
RPM build errors:
File not found: /home/remote/eblake/rpmbuild/BUILDROOT/libvirt-0.9.6-1.fc14.eblake1318366440.x86_64/usr/share/systemtap/tapset/libvirtd.stp
* libvirt.spec.in (with_dtrace): Match installed .stp files.
---
Pushing under the build-breaker rule. Still one to go before
./autobuild.sh is happy. A mingw cross-build now fails with:
Creating library file: .libs/libvirt.dll.a
Cannot export virNetSASLContextCheckIdentity: symbol not defined
Cannot export virNetSASLContextNewServer: symbol not defined
...
libvirt.spec.in | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1e76452..7c63710 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -969,7 +969,8 @@ fi
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%endif
%if %{with_dtrace}
-%{_datadir}/systemtap/tapset/libvirtd.stp
+%{_datadir}/systemtap/tapset/libvirt_probes.stp
+%{_datadir}/systemtap/tapset/libvirt_functions.stp
%endif
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
--
1.7.4.4
13 years, 1 month
[libvirt] [PATCH] build: fix 'make distcheck'
by Eric Blake
I got these distcheck failures with sanlock enabled:
ERROR: files left in build directory after distclean:
./tools/virt-sanlock-cleanup
./src/locking/qemu-sanlock.conf
* src/Makefile.am (DISTCLEANFILES) [HAVE_SANLOCK]: Clean built
file.
* tools/Makefile.am (DISTCLEANFILES): Likewise.
---
Pushing under the build-breaker rule.
src/Makefile.am | 1 +
tools/Makefile.am | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 793f674..272dfbf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1328,6 +1328,7 @@ $(builddir)/locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf
if WITH_QEMU
conf_DATA += locking/qemu-sanlock.conf
BUILT_SOURCES += locking/qemu-sanlock.conf
+DISTCLEANFILES += locking/qemu-sanlock.conf
endif
else
EXTRA_DIST += $(LOCK_DRIVER_SANLOCK_SOURCES)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 8a8be1a..c96c7d9 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -28,11 +28,14 @@ EXTRA_DIST = \
libvirt-guests.init.sh \
libvirt-guests.sysconf
+DISTCLEANFILES =
+
bin_SCRIPTS = virt-xml-validate virt-pki-validate
bin_PROGRAMS = virsh
if HAVE_SANLOCK
sbin_SCRIPTS = virt-sanlock-cleanup
+DISTCLEANFILES += virt-sanlock-cleanup
endif
dist_man1_MANS = virt-xml-validate.1 virt-pki-validate.1 virsh.1
@@ -187,4 +190,4 @@ CLEANFILES = $(bin_SCRIPTS)
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
MAINTAINERCLEANFILES = $(dist_man1_MANS)
-DISTCLEANFILES = $(BUILT_SOURCES)
+DISTCLEANFILES += $(BUILT_SOURCES)
--
1.7.4.4
13 years, 1 month
[libvirt] [PATCH] libvirt-tck: Add testcase to test snapshot functionality.
by Guido Günther
Hi,
I got a bit confused how snapshotting/reverting is supposed to work now
so I added some tests. O.k. to apply?
This requires Sys::Virt 0.9.5.
Cheers,
-- Guido
---
Build.PL | 2 +-
perl-Sys-Virt-TCK.spec.PL | 2 +-
scripts/domain/400-snapshots.t | 127 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 129 insertions(+), 2 deletions(-)
create mode 100644 scripts/domain/400-snapshots.t
diff --git a/Build.PL b/Build.PL
index b0c53a2..0b373bf 100644
--- a/Build.PL
+++ b/Build.PL
@@ -85,7 +85,7 @@ my $b = $class->new(
'Test::Builder' => 0,
'Test::More' => 0,
'Sub::Uplevel' => 0,
- 'Sys::Virt' => '0.2.0',
+ 'Sys::Virt' => '0.9.5',
'XML::Twig' => 0,
'XML::Writer' => 0,
'XML::XPath' => 0,
diff --git a/perl-Sys-Virt-TCK.spec.PL b/perl-Sys-Virt-TCK.spec.PL
index b6a989e..4ebbcd0 100644
--- a/perl-Sys-Virt-TCK.spec.PL
+++ b/perl-Sys-Virt-TCK.spec.PL
@@ -63,7 +63,7 @@ BuildRequires: perl(TAP::Harness::Archive)
BuildRequires: perl(Test::Builder)
BuildRequires: perl(Test::More)
BuildRequires: perl(Sub::Uplevel)
-BuildRequires: perl(Sys::Virt) >= 0.2.0
+BuildRequires: perl(Sys::Virt) >= 0.9.5
BuildRequires: perl(XML::Twig)
BuildRequires: perl(XML::Writer)
# RPM autoprovides misses these 3
diff --git a/scripts/domain/400-snapshots.t b/scripts/domain/400-snapshots.t
new file mode 100644
index 0000000..4c3a636
--- /dev/null
+++ b/scripts/domain/400-snapshots.t
@@ -0,0 +1,127 @@
+# -*- perl -*-
+#
+# Copyright (C) 2011 Univention GmbH
+# Author: Guido Guenther <agx(a)sigxcpu.org>
+#
+# This program is free software; You can redistribute it and/or modify
+# it under the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any
+# later version
+#
+# The file "LICENSE" distributed along with this file provides full
+# details of the terms and conditions
+#
+
+=pod
+
+=head1 NAME
+
+domain/400-snapshot.t - Check snapshot operations
+
+=head1 DESCRIPTION
+
+Check if snapshots can be created and deleted. Check if a snapshot gets
+associated with the right vm metadata when reverting snapshots.
+
+=cut
+
+use strict;
+use warnings;
+
+use Test::More tests => 23;
+
+use Sys::Virt::TCK;
+use Test::Exception;
+
+my $tck = Sys::Virt::TCK->new();
+my $conn = eval { $tck->setup(); };
+BAIL_OUT "failed to setup test harness: $@" if $@;
+END { $tck->cleanup if $tck; }
+
+SKIP: {
+ my ($pool, $vol, $dom, $snap1, $snap2);
+ my $minmem = 64 * 1024;
+ my $maxmem = $minmem * 2;
+ my $snapshots = 0;
+
+ my $poolxml = $tck->generic_pool("dir")
+ ->mode("0755")->as_xml;
+
+ diag "Defining transient storage pool $poolxml";
+ ok_pool(sub { $pool = $conn->define_storage_pool($poolxml) }, "define transient storage pool");
+ lives_ok(sub { $pool->build(0) }, "built storage pool");
+ lives_ok(sub { $pool->create }, "started storage pool");
+
+ my $volxml = $tck->generic_volume("tck.img", "qcow2", 1024*1024*50)
+ ->allocation(0)->as_xml;
+ ok_volume(sub { $vol = $pool->create_volume($volxml) }, "creating qcow2 volume $volxml");
+ my $pathvol = xpath($vol, "string(/volume/target/path)");
+
+ my $gd = $tck->generic_domain("tck")
+ ->memory($minmem);
+ $gd->rmdisk;
+ my $domxml = $gd->disk(format => { name => "qemu", type => "qcow2" },
+ type => "file",
+ src => $pathvol,
+ dst => "vda")->as_xml;
+
+ ok_domain(sub { $dom = $conn->define_domain($domxml) }, "defined persistent domain");
+ lives_ok(sub {$dom->create() }, "started domain");
+
+ my $currmem = int(xpath($dom, "number(/domain/currentMemory)"));
+ is($currmem, $minmem, "XML description has memory set to $minmem");
+
+ my $snap1xml = <<EOF;
+<domainsnapshot>
+ <name>Snapshot1</name>
+ <description>First snapshot</description>
+</domainsnapshot>
+EOF
+ diag "Create first snapshot";
+ eval { $snap1 = $dom->create_snapshot($snap1xml); };
+ skip "Snapshots not implemented", 16 if $@ && err_not_implemented($@);
+ ok(!$@, "Snapshot created");
+ die $@ if $@;
+ $snapshots++;
+
+ lives_ok( sub { $dom->destroy() }, "Domain destroyed");
+ lives_ok(sub { $dom->set_max_memory($maxmem) }, "Doubled memory to $maxmem");
+ lives_ok(sub {$dom->create() }, "started domain");
+
+ $currmem = int(xpath($dom, "number(/domain/currentMemory)"));
+ is($currmem, $maxmem, "XML description has memory set to $maxmem");
+
+ my $snap2xml = <<EOF;
+<domainsnapshot>
+ <name>Snapshot2</name>
+ <description>Second snapshot</description>
+</domainsnapshot>
+EOF
+ ok_domain_snapshot( sub { $snap2 = $dom->create_snapshot($snap2xml) }, "create second snapshot $snap2xml");
+ $snapshots++;
+ is($dom->num_of_snapshots(), $snapshots, "We have $snapshots snapshots");
+
+ # Reverting to the same vm configuration is o.k.
+ lives_ok( sub { $snap2->revert_to() }, "Reverting to snapshot snapshot 2");
+
+ # Reverting to another vm configuration would involve killing qemu so this
+ # is rejected:
+ ok_error( sub { $snap1->revert_to() }, "Reverting to changed vm configuration not supported", Sys::Virt::Error::ERR_CONFIG_UNSUPPORTED);
+
+ # Reverting to another vm configiguration while shut off is o.k.:
+ lives_ok( sub { $dom->destroy() }, "Domain destroyed");
+ lives_ok( sub { $snap1->revert_to() }, "Reverting to snapshot snapshot 1 with vm shutoff");
+ $currmem = int(xpath($dom, "number(/domain/currentMemory)"));
+ is($currmem, $minmem, "Memory is $minmem");
+
+ is($dom->num_of_snapshots(), $snapshots, "We have $snapshots snapshots");
+
+ $snap1->delete();
+ $snapshots--;
+ is($dom->num_of_snapshots(), $snapshots, "We have $snapshots snapshots");
+
+ $snap2->delete();
+ $snapshots--;
+ is($dom->num_of_snapshots(), $snapshots, "We have $snapshots snapshots");
+ is($snapshots, 0, "All snapshots are gone");
+}
--
1.7.6.3
13 years, 1 month
[libvirt] [PATCH] build: ship helper scripts
by Eric Blake
Otherwise, 'make rpm' fails with:
GEN libvirt_qemu.def
make[2]: *** No rule to make target `dtrace2systemtap.pl', needed by `libvirt_probes.stp'. Stop.
* src/Makefile.am (EXTRA_DIST): Add recent script additions.
---
Pushing under the build-breaker rule.
src/Makefile.am | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 6451ad3..dcb4d33 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1342,9 +1342,11 @@ noinst_LTLIBRARIES += \
libvirt-net-rpc-client.la
EXTRA_DIST += \
- rpc/virnetprotocol.x \
- rpc/gendispatch.pl \
- rpc/genprotocol.pl
+ rpc/dtrace2systemtap.pl \
+ rpc/gendispatch.pl \
+ rpc/genprotocol.pl \
+ rpc/gensystemtap.pl \
+ rpc/virnetprotocol.x
VIR_NET_RPC_GENERATED = \
$(srcdir)/rpc/virnetprotocol.h \
--
1.7.4.4
13 years, 1 month
[libvirt] [PATCH] build: Fix VPATH build with new probes
by Jiri Denemark
Note that make check still fails for me in VPATH build because od
undefined references in libvirt_test.a which I don't really understand
since src/Makefile.am contains
libvirt_la_LIBADD += probes.o
libvirt_test_la_LIBADD = $(libvirt_la_LIBADD)
This is a sample of the erros I get:
../src/.libs/libvirt_test.a(libvirt_net_rpc_client_la-virnetclient.o):
In function `virNetClientCallDispatch':
/home/jirka/work/libvirt/git/upstream/src/rpc/virnetclient.c:690:
undefined reference to `libvirt_rpc_client_msg_rx_semaphore'
../src/.libs/libvirt_test.a(libvirt_net_rpc_client_la-virnetclient.o):
In function `virNetClientRef':
/home/jirka/work/libvirt/git/upstream/src/rpc/virnetclient.c:234:
undefined reference to `libvirt_rpc_client_ref_semaphore'
../src/.libs/libvirt_test.a(libvirt_net_rpc_client_la-virnetclient.o):
---
daemon/Makefile.am | 2 +-
tests/Makefile.am | 2 +-
tools/Makefile.am | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index e7821b2..e8c47ae 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -6,7 +6,7 @@
INCLUDES = \
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
-I$(top_srcdir)/include -I$(top_builddir)/include \
- -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src -I../src \
-I$(top_srcdir)/src/util \
-I$(top_srcdir)/src/conf \
-I$(top_srcdir)/src/rpc \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cbbbc6f..7b80d17 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,7 +9,7 @@ INCLUDES = \
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src -I../src \
-I$(top_srcdir)/src/util \
-I$(top_srcdir)/src/conf \
$(GETTEXT_CPPFLAGS)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 71131e2..8a8be1a 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -4,7 +4,7 @@
INCLUDES = \
-I../include -I$(top_srcdir)/include \
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
- -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src -I../src \
-I$(top_srcdir)/src/util \
-I$(top_srcdir) \
$(GETTEXT_CPPFLAGS)
--
1.7.7
13 years, 1 month
[libvirt] [libvirt-glib] The input stream is owned by GVirStream, don't ref it
by Marc-André Lureau
---
libvirt-gobject/libvirt-gobject-input-stream.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libvirt-gobject/libvirt-gobject-input-stream.c b/libvirt-gobject/libvirt-gobject-input-stream.c
index a76d670..39459c4 100644
--- a/libvirt-gobject/libvirt-gobject-input-stream.c
+++ b/libvirt-gobject/libvirt-gobject-input-stream.c
@@ -80,7 +80,7 @@ static void gvir_input_stream_set_property(GObject *object,
switch (prop_id) {
case PROP_STREAM:
- stream->priv->stream = g_value_dup_object(value);
+ stream->priv->stream = g_value_get_object(value);
break;
default:
@@ -92,8 +92,8 @@ static void gvir_input_stream_finalize(GObject *object)
{
GVirInputStream *stream = GVIR_INPUT_STREAM(object);
- if (stream->priv->stream)
- g_object_unref(stream->priv->stream);
+ DEBUG("Finalize input stream GVirStream=%p", stream->priv->stream);
+ stream->priv->stream = NULL; // unowned
if (G_OBJECT_CLASS(gvir_input_stream_parent_class)->finalize)
(*G_OBJECT_CLASS(gvir_input_stream_parent_class)->finalize)(object);
--
1.7.6.2
13 years, 1 month
Re: [libvirt] Polling for QEMU 1.0 test day
by Paolo Bonzini
On 10/11/2011 06:02 PM, Rick Vernam wrote:
> On Tuesday 11 October 2011 10:45:14 Paolo Bonzini wrote:
>> Hi all, please go here to cast your vote on when QEMU 1.0 test day will
>> be help.
>>
>> http://www.doodle.com/35ae4zk7e4ndb5qq
>>
>> Having an "official" date will make it easier to put people in contact
>> and have someone reproducing other people's failure or quickly cooking
>> up a patch. Anyway, if you are very busy that day we appreciate your
>> helping out before or after the chosen date.
>
> Will this include integration testing of the various host& guest parts that
> make up spice?
If you wish. :)
You have a point though, I'm adding spice-devel and libvir-list to CC.
Paolo
13 years, 1 month