search for: pid1

Displaying 20 results from an estimated 38 matches for "pid1".

Did you mean: pid
2018 Sep 11
2
Re: [PATCH nbdkit 4/4] tests: Add a helper function which waits for nbdkit to start up.
...sock --filter=blocksize \ > +start_nbdkit -P blocksize2.pid -U blocksize2.sock --filter=blocksize \ > --filter=log file logfile=blocksize2.log blocksize2.img \ > minblock=1024 maxdata=512k maxlen=1M If the first process starts but the second fails, then you have not set pid1=, and leak the first process. This is a regression from the old code, which managed to capture pid1 before triggering the trap to cleanup(), and thus killed the successful nbdkit. Several tests are impacted. Less importantly, the old code performed startup in parallel (kick off both nbdkit p...
2018 Aug 01
1
[PATCH nbdkit] tests: Cancel trap in cleanup function to avoid recursive traps.
...tls.sh | 2 ++ tests/test-zero.sh | 13 ++++++++++++- 13 files changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/test-blocksize.sh b/tests/test-blocksize.sh index 9cadf30..e008f5e 100755 --- a/tests/test-blocksize.sh +++ b/tests/test-blocksize.sh @@ -55,6 +55,8 @@ pid1= pid2= cleanup () { status=$? + trap '' INT QUIT TERM EXIT ERR + echo $0: cleanup: exit code $status test "$pid1" && kill $pid1 test "$pid2" && kill $pid2 diff --git a/tests/test-cache.sh b/tests/test-cache.sh index c46e7be..da1f6...
2018 Sep 11
0
Re: [PATCH nbdkit 4/4] tests: Add a helper function which waits for nbdkit to start up.
...> >+start_nbdkit -P blocksize2.pid -U blocksize2.sock --filter=blocksize \ > > --filter=log file logfile=blocksize2.log blocksize2.img \ > > minblock=1024 maxdata=512k maxlen=1M > > If the first process starts but the second fails, then you have not > set pid1=, and leak the first process. This is a regression from > the old code, which managed to capture pid1 before triggering the > trap to cleanup(), and thus killed the successful nbdkit. Several > tests are impacted. So one other idea I had is to have start_nbdkit create a trap function to...
2020 Mar 26
2
[nbdkit PATCH] tests: Swap nbdkit process order in test-nbd-tls-psk.sh
...#!/usr/bin/env bash # nbdkit -# Copyright (C) 2019 Red Hat Inc. +# Copyright (C) 2019-2020 Red Hat Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are @@ -64,14 +64,14 @@ files="$sock1 $sock2 $pid1 $pid2 nbd-tls-psk.out" rm -f $files cleanup_fn rm -f $files +# Run nbd plugin as intermediary; also test our retry code +start_nbdkit -P "$pid2" -U "$sock2" --tls=off nbd retry=5 \ + tls=require tls-psk=keys.psk tls-username=qemu socket="$sock1" + # Run enc...
2019 Apr 25
0
[nbdkit PATCH v2 5/5] nbd: Test .extents
...# test) if we ever changed that definition. + +source ./functions.sh +set -e +set -x + +requires jq --version +requires qemu-img --version +requires qemu-img map --help + +out="test-nbd-extents.out" +expected="test-nbd-extents.expected" +socket="test-nbd-extents.sock" +pid1="test-nbd-extents.pid1" +pid2="test-nbd-extents.pid2" +pid3="test-nbd-extents.pid3" +pid4="test-nbd-extents.pid4" +pid5="test-nbd-extents.pid5" +files="$out $expected $socket $pid1 $pid2 $pid3 $pid4 $pid5" +rm -f $files +cleanup_fn rm -f $...
2018 Sep 13
0
[PATCH v2 nbdkit 4/5] tests: Use a generic cleanup mechanism instead of explicit trap.
...100755 --- a/tests/test-blocksize.sh +++ b/tests/test-blocksize.sh @@ -31,6 +31,7 @@ # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +source ./functions.sh set -e files="blocksize1.img blocksize1.log blocksize1.sock blocksize1.pid @@ -54,10 +55,6 @@ pid1= pid2= # Kill any nbdkit processes on exit. cleanup () { - status=$? - trap '' INT QUIT TERM EXIT ERR - echo $0: cleanup: exit code $status - test "$pid1" && kill $pid1 test "$pid2" && kill $pid2 # For easier debugging, dump the...
2020 Aug 28
0
[nbdkit PATCH 3/3] nbd: Implement .list_exports
...bdinfo --version + +# Does the nbd plugin support dynamic lists? +if ! nbdkit --dump-plugin nbd | grep -sq libnbd_dynamic_list=1; then + echo "$0: nbd plugin built without dynamic export list support" + exit 77 +fi + +base=test-nbd-dynamic-list +sock1=`mktemp -u` +sock2=`mktemp -u` +pid1="$base.pid1" +pid2="$base.pid2" +files="$sock1 $sock2 $pid1 $pid2 $base.list $base.out1 $base.out2" +rm -f $files +cleanup_fn rm -f $files + +fail=0 + +# Start a long-running server with .list_exports and .default_export +# set to varying contents +start_nbdkit -P $pid...
2018 Sep 13
0
[PATCH v2 nbdkit 5/5] tests: Add a helper function which waits for nbdkit to start up.
...f with the plugin diff --git a/tests/test-blocksize.sh b/tests/test-blocksize.sh index 21b55b9..aa3cc13 100755 --- a/tests/test-blocksize.sh +++ b/tests/test-blocksize.sh @@ -50,14 +50,10 @@ if ! qemu-io -f raw -c 'r 0 1' -c 'w -z 1000 2000' \ fi truncate -s 10M blocksize2.img -pid1= pid2= - -# Kill any nbdkit processes on exit. +# For easier debugging, dump the final log files before removing them +# on exit. cleanup () { - test "$pid1" && kill $pid1 - test "$pid2" && kill $pid2 - # For easier debugging, dump the final log files...
2018 Sep 13
8
[PATCH v2 nbdkit 0/5] tests: Move common functions into tests/functions.sh
v1 was here: https://www.redhat.com/archives/libguestfs/2018-September/msg00057.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
2020 Aug 28
4
[nbdkit PATCH 0/3] .list_exports in nbd plugin
Another series on top of my exportname filter, marking off another todo bullet point. With this, you can now use the NBD plugin as a transparent passthrough of all export names served by the remote server in both directions (list advertisement server to client, and export name from client to server). Eric Blake (3): nbd: Implement .default_export, .export_description nbd: Add
2009 Jul 03
1
are partial files always deleted on interruption?
...like partial-dir or delay-updates. However I've found that a file was left after interruption, with a zero size. Would it be possible that rsync doesn't delete the partial file if it's not yet written to it? This is 3.0.6 on linux. Both processes were killed with the same command, kill pid1 pid2.
2020 Apr 14
0
[nbdkit PATCH v2 3/3] server: More tests of stdin/out handling
...POSSIBILITY OF +# SUCH DAMAGE. + +source ./functions.sh +set -xe + +requires nbdsh -c 'exit (not h.supports_uri ())' + +plugin=.libs/test-stdio-plugin.so +requires test -f $plugin + +sock1=`mktemp -u` +sock2=`mktemp -u` +files="test-stdio.in test-stdio.out test-stdio.err + test-stdio.pid1 test-stdio.pid2 $sock1 $sock2" +rm -f $files +cleanup_fn rm -f $files + +# Using a seekable file lets us prove that if the plugin consumes less +# than the full input, the next process sees the rest +cat >test-stdio.in <<EOF +string1 +string2 +EOF + +# .dump_plugin using stdout is nor...
2020 Mar 26
0
Re: [nbdkit PATCH] tests: Swap nbdkit process order in test-nbd-tls-psk.sh
...> -# Copyright (C) 2019 Red Hat Inc. > +# Copyright (C) 2019-2020 Red Hat Inc. > # > # Redistribution and use in source and binary forms, with or without > # modification, are permitted provided that the following conditions are > @@ -64,14 +64,14 @@ files="$sock1 $sock2 $pid1 $pid2 nbd-tls-psk.out" > rm -f $files > cleanup_fn rm -f $files > > +# Run nbd plugin as intermediary; also test our retry code > +start_nbdkit -P "$pid2" -U "$sock2" --tls=off nbd retry=5 \ > + tls=require tls-psk=keys.psk tls-username=qemu socket=&...
2014 Feb 12
2
Re: LXC container driver
> > NB user namespaces are a fairly new piece of functionality that > is still somewhat rough around the edges. You usuaully want to > have the most recent kernel.org stable kernel available when > using this. > Yes, I confirm it is a little bit touchy for me. gabx@hortensia ➤➤ ~ % uname -a Linux hortensia 3.12.9-2-ARCH #1 SMP PREEMPT Fri Jan 31 10:22:54 CET 2014 x86_64
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 Sep 11
0
[PATCH nbdkit 4/4] tests: Add a helper function which waits for nbdkit to start up.
...g file logfile=blocksize2.log blocksize2.img \ minblock=1024 maxdata=512k maxlen=1M - -# We may have to wait a short time for the pid files to appear. -for i in `seq 1 10`; do - if test -f blocksize1.pid && test -f blocksize2.pid; then - break - fi - sleep 1 -done - -pid1="$(cat blocksize1.pid)" || : -pid2="$(cat blocksize2.pid)" || : - -if ! test -f blocksize1.pid || ! test -f blocksize2.pid; then - echo "$0: PID files were not created" - exit 1 -fi +pid1="$(cat blocksize1.pid)" +pid2="$(cat blocksize2.pid)"...
2018 Feb 01
0
[nbdkit PATCH v2 3/3] filters: Add blocksize filter
...0M blocksize1.img +if ! $QEMU_IO -f raw -c 'r 0 1' -c 'w -z 1000 2000' \ + -c 'w -P 0 1M 2M' -c 'discard 3M 4M' blocksize1.img; then + echo "$0: missing or broken qemu-io" + rm blocksize1.img + exit 77 +fi +truncate --size 10M blocksize2.img + +pid1= pid2= + +# Kill any nbdkit processes on exit. +cleanup () +{ + status=$? + + test "$pid1" && kill $pid1 + test "$pid2" && kill $pid2 + # For easier debugging, dump the final log files before removing them. + echo "Log 1 file contents:" +...
2018 Mar 08
0
[nbdkit PATCH v3 05/15] filters: Add blocksize filter
...0M blocksize1.img +if ! $QEMU_IO -f raw -c 'r 0 1' -c 'w -z 1000 2000' \ + -c 'w -P 0 1M 2M' -c 'discard 3M 4M' blocksize1.img; then + echo "$0: missing or broken qemu-io" + rm blocksize1.img + exit 77 +fi +truncate --size 10M blocksize2.img + +pid1= pid2= + +# Kill any nbdkit processes on exit. +cleanup () +{ + status=$? + + test "$pid1" && kill $pid1 + test "$pid2" && kill $pid2 + # For easier debugging, dump the final log files before removing them. + echo "Log 1 file contents:" +...
2014 Feb 12
0
Re: LXC container driver
...the basic .xml file: <domain type='lxc'> <name>dahlia</name> <memory>409600</memory> <os> <type arch='x86_64'>exec</type> <init>/bin/init</init> * systemd is default and PID1 is init on my Arch box <vcpu>4</vcpu> </os> <devices> <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> * it is the path on Arch <console type='pty'/> </devices> </domain> Unfortunately : gabx@horte...
2014 Feb 12
1
Re: LXC container driver
...dahlia</name> > <memory>409600</memory> > <os> > <type arch='x86_64'>exec</type> NB, you want 'exe' not 'exec' > <init>/bin/init</init> * systemd is > default and PID1 is init on my Arch box > <vcpu>4</vcpu> > </os> > <devices> > <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> * it is the > path on Arch > <console type='pty'/> > </devices> > <...