3 # Copyright (C) 2018 Western Digital Corporation or its affiliates.
5 # This file is released under the GPL.
7 scriptdir="$(cd "$(dirname "$0")" && pwd)"
9 for d in /sys/kernel/config/nullb/*; do [ -d "$d" ] && rmdir "$d"; done
11 modprobe null_blk nr_devices=0 || return $?
12 for d in /sys/kernel/config/nullb/*; do
13 [ -d "$d" ] && rmdir "$d"
16 [ -e /sys/module/null_blk ] && exit $?
17 modprobe null_blk nr_devices=0 &&
18 cd /sys/kernel/config/nullb &&
21 echo 0 > completion_nsec &&
22 echo 4096 > blocksize &&
24 echo 1 > memory_backed &&
27 "${scriptdir}"/test-zbd-support "$@" /dev/nullb0