@@ -465,7 +465,7 @@ configure_target_ports() {
# Load LIO and configure the SRP target driver and LUNs.
start_lio_srpt() {
- local b d gid i ini_ids=() opts p target_ids=() vdev
+ local b d gid i ini_ids=() opts p target_ids=()
for gid in $(all_primary_gids); do
if [ "${gid#fe8}" != "$gid" ]; then
@@ -500,7 +500,7 @@ start_lio_srpt() {
if modinfo ib_srpt | grep -q '^parm:[[:blank:]]*rdma_cm_port:'; then
opts+=("rdma_cm_port=${srp_rdma_cm_port}")
fi
- insmod "/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko" "${opts[@]}" || return $?
+ insmod "/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt."* "${opts[@]}" || return $?
i=0
for r in "${vdev_path[@]}"; do
if [ -b "$(readlink -f "$r")" ]; then
Fix the ib_srpt module insmod failure as the module in some distros are end with .xz, like bellow on fedora: /lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko.xz Signed-off-by: Yi Zhang <yi.zhang@redhat.com> --- tests/srp/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)