[libvirt] building fails with 0.8.6 and snapshot

hi. i am trying to build 0.8.6 but this fails due to the lack of macvtap enabled in my kernel. i won't use it, so i don't care, but even if i disable it, build won't work. apparently, thats a known bug, according to https://www.redhat.com/archives/libvir-list/2010-December/msg00034.html so now i am trying to build a snapshot but it also fails during "make rpm", specifically during make check in "tests". commandtest.c fails and I cannot find out why. here's the log: http://pastebin.com/rVPNDpS6 maybe someone can help me out? environment is opensuse 11.3 64 bit regards dominik

2010/12/10 Dominik Klein <dk@in-telegence.net>:
hi.
i am trying to build 0.8.6 but this fails due to the lack of macvtap enabled in my kernel. i won't use it, so i don't care, but even if i disable it, build won't work. apparently, thats a known bug, according to https://www.redhat.com/archives/libvir-list/2010-December/msg00034.html
Yes, and it's fixed in git.
so now i am trying to build a snapshot
but it also fails during "make rpm", specifically during make check in "tests". commandtest.c fails and I cannot find out why. here's the log: http://pastebin.com/rVPNDpS6
make rpm builds from a tarball generated by make dist. /usr/src/packages/BUILD/libvirt-0.8.6/tests/commanddata/test16.log is missing in the tarball because the whole commanddata directory is not marked for distribution in tests/Makefile.am. This is easy to fix, but right now I've no time to fix it myself, so somebody else might post a patch to fix this before me :) Matthias

Yes, and it's fixed in git.
That's why I tried to build the snapshot.
make rpm builds from a tarball generated by make dist.
/usr/src/packages/BUILD/libvirt-0.8.6/tests/commanddata/test16.log
is missing in the tarball because the whole commanddata directory is not marked for distribution in tests/Makefile.am.
This is easy to fix, but right now I've no time to fix it myself, so somebody else might post a patch to fix this before me :)
I'll take a look. Maybe I can fix this myself. Thanks, Dominik

* tests/Makefile.am (SUBDIRS): Add commanddata. * tests/commanddata/Makefile.am: New file. * configure.ac (AC_OUTPUT): Build new makefile. Reported by Dominik Klein. --- This should do the trick. I'll push it under the build-breaker rule if it passes 'make distcheck' (still in progress as I type this). configure.ac | 1 + tests/Makefile.am | 2 +- tests/commanddata/Makefile.am | 2 ++ 3 files changed, 4 insertions(+), 1 deletions(-) create mode 100644 tests/commanddata/Makefile.am diff --git a/configure.ac b/configure.ac index dde2cde..d8be160 100644 --- a/configure.ac +++ b/configure.ac @@ -2254,6 +2254,7 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \ tests/xmconfigdata/Makefile \ tests/xencapsdata/Makefile \ tests/confdata/Makefile \ + tests/commanddata/Makefile \ examples/apparmor/Makefile \ examples/domain-events/events-c/Makefile \ examples/domsuspend/Makefile \ diff --git a/tests/Makefile.am b/tests/Makefile.am index e5c8d36..0a235cf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ SHELL = $(PREFERABLY_POSIX_SHELL) -SUBDIRS = confdata sexpr2xmldata \ +SUBDIRS = commanddata confdata sexpr2xmldata \ xml2sexprdata xmconfigdata xencapsdata INCLUDES = \ diff --git a/tests/commanddata/Makefile.am b/tests/commanddata/Makefile.am new file mode 100644 index 0000000..ea0f8e1 --- /dev/null +++ b/tests/commanddata/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = \ + $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/*.log)) -- 1.7.3.2

On 12/10/2010 08:10 AM, Eric Blake wrote:
* tests/Makefile.am (SUBDIRS): Add commanddata. * tests/commanddata/Makefile.am: New file. * configure.ac (AC_OUTPUT): Build new makefile. Reported by Dominik Klein. ---
This should do the trick. I'll push it under the build-breaker rule if it passes 'make distcheck' (still in progress as I type this).
Nope. Failed because commanddata.{log,pid} were left around. I'm squashing this in (no need to unlink() the .log file before starting testing, since each test re-opens it with O_CREAT|O_TRUNC): diff --git a/tests/commandtest.c b/tests/commandtest.c index e956205..a1bcf68 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -86,7 +86,7 @@ static int checkoutput(const char *testname) ret = 0; cleanup: - unlink(actuallog); + unlink(actualname); VIR_FREE(actuallog); VIR_FREE(actualname); VIR_FREE(expectlog); @@ -248,6 +248,7 @@ static int test4(const void *unused ATTRIBUTE_UNUSED) cleanup: virCommandFree(cmd); + unlink(pidfile); VIR_FREE(pidfile); return ret; } @@ -707,12 +708,6 @@ mymain(int argc, char **argv) 1, NAME, NULL) < 0) \ ret = -1 - char *actualname; - if (virAsprintf(&actualname, "%s/commandhelper.log", abs_builddir) < 0) - return EXIT_FAILURE; - unlink(actualname); - VIR_FREE(actualname); - DO_TEST(test0); DO_TEST(test1); DO_TEST(test2); I'm also posting a followup patch to clean up a memory leak in virCommand as detected by valgrind. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Dominik Klein
-
Eric Blake
-
Matthias Bolte