On Aug 30, 2023 / 19:22, Yi Zhang wrote: > Hello > > I found blkests nvme/043 nvme/045 failed on one of our x86_64 servers, > and it works on the other servers, from the log, it failed when > Testing DH group ffdhe6144 and ffdhe8192, is it hw limitation? Hannes, may I ask your comment? I have same guess as Yi. If the DH groups ffdhe6144 and ffdhe8192 does not work always, I think changes in nvme test cases will be required to avoid the failures. It could be something like below (untested at all). diff --git a/tests/nvme/043 b/tests/nvme/043 index c6a0aa0..81ccb1b 100755 --- a/tests/nvme/043 +++ b/tests/nvme/043 @@ -56,7 +56,12 @@ test() { echo "Testing DH group ${dhgroup}" - _set_nvmet_dhgroup "${def_hostnqn}" "${dhgroup}" + if ! _set_nvmet_dhgroup "${def_hostnqn}" "${dhgroup}" && + [[ ${dhgroup} == "ffdhe6144" || + ${dhgroup} == "ffdhe8192" ]]; then + echo "DH group ${dhgroup} can not be set" >> "$FULL" + continue + fi _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ diff --git a/tests/nvme/044 b/tests/nvme/044 index 7bd43f3..3f11693 100755 --- a/tests/nvme/044 +++ b/tests/nvme/044 @@ -44,7 +44,10 @@ test() { _nvmet_target_setup --blkdev file --ctrlkey "${ctrlkey}" \ --hostkey "${hostkey}" - _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048" + if ! _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048"; then + echo "failed to set DH group ffdhe2048" + return 1 + fi # Step 1: Connect with host authentication only echo "Test host authentication" diff --git a/tests/nvme/045 b/tests/nvme/045 index 1eb1032..8e17ef5 100755 --- a/tests/nvme/045 +++ b/tests/nvme/045 @@ -48,7 +48,10 @@ test() { _nvmet_target_setup --blkdev file --ctrlkey "${ctrlkey}" \ --hostkey "${hostkey}" - _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048" + if ! _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048"; then + echo "failed to set DH group ffdhe2048" + return 1 + fi _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ @@ -88,7 +91,12 @@ test() { echo "Change DH group to ffdhe8192" - _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe8192" + if ! _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe8192"; then + SKIP_REASONS+=("can not change DH group to ffdhe8192") + _nvme_disconnect_subsys "${def_subsysnqn}" + _nvmet_target_cleanup + return + fi echo "Re-authenticate with changed DH group" diff --git a/tests/nvme/rc b/tests/nvme/rc index 1ec9eb6..46c8d60 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -803,8 +803,7 @@ _set_nvmet_dhgroup() { local nvmet_dhgroup="$2" local cfs_path="${NVMET_CFS}/hosts/${nvmet_hostnqn}" - echo "${nvmet_dhgroup}" > \ - "${cfs_path}/dhchap_dhgroup" + { echo "${nvmet_dhgroup}" > "${cfs_path}/dhchap_dhgroup" ;} 2> /dev/null } _find_nvme_dev() {