search for: nbdkit_valgrind

Displaying 20 results from an estimated 43 matches for "nbdkit_valgrind".

2018 Nov 14
0
[PATCH nbdkit v3 4/4] tests: Valgrind is only enabled when NBDKIT_VALGRIND = 1, not any other values.
Fix the tests so they only enable valgrind workarounds or skips when NBDKIT_VALGRIND is exactly set to "1" and not any other values (including empty string, or not set). Thanks: Eric Blake. --- tests/test-dump-plugin.sh | 3 ++- tests/test-ext2.c | 4 +++- tests/test-help.sh | 3 ++- tests/test-lang-plugins.c | 4 +++- tests/test-ocaml...
2018 Nov 14
1
Re: [PATCH nbdkit v3 4/4] tests: Valgrind is only enabled when NBDKIT_VALGRIND = 1, not any other values.
On 11/14/18 8:27 AM, Richard W.M. Jones wrote: > Fix the tests so they only enable valgrind workarounds or skips when > NBDKIT_VALGRIND is exactly set to "1" and not any other values > (including empty string, or not set). > > Thanks: Eric Blake. > --- > +++ b/tests/test-dump-plugin.sh > @@ -55,7 +55,8 @@ fi > # However some of these tests are expected to fail. > test () > { > - ca...
2018 Nov 14
1
Re: [PATCH 2/2] build: Replace ./nbdkit with a C program.
On 11/14/18 3:45 AM, Richard W.M. Jones wrote: > On Tue, Nov 13, 2018 at 08:10:34PM -0600, Eric Blake wrote: >> On 11/13/18 4:51 PM, Richard W.M. Jones wrote: > [...] >>> + size_t i; >>> + char *s; >>> + >>> + /* If NBDKIT_VALGRIND=1 is set in the environment, then we run the >>> + * program under valgrind. This is used by the tests. Similarly if >>> + * NBDKIT_GDB=1 is set, we run the program under GDB, useful during >>> + * development. >>> + */ >>> + s = getenv (&quot...
2018 Nov 14
5
[PATCH nbdkit v3 0/4] build: Replace ./nbdkit with a C program.
...LL as a sentinel for has_arg. - Moved some variable decls into the inner loop. - Make nbdkit wrapper depend on config.status, so if srcdir or builddir changes then we rebuild the wrapper. It probably does so anyway because <config.h> will change, but let's be safe. - Document NBDKIT_VALGRIND=1 and NBDKIT_GDB=1. - Add two extra patches which fix existing uses of NBDKIT_VALGRIND. - Retested (make check && make check-valgrind). Rich.
2018 Nov 14
2
Re: [PATCH 2/2] build: Replace ./nbdkit with a C program.
...al input) > + fprintf (stderr, "\n"); > +} > + > +int > +main (int argc, char *argv[]) > +{ > + int c; > + int long_index; > + int verbose = 0; Worth using <stdbool.h> and making this one bool? > + size_t i; > + char *s; > + > + /* If NBDKIT_VALGRIND=1 is set in the environment, then we run the > + * program under valgrind. This is used by the tests. Similarly if > + * NBDKIT_GDB=1 is set, we run the program under GDB, useful during > + * development. > + */ > + s = getenv ("NBDKIT_VALGRIND"); > + if (s &...
2018 Sep 11
0
[PATCH nbdkit 3/4] tests: Move common code for testing every plugin to tests/functions.sh.
...t plugin --dump-plugin for each plugin. # However some of these tests are expected to fail. -plugins="$( - cd ..; - ls -1 plugins/*/.libs/nbdkit-*-plugin.so plugins/*/nbdkit-*-plugin | - sed 's,^plugins/\([^/]*\)/.*,\1,' -)" -for p in $plugins; do - case "$p${NBDKIT_VALGRIND:+-valgrind}" in +test () +{ + case "$1${NBDKIT_VALGRIND:+-valgrind}" in vddk | vddk-valgrind) # VDDK won't run without special environment variables # being set, so ignore it. @@ -70,7 +66,8 @@ for p in $plugins; do # Plugins wri...
2018 Sep 13
0
[PATCH v2 nbdkit 3/5] tests: Move common code for testing every plugin to tests/functions.sh.
...t plugin --dump-plugin for each plugin. # However some of these tests are expected to fail. -plugins="$( - cd ..; - ls -1 plugins/*/.libs/nbdkit-*-plugin.so plugins/*/nbdkit-*-plugin | - sed 's,^plugins/\([^/]*\)/.*,\1,' -)" -for p in $plugins; do - case "$p${NBDKIT_VALGRIND:+-valgrind}" in +test () +{ + case "$1${NBDKIT_VALGRIND:+-valgrind}" in vddk | vddk-valgrind) # VDDK won't run without special environment variables # being set, so ignore it. @@ -70,7 +66,8 @@ for p in $plugins; do # Plugins wri...
2018 Nov 14
0
Re: [PATCH 2/2] build: Replace ./nbdkit with a C program.
On Tue, Nov 13, 2018 at 08:10:34PM -0600, Eric Blake wrote: > On 11/13/18 4:51 PM, Richard W.M. Jones wrote: [...] > >+ size_t i; > >+ char *s; > >+ > >+ /* If NBDKIT_VALGRIND=1 is set in the environment, then we run the > >+ * program under valgrind. This is used by the tests. Similarly if > >+ * NBDKIT_GDB=1 is set, we run the program under GDB, useful during > >+ * development. > >+ */ > >+ s = getenv ("NBDKIT_VALGRIND&quo...
2017 Nov 13
4
[nbdkit PATCH 0/3] various nbdkit patches
Fixes for various issues found while implementing my nbd forwarder plugin. I'm okay if you choose to take some but not others; the most important one is patch 3 which fixes a protocol violation that makes it impossible for a client to try and recover from EIO failures over a partially-flaky source block device. Eric Blake (3): maint: Add emacs hint file maint: Add NBDKIT_GDB support to
2017 Nov 14
0
Re: [nbdkit PATCH] nbd: Add new nbd forwarding plugin
.../nbdkit is a bit unsafe in that it blindly inherits $valgrind > from the environment; but that was nice because it let me do: > valgrind='gdb --args' ./nbdkit nbd ... > for a gdb debug session to work out the kinks in my code. Maybe we > want to support NBDKIT_GDB similarly to NBDKIT_VALGRIND, and to clean > up the script to not foolishly inherit variables outside of the > namespace, but that's a task for another day. As a fix for the valgrind issue, how about this patch? Of course it will stop you from (ab-)using valgrind! >From 75dd0d10221f59f2c92aa4768675b226d56856ac...
2018 Nov 13
0
[PATCH 2/2] build: Replace ./nbdkit with a C program.
...else - args[$i]="$1" - fi - ((++i)) - shift - ;; - esac -done - -# If -v flag was given on the command line, print the command. -if [ $verbose ]; then - echo $b/src/nbdkit "${args[@]}" -fi - -prefix= -# If NBDKIT_VALGRIND=1 is set in the environment, then we run -# the program under valgrind. This is used by the tests. -# Similarly, if NBDKIT_GDB=1 is set in the environment, we run -# the program under gdb, useful during development. -if [ "$NBDKIT_VALGRIND" ]; then - prefix="@VALGRIND@ --vgdb=no...
2018 Sep 13
1
Re: [PATCH v2 nbdkit 3/5] tests: Move common code for testing every plugin to tests/functions.sh.
...t;$1" "$p" "$f" "$p" "$@" Up to you if you want that (if you even have a use where additional arguments would make sense); I'm also fine with this patch going in as-is. > +++ b/tests/test-help.sh > +test () > +{ > + case "$1${NBDKIT_VALGRIND:+-valgrind}" in > vddk | vddk-valgrind) > # VDDK won't run without special environment variables > # being set, so ignore it. Not for this patch, but is it worth making 'nbdkit vddk --help' display something useful even when env-vars...
2018 Nov 14
3
[PATCH nbdkit v2 0/2] build: Replace ./nbdkit with a C program.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html v2: - Use stdbool for booleans. - Use __attribute__((format(printf))). - Don't abort on invalid options, exit with failure instead. - Preserve long/short option choices in the output. - Add '=' in long option output, ie. always use --longopt=arg. - Add "--" parameter
2018 Nov 14
0
[PATCH nbdkit v2 2/2] build: Replace ./nbdkit with a C program.
...else - args[$i]="$1" - fi - ((++i)) - shift - ;; - esac -done - -# If -v flag was given on the command line, print the command. -if [ $verbose ]; then - echo $b/src/nbdkit "${args[@]}" -fi - -prefix= -# If NBDKIT_VALGRIND=1 is set in the environment, then we run -# the program under valgrind. This is used by the tests. -# Similarly, if NBDKIT_GDB=1 is set in the environment, we run -# the program under gdb, useful during development. -if [ "$NBDKIT_VALGRIND" ]; then - prefix="@VALGRIND@ --vgdb=no...
2018 Nov 13
3
[PATCH 0/2] build: Replace ./nbdkit with a C program.
This patch series solves the FreeBSD shebang problem in a completely different way, and a few other things besides. I propose that we replace ./nbdkit with a C program. The C program is a straightforward translation of the shell script. Some advantages of this approach are: - We can parse options in exactly the same way as the real program. - Use the more accurate ‘is_short_name’ test for
2017 Nov 12
6
[nbdkit PATCH] nbd: Add new nbd forwarding plugin
...com> --- Note: ./nbdkit is a bit unsafe in that it blindly inherits $valgrind from the environment; but that was nice because it let me do: valgrind='gdb --args' ./nbdkit nbd ... for a gdb debug session to work out the kinks in my code. Maybe we want to support NBDKIT_GDB similarly to NBDKIT_VALGRIND, and to clean up the script to not foolishly inherit variables outside of the namespace, but that's a task for another day. --- configure.ac | 1 + plugins/Makefile.am | 1 + plugins/nbd/Makefile.am | 63 +++++ plugins/nbd/nbd.c...
2020 Jun 02
0
[PATCH nbdkit 5/5] vddk: Munge password parameters when we reexec (RHBZ#1842440).
...This was because the reexec code caused +# nbdkit_read_password to be called twice, second time with stdin +# reopened on /dev/null. Since we have now fixed this bug, this is a +# regression test. + +source ./functions.sh +set -e +set -x + +# Setting LD_LIBRARY_PATH breaks valgrind. +if [ "x$NBDKIT_VALGRIND" = "x1" ]; then + echo "$0: skipped under valgrind" + exit 77 +fi + +requires qemu-img --version + +f=test-vddk-password-fd.file +out=test-vddk-password-fd.out +cleanup_fn rm -f $f $out + +# Get dummy-vddk to print the password to stderr. +export DUMMY_VDDK_PRINT_PASS...
2019 Oct 03
0
[nbdkit PATCH 3/4] server: Close backends if a filter's .open fails
...s open, but the backend is not, when reopen fails. And that scenario is now more common when a filter .open fails, with the above change to leave the plugin closed. Since our connection code only called the close chain if the plugin was still open, this can result in memory leaks, as shown by: $ NBDKIT_VALGRIND=1 ./nbdkit -U- --filter=log --filter=retry \ null size=512 retries=1 retry-delay=1 \ --run 'qemu-io -f raw $nbd -c "r 0 1"' logfile=/dev/stderr Fix it by always running the close chain regardless of whether the plugin is open. Signed-off-by: Eric Blake <eblake@redhat.com&...
2018 Sep 11
7
[PATCH nbdkit 0/4] tests: Move common functions into tests/functions.sh
Combine much common code into tests/functions.sh. Patch 1: Preparation for patch 3. Patch 2: Fix a long-standing bug in how man pages links are generated. Patch 3: Common code for iterating a test function over every plugin. Patch 4: Common code for starting nbdkit in a test and waiting for the PID file to appear. This is the largest and most complex of the patches but is
2018 Dec 02
0
[PATCH nbdkit 3/4] valgrind: Enable valgrinding of Python plugin.
...| 2 +- 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/tests/test-lang-plugins.c b/tests/test-lang-plugins.c index af926f6..d0ebab3 100644 --- a/tests/test-lang-plugins.c +++ b/tests/test-lang-plugins.c @@ -57,8 +57,7 @@ main (int argc, char *argv[]) */ s = getenv ("NBDKIT_VALGRIND"); if (s && strcmp (s, "1") == 0 && - (strcmp (LANG, "python") == 0 || - strcmp (LANG, "ruby") == 0 || + (strcmp (LANG, "ruby") == 0 || strcmp (LANG, "tcl") == 0)) { fprintf (stderr, "%s test...