Re: [Libguestfs] [PATCH libnbd v2 1/9] golang: tests: Add test for AioBuffer

2022-02-11 Thread Richard W.M. Jones
On Fri, Feb 11, 2022 at 03:21:21AM +0200, Nir Soffer wrote: > Add unit tests and benchmarks for AioBuffer. The tests are trivial but > they server as running documentation, and they point out important > details about the type. > > The benchmarks show the efficiency of allocating a new buffer, zer

[Libguestfs] working more easily on libguestfs-common submodule updates

2022-02-11 Thread Laszlo Ersek
Hi, sorry if this is common knowledge, but I figured I'd share it. I have the following clones: /home/lacos/src/v2v/guestfs-tools /home/lacos/src/v2v/libguestfs /home/lacos/src/v2v/libguestfs-common /home/lacos/src/v2v/virt-v2v In order to modify "libguestfs-common", and immediately put the chan

Re: [Libguestfs] [nbdkit PATCH] nbd: Opt in to libnbd pread_initialize speedup

2022-02-11 Thread Eric Blake
On Fri, Feb 11, 2022 at 07:14:30AM +0100, Laszlo Ersek wrote: > On 02/10/22 16:38, Eric Blake wrote: > > Our nbd plugin has always properly checked for asynch errors (and thus > > has never been at risk of a vulnerability similar to CVE-2022-0485 > > just fixed in nbdcopy). What's more, the nbdkit

[Libguestfs] [libguestfs-common PATCH 1/3] Demote "Std_utils.wrap" to an internal function in Tools_utils

2022-02-11 Thread Laszlo Ersek
At this point, no client project of the libguestfs-common submodule should be using "Std_utils.wrap", so we can remove its public declaration, and make it an internal function in the module (Tools_utils) where its callers are ("error", "warning", and "info"). Note: the "output_spaces" function is

[Libguestfs] [libguestfs-common PATCH 0/3] don't wrap log messages written to non-TTYs

2022-02-11 Thread Laszlo Ersek
https://bugzilla.redhat.com/show_bug.cgi?id=1820221 The first patch turns "Std_utils.wrap" into an internal (not public) function in "Tools_utils". This is doable after guestfs-tools commit 626f0441d251 ("virt-resize: replace "wrap" calls with calls to "info"", 2022-02-10). The second patch cause

[Libguestfs] [libguestfs-common PATCH 2/3] Tools_utils.wrap: only wrap text for TTYs

2022-02-11 Thread Laszlo Ersek
Whenever stdout and/or stderr is redirected (usually to a regular file), users mostly do that to capture logs, for later searching. Wrapping interferes with grep though, so make "wrap" just print the string when the output channel is not a TTY. The requested indentation is honored though. Bugzilla

[Libguestfs] [libguestfs-common PATCH 3/3] add common ("standard") option -w / --wrap

2022-02-11 Thread Laszlo Ersek
Similarly to how users can can force ANSI colorization with "--colors" even when stdout / stderr are redirected to a non-tty, allow them to force wrapping with "--wrap". Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1820221 Signed-off-by: Laszlo Ersek --- Notes: - This patch will req

Re: [Libguestfs] [nbdkit PATCH] nbd: Opt in to libnbd pread_initialize speedup

2022-02-11 Thread Laszlo Ersek
On 02/11/22 15:35, Eric Blake wrote: > On Fri, Feb 11, 2022 at 07:14:30AM +0100, Laszlo Ersek wrote: >> On 02/10/22 16:38, Eric Blake wrote: >>> Our nbd plugin has always properly checked for asynch errors (and thus >>> has never been at risk of a vulnerability similar to CVE-2022-0485 >>> just fix

Re: [Libguestfs] [PATCH libnbd v2 1/9] golang: tests: Add test for AioBuffer

2022-02-11 Thread Nir Soffer
On Fri, Feb 11, 2022 at 1:22 PM Richard W.M. Jones wrote: > > On Fri, Feb 11, 2022 at 03:21:21AM +0200, Nir Soffer wrote: > > Add unit tests and benchmarks for AioBuffer. The tests are trivial but > > they server as running documentation, and they point out important > > details about the type. >

Re: [Libguestfs] [PATCH libnbd v2 1/9] golang: tests: Add test for AioBuffer

2022-02-11 Thread Nir Soffer
On Fri, Feb 11, 2022 at 9:08 PM Nir Soffer wrote: > > On Fri, Feb 11, 2022 at 1:22 PM Richard W.M. Jones wrote: > > > > On Fri, Feb 11, 2022 at 03:21:21AM +0200, Nir Soffer wrote: > > > Add unit tests and benchmarks for AioBuffer. The tests are trivial but > > > they server as running documentati