Re: [Libguestfs] [Nbd] Testing NBD server implementations for correctness

2016-09-26 Thread Carl-Daniel Hailfinger
Hi, On 26.09.2016 09:53, Wouter Verhelst wrote: > On Mon, Sep 26, 2016 at 03:22:52AM +0200, Carl-Daniel Hailfinger wrote: >> Running nbd-tester-client against nbdkit with oldstyle negotiation was fun. >> I managed to segfault nbdkit Side note: I'm going to try and get a backtrace from the nbdkit

Re: [Libguestfs] [Nbd] Testing NBD server implementations for correctness

2016-09-26 Thread Alex Bligh
> On 26 Sep 2016, at 10:21, Carl-Daniel Hailfinger > wrote: > > Wow, that was quick! Thank you. > > I stumbled upon another problem: Apparently nbd-tester-client and nbdkit > disagree on what constitutes a valid flush request. > nbd-tester-client complains: > ./flush > 15901: Requests: 3536 >

[Libguestfs] [PATCH 2/3] fish, inspector: get rid of COMPILING_VIRT_INSPECTOR

2016-09-26 Thread Pino Toscano
All the define was doing in options.h was masking the declaration of inspect_mount_root, which was always built-in in inspect.c (because of the unconditional #define there) anyway. Since this is common code used by all the C tools, try to avoid extra knobs which add different code paths for no ben

[Libguestfs] [PATCH 3/3] tools: build common fish sources in a static library

2016-09-26 Thread Pino Toscano
Create a new libfishcommon convenience static library to build just once (instead of 12 times!) the majority of the guestfish sources used in the rest of the C tools (mostly for command line stuff, inspection, and mount). The notable exceptions not using libfishcommon are guestfish itself, and vir

[Libguestfs] [PATCH 1/3] build: remove extra libconfig linkage

2016-09-26 Thread Pino Toscano
Some of the C tools were building also config.c as part of the shared sources from guestfish, and thus bringing a dependency on libconfig. Since none of them actually read the libguestfs configuration at all, then exclude fish/config.c from their build, and stop linking to libconfig. --- align/Mak

[Libguestfs] Memory corruption when testing nbdkit python plugin with nbd-tester-client?

2016-09-26 Thread Carl-Daniel Hailfinger
Hi, has anyone ever run "make check" from nbd against nbdkit with a python plugin? I usually get segfaults during such a run, and sometimes various other errors happen before the segfault, suggesting that some memory corruption is underway. AFAICS a pure python plugin should not be able to cause m

Re: [Libguestfs] [PATCH 3/3] tools: build common fish sources in a static library

2016-09-26 Thread Richard W.M. Jones
ACK series. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html _

Re: [Libguestfs] Memory corruption when testing nbdkit python plugin with nbd-tester-client?

2016-09-26 Thread Richard W.M. Jones
On Mon, Sep 26, 2016 at 02:18:02PM +0200, Carl-Daniel Hailfinger wrote: > Hi, > > has anyone ever run "make check" from nbd against nbdkit with a python > plugin? I usually get segfaults during such a run, and sometimes various > other errors happen before the segfault, suggesting that some memory

[Libguestfs] [PATCH] p2v: add mnemonics to labels and buttons (RHBZ#1379289)

2016-09-26 Thread Pino Toscano
Set mnemonics for all the labels with a text entry or combo box next to them, and for all the buttons, and check boxes. --- p2v/gui.c | 56 ++-- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/p2v/gui.c b/p2v/gui.c index 36bb655..

Re: [Libguestfs] [PATCH] p2v: add mnemonics to labels and buttons (RHBZ#1379289)

2016-09-26 Thread Richard W.M. Jones
On Mon, Sep 26, 2016 at 04:14:22PM +0200, Pino Toscano wrote: > Set mnemonics for all the labels with a text entry or combo box next to > them, and for all the buttons, and check boxes. Looks OK to me, ACK. Rich. > p2v/gui.c | 56 ++-- > 1 fil

[Libguestfs] [PATCH] Improve memory management of nbdkit python plugin example

2016-09-26 Thread Carl-Daniel Hailfinger
Hi, the nbdkit python plugin example has suboptimal memory management: - it creates the disk image as a string on init - it casts the string to bytearray on every read - it copies the string before and the string after the written region, then reassembles those pieces together with the written reg

[Libguestfs] [PATCH] nbdkit: Talk about Python in the Python plugin

2016-09-26 Thread Carl-Daniel Hailfinger
diff -r 3decebe747cb -r fc247aa26d12 plugins/python/python.c --- a/plugins/python/python.c Sat Sep 24 14:46:25 2016 +0200 +++ b/plugins/python/python.c Sat Sep 24 15:03:05 2016 +0200 @@ -437,7 +437,7 @@ Py_DECREF (r); return ret; } - /* No Perl can_write callback, but there's a Pe

Re: [Libguestfs] [PATCH] Improve memory management of nbdkit python plugin example

2016-09-26 Thread Pino Toscano
Hi, On Monday, 26 September 2016 17:07:41 CEST Carl-Daniel Hailfinger wrote: > the nbdkit python plugin example has suboptimal memory management: > - it creates the disk image as a string on init > - it casts the string to bytearray on every read > - it copies the string before and the string afte

Re: [Libguestfs] [PATCH] Improve memory management of nbdkit python plugin example

2016-09-26 Thread Carl-Daniel Hailfinger
Hi, On 26.09.2016 17:19, Pino Toscano wrote: > On Monday, 26 September 2016 17:07:41 CEST Carl-Daniel Hailfinger wrote: >> > the nbdkit python plugin example has suboptimal memory management: >> - it creates the disk image as a string on init >> - it casts the string to bytearray on every read >>

Re: [Libguestfs] [PATCH] Improve memory management of nbdkit python plugin example

2016-09-26 Thread Carl-Daniel Hailfinger
Hi, sorry for the resend. My mailer mangled the previous attempt. On 26.09.2016 17:19, Pino Toscano wrote: > On Monday, 26 September 2016 17:07:41 CEST Carl-Daniel Hailfinger wrote: >> the nbdkit python plugin example has suboptimal memory management: >> - it creates the disk image as a string on

Re: [Libguestfs] [PATCH] Improve memory management of nbdkit python plugin example

2016-09-26 Thread Pino Toscano
On Monday, 26 September 2016 17:30:29 CEST Carl-Daniel Hailfinger wrote: > Hi, > > sorry for the resend. My mailer mangled the previous attempt. > > On 26.09.2016 17:19, Pino Toscano wrote: > > On Monday, 26 September 2016 17:07:41 CEST Carl-Daniel Hailfinger wrote: > >> the nbdkit python plugin

[Libguestfs] [PATCH] nbdkit: flags are 32 bits for oldstyle connections

2016-09-26 Thread Carl-Daniel Hailfinger
# HG changeset patch # User Carl-Daniel Hailfinger # Date 1474903734 -7200 # Mon Sep 26 17:28:54 2016 +0200 # Node ID dbd1ea0a401cedcfa426097a289d852971b14f1e # Parent d7d5078d08c711032837dcac79a4450226ec2ce5 nbdkit: Fix flags in old-style connection diff -r d7d5078d08c7 -r dbd1ea0a401c src

Re: [Libguestfs] Memory corruption when testing nbdkit python plugin with nbd-tester-client?

2016-09-26 Thread Carl-Daniel Hailfinger
On 26.09.2016 14:29, Richard W.M. Jones wrote: > On Mon, Sep 26, 2016 at 02:18:02PM +0200, Carl-Daniel Hailfinger wrote: >> Hi, >> >> has anyone ever run "make check" from nbd against nbdkit with a python >> plugin? I usually get segfaults during such a run, and sometimes various >> other errors ha

Re: [Libguestfs] Memory corruption when testing nbdkit python plugin with nbd-tester-client?

2016-09-26 Thread Carl-Daniel Hailfinger
On 26.09.2016 19:20, Carl-Daniel Hailfinger wrote: > On 26.09.2016 14:29, Richard W.M. Jones wrote: >> On Mon, Sep 26, 2016 at 02:18:02PM +0200, Carl-Daniel Hailfinger wrote: >>> Hi, >>> >>> has anyone ever run "make check" from nbd against nbdkit with a python >>> plugin? I usually get segfaults d

Re: [Libguestfs] [Nbd] Testing NBD server implementations for correctness

2016-09-26 Thread Carl-Daniel Hailfinger
On 26.09.2016 20:37, Alex Bligh wrote: >> On 26 Sep 2016, at 19:15, Wouter Verhelst wrote: >> >> TLDR: nbdkit is correct, nbd-tester-client is not, patches welcome. > I have pushed a fix. Thank you, you beat me to it by a few minutes. Will test ASAP. Regards, Carl-Daniel ___

Re: [Libguestfs] [Nbd] Testing NBD server implementations for correctness

2016-09-26 Thread Wouter Verhelst
On Mon, Sep 26, 2016 at 11:43:42AM +0100, Alex Bligh wrote: > > > On 26 Sep 2016, at 10:21, Carl-Daniel Hailfinger > > wrote: > > > > Wow, that was quick! Thank you. > > > > I stumbled upon another problem: Apparently nbd-tester-client and nbdkit > > disagree on what constitutes a valid flush

Re: [Libguestfs] [Nbd] Testing NBD server implementations for correctness

2016-09-26 Thread Alex Bligh
> On 26 Sep 2016, at 19:15, Wouter Verhelst wrote: > > TLDR: nbdkit is correct, nbd-tester-client is not, patches welcome. I have pushed a fix. -- Alex Bligh ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listin