Commit eb401ec1 authored by Pawel Kaminski's avatar Pawel Kaminski Committed by Jim Harris
Browse files

lib/rpc: Test if aliases are handled properly.



Use old rpc in conf.json to check
if rpc alias if handled properly.

Change-Id: I466e39dd6b4adf140225060e46752250ae30ddb4
Signed-off-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465666


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 4368937b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
	run_test suite test/env/env.sh
	run_test suite test/rpc_client/rpc_client.sh
	run_test suite ./test/json_config/json_config.sh
	run_test suite test/json_config/alias_rpc/alias_rpc.sh

	if [ $SPDK_TEST_BLOCKDEV -eq 1 ]; then
		run_test suite test/bdev/blockdev.sh
+20 −0
Original line number Diff line number Diff line
#!/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

$rootdir/app/spdk_tgt/spdk_tgt &
spdk_tgt_pid=$!
waitforlisten $spdk_tgt_pid

# Test deprecated rpcs in json
cat $testdir/conf.json | $rootdir/scripts/rpc.py load_config -i

# 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
+44 −0
Original line number Diff line number Diff line
{
  "subsystems": [
    {
      "subsystem": "copy",
      "config": null
    },
    {
      "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
    }
  ]
}