Re: [Libguestfs] [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition

2015-06-29 Thread Richard W.M. Jones
On Fri, Jun 26, 2015 at 02:12:00PM +0200, Pino Toscano wrote: +warn $0: skipping test for btrfs UUID change feature is not available\n; +} IIRC 'warn' prints the newline at the end already. Actually in Perl, 'warn' and 'die' have magical behaviour here. Without \n, they print the

Re: [Libguestfs] URI Handling Patch

2015-06-29 Thread Richard W.M. Jones
On Thu, Jun 25, 2015 at 06:44:50PM +, Gabriel Hartmann wrote: I have written a patch (please see attached) which fixes both of these bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1092583 https://bugzilla.redhat.com/show_bug.cgi?id=1232477 By default, when saving a URI using

Re: [Libguestfs] The usage if libguestfs

2015-06-29 Thread Richard W.M. Jones
On Sun, Jun 28, 2015 at 04:32:55AM +0800, fu lirong wrote: HI all: my problem is : I want to use libguestfs on other project. if I just run a test C programm It works well just run : cc prog.c -o prog -lguestfs -I /usr/libguestfs/libguestfs-1.28.10/src/ - LIBS = -lvirt -LDFLAGS =

Re: [Libguestfs] [PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions

2015-06-29 Thread Chen, Hanxiao
Hi, -Original Message- From: Richard W.M. Jones [mailto:rjo...@redhat.com] Sent: Friday, June 26, 2015 1:44 AM To: Chen, Hanxiao/陈 晗霄 Cc: libguestfs@redhat.com Subject: Re: [Libguestfs] [PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions On Wed, Jun

Re: [Libguestfs] [PATCH v3] New API: btrfs_replace

2015-06-29 Thread Pino Toscano
In data mercoledì 24 giugno 2015 10:08:42, Cao jin ha scritto: Signed-off-by: Cao jin caoj.f...@cn.fujitsu.com --- v3: modify test script, add content check while remove replace back. Also fixed other defects as Pino T comment daemon/btrfs.c| 36 +

Re: [Libguestfs] URI Handling Patch

2015-06-29 Thread Pino Toscano
In data venerdì 26 giugno 2015 18:50:16, Gabriel Hartmann ha scritto: By default, when saving a URI using xmlSaveUri it escapes everything in the URI. QEMU doesn't want anything escaped, so now I unescape everything after the URI is generated. Unfortunately there's no flag to change

Re: [Libguestfs] [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition

2015-06-29 Thread Pino Toscano
In data lunedì 29 giugno 2015 02:36:57, Chen, Hanxiao ha scritto: -Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Pino Toscano Sent: Friday, June 26, 2015 8:12 PM To: libguestfs@redhat.com Subject: Re: [Libguestfs]

Re: [Libguestfs] [PATCH v2 4/9] daemon: Add -l / --listen flag.

2015-06-29 Thread Pino Toscano
In data giovedì 25 giugno 2015 15:56:56, Richard W.M. Jones ha scritto: This option, used for testing, causes the daemon to create the Unix domain socket (from guestfs_channel), listen on it, and accept a single connection. --- [...] + else { +struct sockaddr_un addr; + +sock =

Re: [Libguestfs] [PATCH v2 6/9] tests: Add tests using a captive daemon process.

2015-06-29 Thread Pino Toscano
In data giovedì 25 giugno 2015 15:56:58, Richard W.M. Jones ha scritto: This allows us to test the daemon running as a host process, allowing us to meaningfully test it using valgrind. This commit only adds a single test that check that the daemon starts up, can be pinged, and exits. ---

Re: [Libguestfs] [PATCH v2] v2v: Free XML objects in the correct order.

2015-06-29 Thread Pino Toscano
In data giovedì 25 giugno 2015 21:35:41, Richard W.M. Jones ha scritto: If you free an xmlDocPtr before any xmlXPathObjectPtrs that reference the doc, you'll get valgrind errors like this: ==7390== Invalid read of size 4 ==7390==at 0x4EB8BC6: xmlXPathFreeNodeSet (xpath.c:4185)

Re: [Libguestfs] URI Handling Patch

2015-06-29 Thread Pino Toscano
(apologies if you see this twice, forgot the CC the first time) In data venerdì 26 giugno 2015 18:50:16, Gabriel Hartmann ha scritto: By default, when saving a URI using xmlSaveUri it escapes everything in the URI. QEMU doesn't want anything escaped, so now I unescape everything after

Re: [Libguestfs] [PATCH v2 7/9] tests: daemon: Cleanly shut down the daemon on exit.

2015-06-29 Thread Pino Toscano
In data giovedì 25 giugno 2015 15:56:59, Richard W.M. Jones ha scritto: This refines the previous commit by shutting down the daemon cleanly at the end of the test (assuming the test was successful). It repurposes the 'internal_exit' API for this, which was previously used by the now defunct

Re: [Libguestfs] [PATCH v2 1/9] build: Remove ./configure --enable-valgrind-daemon.

2015-06-29 Thread Pino Toscano
In data giovedì 25 giugno 2015 15:56:53, Richard W.M. Jones ha scritto: If you've ever tried to use this option, you'll know that it didn't work well. It broke random things (probably RHBZ#1020216, definitely RHBZ#1023630), and caused random failures generally, while often not actually

Re: [Libguestfs] URI Handling Patch

2015-06-29 Thread Gabriel Hartmann
Re-adding Snesha: +snes...@microsoft.com snes...@microsoft.com Hi Pino, Thanks, this looks like a good list of alternatives. I think (b) is probably the way to go. I'm willing to just add the query string to the path in only the HTTP and HTTPS cases for now. If other protocols run into some

Re: [Libguestfs] [PATCH] launch: rework handling of --enable-valgrind-daemon

2015-06-29 Thread Pino Toscano
In data giovedì 25 giugno 2015 15:54:56, Richard W.M. Jones ha scritto: On Thu, Jun 25, 2015 at 04:16:59PM +0200, Pino Toscano wrote: In data giovedì 25 giugno 2015 14:50:03, Richard W.M. Jones ha scritto: This doesn't handle the guestfsd shutdown case (but nor does the current code,

Re: [Libguestfs] URI Handling Patch

2015-06-29 Thread Richard W.M. Jones
On Mon, Jun 29, 2015 at 05:57:38PM +, Gabriel Hartmann wrote: +Snesha Foss snes...@microsoft.com who is taking over this work. It definitely looks like adding the query string to every path is just wrong. I'm not sure I understand why we'd want to parse, deconstruct key value pairs

Re: [Libguestfs] [PATCH v2 6/9] tests: Add tests using a captive daemon process.

2015-06-29 Thread Richard W.M. Jones
On Mon, Jun 29, 2015 at 07:11:56PM +0200, Pino Toscano wrote: In data giovedì 25 giugno 2015 15:56:58, Richard W.M. Jones ha scritto: This allows us to test the daemon running as a host process, allowing us to meaningfully test it using valgrind. This commit only adds a single test that

Re: [Libguestfs] [PATCH v2 1/9] build: Remove ./configure --enable-valgrind-daemon.

2015-06-29 Thread Richard W.M. Jones
On Mon, Jun 29, 2015 at 07:17:04PM +0200, Pino Toscano wrote: In data giovedì 25 giugno 2015 15:56:53, Richard W.M. Jones ha scritto: If you've ever tried to use this option, you'll know that it didn't work well. It broke random things (probably RHBZ#1020216, definitely RHBZ#1023630), and

Re: [Libguestfs] [PATCH v3] New API: btrfs_replace

2015-06-29 Thread Cao jin
Ping. 在 2015年06月24日 10:08, Cao jin 写道: Signed-off-by: Cao jin caoj.f...@cn.fujitsu.com --- v3: modify test script, add content check while remove replace back. Also fixed other defects as Pino T comment daemon/btrfs.c| 36 + generator/actions.ml

Re: [Libguestfs] [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition

2015-06-29 Thread Chen, Hanxiao
-Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Pino Toscano Sent: Tuesday, June 30, 2015 12:07 AM To: libguestfs@redhat.com Subject: Re: [Libguestfs] [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition