Skip to content

Commit a6cf230

Browse files
committed
nvme/rc: introduce _have_tlshd_ver() and _have_systemd_tlshd_service()
To run the newly introduced test cases for nvme-tcp TLS support, the userland daemon tlshd and its systemctl service unit are required. Confirm availability of tlshd and the systemctl service. Also check that the tlshd version is larger than or equal to 1.0.0, which allows to authenticate TLS sessions for nvme subsystem with the default configurations. Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent bc36cc3 commit a6cf230

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

  • tests/nvme

tests/nvme/rc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,3 +597,23 @@ _nvme_reset_ctrl() {
597597
_nvme_delete_ctrl() {
598598
echo 1 > /sys/class/nvme/"$1"/delete_controller
599599
}
600+
601+
# Check whether the version of the fio is greater than or equal to $1.$2.$3
602+
_have_tlshd_ver() {
603+
_have_program tlshd || return $?
604+
605+
if _compare_three_version_numbers \
606+
"$(tlshd --version |& sed 's/.*utils \([0-9^.]*\).*/\1/')" \
607+
"$1" "$2" "$3"; then
608+
SKIP_REASONS+=("tlshd version is older than ${1}.${2}.${3}")
609+
return 1
610+
fi
611+
return 0
612+
}
613+
614+
_have_systemd_tlshd_service() {
615+
_have_tlshd_ver 1 0 0
616+
if ! _have_systemctl_unit tlshd; then
617+
SKIP_REASONS+=("Install ktls-utils for tlshd")
618+
fi
619+
}

0 commit comments

Comments
 (0)