libnbd/tests/basic-test.sh

16 lines
295 B
Bash
Raw Normal View History

2020-12-03 13:40:12 +00:00
#!/bin/bash -
set -e
set -x
# Enable libnbd debugging.
export LIBNBD_DEBUG=1
# Connect to nbdkit.
nbdsh -c - <<EOF
h.connect_command (["nbdkit", "-s", "--exit-with-parent",
"memory", "size=1G"])
size = h.get_size ()
print ("size = %s" % size)
assert size == 1073741824
EOF