From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/spdk/test/json_config/alias_rpc/alias_rpc.sh | 20 +++++++++++ src/spdk/test/json_config/alias_rpc/conf.json | 44 ++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100755 src/spdk/test/json_config/alias_rpc/alias_rpc.sh create mode 100644 src/spdk/test/json_config/alias_rpc/conf.json (limited to 'src/spdk/test/json_config/alias_rpc') 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 + } + ] +} -- cgit v1.2.3