diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/spdk/test/iscsi_tgt/iscsijson | |
parent | Initial commit. (diff) | |
download | ceph-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/iscsi_tgt/iscsijson')
-rwxr-xr-x | src/spdk/test/iscsi_tgt/iscsijson/json_config.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/spdk/test/iscsi_tgt/iscsijson/json_config.sh b/src/spdk/test/iscsi_tgt/iscsijson/json_config.sh new file mode 100755 index 00000000..cec662b7 --- /dev/null +++ b/src/spdk/test/iscsi_tgt/iscsijson/json_config.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +set -xe +ISCSI_JSON_DIR=$(readlink -f $(dirname $0)) +. $ISCSI_JSON_DIR/../../json_config/common.sh +. $JSON_DIR/../iscsi_tgt/common.sh +base_iscsi_config=$JSON_DIR/base_iscsi_config.json +last_iscsi_config=$JSON_DIR/last_iscsi_config.json +rpc_py="$spdk_rpc_py" +clear_config_py="$spdk_clear_config_py" +trap 'on_error_exit "${FUNCNAME}" "${LINENO}"; rm -f $base_iscsi_config $last_iscsi_config' ERR + +timing_enter iscsi_json_config +run_spdk_tgt +$rpc_py start_subsystem_init + +timing_enter iscsi_json_config_create_setup +$rpc_py add_portal_group $PORTAL_TAG 127.0.0.1:$ISCSI_PORT +$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK +$rpc_py construct_malloc_bdev 64 4096 --name Malloc0 +$rpc_py construct_target_node Target3 Target3_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 64 -d +$rpc_py save_config > $base_iscsi_config +timing_exit iscsi_json_config_create_setup + +timing_enter iscsi_json_config_test +test_json_config +timing_exit iscsi_json_config_test + +timing_enter iscsi_json_config_restart_spdk +$clear_config_py clear_config +kill_targets +run_spdk_tgt +$rpc_py load_config < $base_iscsi_config +$rpc_py save_config > $last_iscsi_config +timing_exit iscsi_json_config_restart_spdk + +json_diff $base_iscsi_config $last_iscsi_config + +$clear_config_py clear_config +kill_targets +rm -f $base_iscsi_config $last_iscsi_config + +timing_exit iscsi_json_config +report_test_completion iscsi_json_config |