Message ID | 20191030195258.31108-2-chaitanya.kulkarni@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | nvme: add a new test to check model attr | expand |
On 10/30/2019 12:53 PM, Chaitanya Kulkarni wrote: > This patch allows _create_nvmet_subsystem to handle and optionally > set model attribute for the subsys. Will send out updated version along with kernel patch.
diff --git a/tests/nvme/rc b/tests/nvme/rc index 40f0413..2d11e2e 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -121,10 +121,14 @@ _create_nvmet_subsystem() { local nvmet_subsystem="$1" local blkdev="$2" local uuid=$3 + local model=$4 local cfs_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}" mkdir -p "${cfs_path}" echo 1 > "${cfs_path}/attr_allow_any_host" + if [ -f "${cfs_path}/attr_model" ] && [ ! -z ${model+x} ]; then + echo -n ${model} > "${cfs_path}/attr_model" + fi _create_nvmet_ns "${nvmet_subsystem}" "1" "${blkdev}" "${uuid}" }