summaryrefslogtreecommitdiffstats
path: root/src/spdk/test/bdev/nbdjson/json_config.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/spdk/test/bdev/nbdjson/json_config.sh
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spdk/test/bdev/nbdjson/json_config.sh')
-rwxr-xr-xsrc/spdk/test/bdev/nbdjson/json_config.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/spdk/test/bdev/nbdjson/json_config.sh b/src/spdk/test/bdev/nbdjson/json_config.sh
new file mode 100755
index 00000000..ccd7006c
--- /dev/null
+++ b/src/spdk/test/bdev/nbdjson/json_config.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+set -xe
+NBD_JSON_DIR=$(readlink -f $(dirname $0))
+. $NBD_JSON_DIR/../../json_config/common.sh
+rpc_py="$spdk_rpc_py"
+clear_config_py="$spdk_clear_config_py"
+trap 'on_error_exit "${FUNCNAME}" "${LINENO}"' ERR
+
+timing_enter nbd_json_config
+run_spdk_tgt
+load_nvme
+modprobe nbd
+
+timing_enter nbd_json_config_create_setup
+$rpc_py construct_malloc_bdev 128 512 --name Malloc0
+$rpc_py start_nbd_disk Malloc0 /dev/nbd0
+$rpc_py start_nbd_disk Nvme0n1 /dev/nbd1
+timing_exit nbd_json_config_create_setup
+
+timing_enter nbd_json_config_test
+test_json_config
+timing_exit nbd_json_config_test
+
+$clear_config_py clear_config
+kill_targets
+rmmod nbd
+timing_exit nbd_json_config
+report_test_completion nbd_json_config