2 # nbd client library in userspace
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2 of the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 . ..
/tests
/functions.sh
24 requires nbdkit
--exit-with-parent --version
26 pidfile
=copy-zero-to-nbd.pid
27 sock
=$
(mktemp
-u /tmp
/libnbd-test-copy.XXXXXX
)
28 cleanup_fn
rm -f $pidfile $sock
30 nbdkit
--exit-with-parent -f -v -P $pidfile -U $sock memory size
=10M
&
31 # Wait for the pidfile to appear.
33 if test -f $pidfile; then
38 if ! test -f $pidfile; then
39 echo "$0: nbdkit did not start up"
43 $VG nbdcopy
-p /dev
/null
"nbd+unix:///?socket=$sock"