search for: start_nbdkit

Displaying 20 results from an estimated 130 matches for "start_nbdkit".

2018 Sep 11
2
Re: [PATCH nbdkit 4/4] tests: Add a helper function which waits for nbdkit to start up.
...tests where nbdkit used to run in the foreground, but that seems to be > a consequence of some left over debugging. > --- > +++ b/tests/functions.sh.in > @@ -32,6 +32,41 @@ > # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > # SUCH DAMAGE. > > +# start_nbdkit args... > +# > +# Run nbdkit with args and wait for it to start up. If it fails > +# to start up, exit with an error message. > +start_nbdkit () > +{ > + # Find the -P <pidfile> argument. > + pidfile= > + for i in `seq 1 $#`; do Is seq universally available,...
2018 Sep 13
2
Re: [PATCH v2 nbdkit 5/5] tests: Add a helper function which waits for nbdkit to start up.
On 9/13/18 11:09 AM, Richard W.M. Jones wrote: > This assumes bashisms, but bash is required to run the tests. > > This is mostly refactoring. However the changes (simplifications) are > quite substantial: > > - Since the new start_nbdkit helper function cleans up nbdkit on > exit, most scripts no longer need to deal with the pid or kill the > pid in the cleanup function. > > - As a result, cleanup functions are radically simpler, and often > disappear completely. > > - Also removed the comment...
2018 Sep 11
0
[PATCH nbdkit 4/4] tests: Add a helper function which waits for nbdkit to start up.
...hanged, 112 insertions(+), 347 deletions(-) diff --git a/tests/functions.sh.in b/tests/functions.sh.in index 4071384..01f3a60 100644 --- a/tests/functions.sh.in +++ b/tests/functions.sh.in @@ -32,6 +32,41 @@ # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +# start_nbdkit args... +# +# Run nbdkit with args and wait for it to start up. If it fails +# to start up, exit with an error message. +start_nbdkit () +{ + # Find the -P <pidfile> argument. + pidfile= + for i in `seq 1 $#`; do + if [ "${!i}" = "-P" ]; then +...
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
2020 Mar 26
2
[nbdkit PATCH] tests: Swap nbdkit process order in test-nbd-tls-psk.sh
...a clean shutdown of the gnutls session. Sending SIGTERM to the client is not going to break the poll, but if we instead kill the server, that will cause the client to respond (perhaps with an error message that we ignore, but better than hanging). So, by rearranging the order in which we call our start_nbdkit function, we change the order in which we send SIGTERM to the two processes. And in turn, this becomes the first testsuite coverage of the 'nbd retry=' parameter, added back in commit 0bb76bc7. Signed-off-by: Eric Blake <eblake@redhat.com> --- My current setup does not seem to be h...
2018 Sep 13
0
[PATCH v2 nbdkit 5/5] tests: Add a helper function which waits for nbdkit to start up.
This assumes bashisms, but bash is required to run the tests. This is mostly refactoring. However the changes (simplifications) are quite substantial: - Since the new start_nbdkit helper function cleans up nbdkit on exit, most scripts no longer need to deal with the pid or kill the pid in the cleanup function. - As a result, cleanup functions are radically simpler, and often disappear completely. - Also removed the comment "# The cleanup() function is calle...
2018 Sep 11
0
Re: [PATCH nbdkit 4/4] tests: Add a helper function which waits for nbdkit to start up.
..."blocksize1.img blocksize1.log blocksize1.sock blocksize1.pid > >@@ -72,27 +73,13 @@ cleanup () > > trap cleanup INT QUIT TERM EXIT ERR > > # Run two parallel nbdkit; to compare the logs and see what changes. > >-nbdkit -P blocksize1.pid -U blocksize1.sock \ > >+start_nbdkit -P blocksize1.pid -U blocksize1.sock \ > > --filter=log file logfile=blocksize1.log blocksize1.img > >-nbdkit -P blocksize2.pid -U blocksize2.sock --filter=blocksize \ > >+start_nbdkit -P blocksize2.pid -U blocksize2.sock --filter=blocksize \ > > --filter=log...
2018 Sep 13
8
[PATCH v2 nbdkit 0/5] tests: Move common functions into tests/functions.sh
...057.html v2: - Fix tab vs spaces in configure.ac. - To generate list of plugins, use printf instead of xargs. - Use 'source ./functions.sh' instead of 'source functions'. - functions.sh: Consistent quoting in foreach_plugin function. - functions.sh: Change the contract of start_nbdkit so it requires (and checks that) the first two parameters are '-P pidfile'. This avoids needing to iterate over the arguments. - functions.sh: Use {1..10} instead of seq. - functions.sh: Add a common mechanism for handling traps / cleanups (this is extra patch 4/5). - functi...
2019 Jul 30
1
[nbdkit PATCH v2] tests: Accommodate qemu-img 4.1 output change
...l size: 100M" ipv6.out + grep -sq '"virtual-size": *104857600\b' ipv6.out fi diff --git a/tests/test-nbd-tls-psk.sh b/tests/test-nbd-tls-psk.sh index d0bbc468..82822d11 100755 --- a/tests/test-nbd-tls-psk.sh +++ b/tests/test-nbd-tls-psk.sh @@ -73,9 +73,9 @@ LIBNBD_DEBUG=1 start_nbdkit -P "$pid2" -U "$sock2" --tls=off \ nbd tls=require tls-psk=keys.psk tls-username=qemu socket="$sock1" # Run unencrypted client -LANG=C qemu-img info -f raw "nbd+unix:///?socket=$sock2" > nbd-tls-psk.out +qemu-img info --output=json -f raw "nbd+...
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v. I have added upstream support for socket activation to nbdkit already: https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4 I posted a patch for qemu-nbd, still waiting on more reviews for that one: https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html I tested this against old and new qemu
2019 May 10
1
[nbdkit PATCH] nozero: Add notrim mode
...fter filter with zeromode=emulate, to ensure no ZERO to plugin # 5a/b: both sides of nbd plugin: even though server side does not advertise # ZERO, the client side still exposes it, and just skips calling nbd's .zero +# 6: log after filter with zeromode=notrim, to ensure plugin does not trim start_nbdkit -P nozero1.pid -U $sock1 --filter=log \ file logfile=nozero1.log nozero1.img start_nbdkit -P nozero2.pid -U $sock2 --filter=log --filter=nozero \ @@ -105,6 +111,8 @@ start_nbdkit -P nozero5a.pid -U $sock5a --filter=log --filter=nozero \ file logfile=nozero5a.log nozero5.img start_...
2019 Jan 23
0
[PATCH v2 nbdkit] tests: Add generic ‘requires’ function for test prerequisites.
...vailable, do: +# +# requires qemu-img --version +requires () +{ + ( "$@" ) </dev/null >/dev/null 2>&1 || { + echo "$0: ‘$*’ failed with error code $?" + echo "$0: test prerequisite is missing or not working" + exit 77 + } +} + # start_nbdkit -P pidfile args... # # Run nbdkit with args and wait for it to start up. If it fails to diff --git a/tests/test-cache-max-size.sh b/tests/test-cache-max-size.sh index f7e743a..8cb5ad1 100755 --- a/tests/test-cache-max-size.sh +++ b/tests/test-cache-max-size.sh @@ -36,22 +36,10 @@ set -e set -x...
2020 Mar 26
0
Re: [nbdkit PATCH] tests: Swap nbdkit process order in test-nbd-tls-psk.sh
...session. Sending > SIGTERM to the client is not going to break the poll, but if we > instead kill the server, that will cause the client to respond > (perhaps with an error message that we ignore, but better than > hanging). > > So, by rearranging the order in which we call our start_nbdkit > function, we change the order in which we send SIGTERM to the two > processes. And in turn, this becomes the first testsuite coverage of > the 'nbd retry=' parameter, added back in commit 0bb76bc7. > > Signed-off-by: Eric Blake <eblake@redhat.com> > --- > &gt...
2019 Jan 23
2
[PATCH v2 nbdkit] tests: Add generic requires.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-January/thread.html#00198 For v2 I changed most existing prerequisite tests to use the new mechanism. I only changed simple tests. There are a few more complex tests that don't fit the “requires model” and those are not changed. I normalized qemu-io/qemu-img testing to always use the --version flag, where previously we used a mix
2020 May 22
0
[PATCH nbdkit 4/4] fua: Add unsafe fuamode=discard.
...ne rm -f $files rm -rf $sockdir } @@ -77,6 +72,7 @@ cleanup_fn cleanup # 3: fuamode=native: log shows that blocksize preserves fua # 4: fuamode=force: log shows that fua is always enabled # 5: fuamode=pass: fua flag and flush unchanged +# 6: fuamode=discard: discard all fua and flush start_nbdkit -P fua1.pid -U $sockdir/fua1.sock \ --filter=log --filter=fua \ file logfile=fua1.log fua.img @@ -92,10 +88,13 @@ start_nbdkit -P fua4.pid -U $sockdir/fua4.sock \ start_nbdkit -P fua5.pid -U $sockdir/fua5.sock \ --filter=fua --filter=log \ fi...
2020 May 22
6
[PATCH nbdkit 0/4] Add fuamode=pass and fuamode=discard
Two hopefully useful additions to the fua filter. The second one is kind of like cache=unsafe in qemu, in that it exchanges correctness for speed. Useful for data which is easily recreated in the event of a crash or for people who like living on the edge and have good backups. Rich.
2019 Jan 23
0
[PATCH nbdkit] tests: Add generic ‘requires’ function to testing test prerequisites.
...est. +# For example to check that qemu-img is available, do: +# +# requires qemu-img --help +requires () +{ + "$@" || { + echo "$0: ‘$@’ failed with error code $?" + echo "$0: test prerequisite is missing or not working" + exit 77 + } +} + # start_nbdkit -P pidfile args... # # Run nbdkit with args and wait for it to start up. If it fails to diff --git a/tests/test-memory-largest.sh b/tests/test-memory-largest.sh index a6c269e..50708f9 100755 --- a/tests/test-memory-largest.sh +++ b/tests/test-memory-largest.sh @@ -37,16 +37,12 @@ source ./funct...
2019 Sep 28
0
[PATCH nbdkit v2 2/4] Rename nbdkit-reflection-plugin to nbdkit-info-plugin.
...dress. source ./functions.sh set -e @@ -39,13 +39,13 @@ set -x requires nbdsh --version sock=`mktemp -u` -files="reflection-address.out reflection-address.pid $sock" +files="info-address.out info-address.pid $sock" rm -f $files cleanup_fn rm -f $files # Run nbdkit. -start_nbdkit -P reflection-address.pid -U $sock \ - reflection mode=address +start_nbdkit -P info-address.pid -U $sock \ + info mode=address export sock nbdsh -c - <<'EOF' diff --git a/tests/test-reflection-base64.sh b/tests/test-info-base64.sh similarity index 90% rename from test...
2019 Sep 11
0
[PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
...or0.sh b/tests/test-error0.sh index fe97354..de9dca2 100755 --- a/tests/test-error0.sh +++ b/tests/test-error0.sh @@ -34,7 +34,7 @@ source ./functions.sh set -e set -x -requires qemu-io --version +requires nbdsh --version sock=`mktemp -u` files="$sock error0.pid" @@ -47,8 +47,9 @@ start_nbdkit -P error0.pid -U $sock \ pattern 1G error-rate=0% # Because error rate is 0%, reads should never fail. -qemu-io -r -f raw "nbd+unix://?socket=$sock" \ - -c "r 0M 10M" \ - -c "r 20M 10M" \ - -c "r 40M 10M" \ - -c &q...
2018 Nov 08
1
[nbdkit PATCH] log: Allow user option of appending to log
..._error ("fopen: %m"); return -1; diff --git a/tests/test-log.sh b/tests/test-log.sh index f0eacb7..b30d20e 100755 --- a/tests/test-log.sh +++ b/tests/test-log.sh @@ -45,7 +45,9 @@ if ! qemu-io -f raw -c 'w 1M 2M' log.img; then fi # Run nbdkit with logging enabled to file. -start_nbdkit -P log.pid -U log.sock --filter=log file log.img logfile=log.log +echo '# My log' > log.log +start_nbdkit -P log.pid -U log.sock --filter=log file log.img \ + logfile=log.log logappend=1 # For easier debugging, dump the final log files before removing them # on exit. @@ -61,6 +63...