@@ -53,11 +53,11 @@ test() {
echo "Testing IOCTL path"
- nbd-client -N export localhost /dev/nbd0 >> "$FULL" 2>&1
+ nbd-client -nonetlink -N export localhost /dev/nbd0 >> "$FULL" 2>&1
if ! _wait_for_nbd_connect; then
echo "Connect didn't happen?"
- nbd-client -d /dev/nbd0 >> "$FULL" 2>&1
+ nbd-client -nonetlink -d /dev/nbd0 >> "$FULL" 2>&1
_stop_nbd_server
return 1
fi
@@ -66,12 +66,12 @@ test() {
if ! stat /dev/nbd0p1 >> "$FULL" 2>&1; then
echo "Didn't have partition on ioctl path"
- nbd-client -d /dev/nbd0 >> "$FULL" 2>&1
+ nbd-client -nonetlink -d /dev/nbd0 >> "$FULL" 2>&1
_stop_nbd_server
return 1
fi
- nbd-client -d /dev/nbd0 >> "$FULL" 2>&1
+ nbd-client -nonetlink -d /dev/nbd0 >> "$FULL" 2>&1
udevadm settle
@@ -83,7 +83,7 @@ test() {
# Do it with netlink
echo "Testing the netlink path"
- nbd-client -L -N export localhost /dev/nbd0 >> "$FULL" 2>&1
+ nbd-client -N export localhost /dev/nbd0 >> "$FULL" 2>&1
if ! _wait_for_nbd_connect; then
echo "Connect didn't happen?"
@@ -96,12 +96,12 @@ test() {
if ! stat /dev/nbd0p1 >/dev/null 2>&1; then
echo "Didn't have partition on the netlink path"
- nbd-client -L -d /dev/nbd0 >> "$FULL" 2>&1
+ nbd-client -d /dev/nbd0 >> "$FULL" 2>&1
_stop_nbd_server
return 1
fi
- nbd-client -L -d /dev/nbd0 >> "$FULL" 2>&1
+ nbd-client -d /dev/nbd0 >> "$FULL" 2>&1
if ! _wait_for_nbd_disconnect; then
echo "Disconnect didn't happen?"
As the commit 3c014acd5171 ("nbd/001: use -L for nbd-client") explains, the nbd-client command uses the netlink interface instead of the ioctl interface. The default interface changed at nbd version 3.17 in March 2018. Before that, the default was ioctl. After the change, the nbd-client command requires -L or -nonetlink option to use the ioctl interface. The commit 3c014acd5171 adjusted nbd/001 test script to the default interface change. However, it is not reflected to nbd/002. This caused mismatch between the comments in the test case and the actual test. The comments describe the first half as "Do it with ioctls", and the last half as "Do it with netlink". However, the test script does opposite. It specifies no option for the first half, then tests with netlink interface. It specifies -L option for the last half, then tests with the ioctl interface. This makes it difficult to debug the failure of the test case. Fix the nbd-client command option to match the comments. Also, use the long option -nonetlink instead of -L for easier reading. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> --- tests/nbd/002 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)