On 09/20/21 18:41, Eric Blake wrote:
On Mon, Sep 20, 2021 at 06:32:29PM +0200, Laszlo Ersek wrote:
+++ b/copy/test-verbose.sh @@ -28,11 +28,11 @@ requires nbdkit --version file=test-verbose.out cleanup_fn rm -f $file
-$VG nbdcopy -v -- [ nbdkit null ] null: 2>$file +$VG nbdcopy -v -- [ nbdkit memory 1M ] null: 2>$file
(1) I don't understand this change. Why do we replace "null" with "memory 1M"?
(Side question that I've been meaning to ask: what is this "$VG" magic?)
Answering just the side question:
When LIBNBD_VALGRIND is set to 1 in the environment, then $VG is set in run.in to an invocation of valgrind, optionally further wrapped by an invocation of libtool to see through any libtool wrapper script. Otherwise $VG is empty, and you run the real binary without any outer wrappers. It's actually a clever way of checking memory usage issues during 'make check-valgrind' while probing the real binary rather than accidentally running valgrind on a shell script.
Ah! So "VG" stands for "valgrind", which, in retrospec, probably stands for "value grind". (Never before have I dissected "valgrind" to "grinding values"; my non-native English parser doesn't work like that I guess.) Thanks! Laszlo