This helps avoid issues with nbd not being ready when we need it. Still keep various "modprobe nbd" in different test files - this ensures these test files can still be run in isolation. But remove the various "rmmod nbd" to ensure that nbd always stays loaded. There is no harm in just keeping nbd loaded all the time. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I3597ff1f7ac53162c33a0384a33f33776cf6f182 Reviewed-on: https://review.gerrithub.io/434838 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
30 lines
740 B
Bash
Executable File
30 lines
740 B
Bash
Executable File
#!/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
|
|
waitfornbd nbd0
|
|
$rpc_py start_nbd_disk Nvme0n1 /dev/nbd1
|
|
waitfornbd 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
|
|
timing_exit nbd_json_config
|
|
report_test_completion nbd_json_config
|