@@ -14,6 +14,7 @@ requires() {
_have_loop
_have_kernel_option NVME_AUTH
_have_kernel_option NVME_TARGET_AUTH
+ _require_kernel_nvme_fabrics_feature dhchap_ctrl_secret
_require_nvme_trtype_is_fabrics
_require_nvme_cli_auth
}
@@ -14,6 +14,7 @@ requires() {
_have_loop
_have_kernel_option NVME_AUTH
_have_kernel_option NVME_TARGET_AUTH
+ _require_kernel_nvme_fabrics_feature dhchap_ctrl_secret
_require_nvme_trtype_is_fabrics
_require_nvme_cli_auth
}
@@ -14,6 +14,7 @@ requires() {
_have_loop
_have_kernel_option NVME_AUTH
_have_kernel_option NVME_TARGET_AUTH
+ _require_kernel_nvme_fabrics_feature dhchap_ctrl_secret
_require_nvme_trtype_is_fabrics
_require_nvme_cli_auth
_have_driver dh_generic
@@ -14,6 +14,7 @@ requires() {
_have_loop
_have_kernel_option NVME_AUTH
_have_kernel_option NVME_TARGET_AUTH
+ _require_kernel_nvme_fabrics_feature dhchap_ctrl_secret
_require_nvme_trtype_is_fabrics
_require_nvme_cli_auth
_have_driver dh_generic
@@ -15,6 +15,7 @@ requires() {
_have_loop
_have_kernel_option NVME_AUTH
_have_kernel_option NVME_TARGET_AUTH
+ _require_kernel_nvme_fabrics_feature dhchap_ctrl_secret
_require_nvme_trtype_is_fabrics
_require_nvme_cli_auth
_have_driver dh_generic
@@ -155,6 +155,22 @@ _require_nvme_cli_auth() {
return 0
}
+_require_kernel_nvme_fabrics_feature() {
+ local feature="$1"
+
+ _have_driver nvme-fabrics || return 1
+
+ if ! [[ -r /dev/nvme-fabrics ]]; then
+ SKIP_REASONS+=("/dev/nvme-fabrics not available")
+ return 1;
+ fi
+ if ! grep -qe "${feature}" /dev/nvme-fabrics; then
+ SKIP_REASONS+=("nvme-fabrics does not support ${feature}")
+ return 1;
+ fi
+ return 0
+}
+
_test_dev_nvme_ctrl() {
echo "/dev/char/$(cat "${TEST_DEV_SYSFS}/device/dev")"
}