summaryrefslogtreecommitdiffstats
path: root/src/spdk/test/json_config/alias_rpc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/spdk/test/json_config/alias_rpc
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spdk/test/json_config/alias_rpc')
-rwxr-xr-xsrc/spdk/test/json_config/alias_rpc/alias_rpc.sh20
-rw-r--r--src/spdk/test/json_config/alias_rpc/conf.json44
2 files changed, 64 insertions, 0 deletions
diff --git a/src/spdk/test/json_config/alias_rpc/alias_rpc.sh b/src/spdk/test/json_config/alias_rpc/alias_rpc.sh
new file mode 100755
index 000000000..25e07fae4
--- /dev/null
+++ b/src/spdk/test/json_config/alias_rpc/alias_rpc.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+testdir=$(readlink -f $(dirname $0))
+rootdir=$(readlink -f $testdir/../../..)
+source $rootdir/test/common/autotest_common.sh
+
+trap 'killprocess $spdk_tgt_pid; exit 1' ERR
+
+$SPDK_BIN_DIR/spdk_tgt &
+spdk_tgt_pid=$!
+waitforlisten $spdk_tgt_pid
+
+# Test deprecated rpcs in json
+$rootdir/scripts/rpc.py load_config -i < $testdir/conf.json
+
+# Test deprecated rpcs in rpc.py
+$rootdir/scripts/rpc.py delete_malloc_bdev "Malloc0"
+$rootdir/scripts/rpc.py delete_malloc_bdev "Malloc1"
+
+killprocess $spdk_tgt_pid
diff --git a/src/spdk/test/json_config/alias_rpc/conf.json b/src/spdk/test/json_config/alias_rpc/conf.json
new file mode 100644
index 000000000..ba3e6b254
--- /dev/null
+++ b/src/spdk/test/json_config/alias_rpc/conf.json
@@ -0,0 +1,44 @@
+{
+ "subsystems": [
+ {
+ "subsystem": "accel",
+ "config": []
+ },
+ {
+ "subsystem": "interface",
+ "config": null
+ },
+ {
+ "subsystem": "net_framework",
+ "config": null
+ },
+ {
+ "subsystem": "bdev",
+ "config": [
+ {
+ "params": {
+ "block_size": 4096,
+ "num_blocks": 32
+ },
+ "method": "construct_malloc_bdev"
+ },
+ {
+ "params": {
+ "name": "Malloc1",
+ "block_size": 4096,
+ "num_blocks": 32
+ },
+ "method": "construct_malloc_bdev"
+ }
+ ]
+ },
+ {
+ "subsystem": "nbd",
+ "config": []
+ },
+ {
+ "subsystem": "scsi",
+ "config": null
+ }
+ ]
+}