Merge ~canonical-kernel-team/+git/autotest-client-tests:jacobmartin/expect-kver-specific-mofed-mods into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Jacob Martin
Status: Merged
Approved by: Po-Hsu Lin
Approved revision: ce78d85ecb4e11e00cbfcca206de694ddc5f3a50
Merge reported by: Po-Hsu Lin
Merged at revision: ce78d85ecb4e11e00cbfcca206de694ddc5f3a50
Proposed branch: ~canonical-kernel-team/+git/autotest-client-tests:jacobmartin/expect-kver-specific-mofed-mods
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 63 lines (+36/-2)
2 files modified
ubuntu_dgx_mofed_build/check-mofed-modules.sh (+13/-2)
ubuntu_dgx_mofed_build/expected-mofed-modules/23.10-1.1.9.0-jammy-6.5.0.lst (+23/-0)
Reviewer Review Type Date Requested Status
Po-Hsu Lin Approve
Review via email: mp+467742@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Looking good with just one nit.

review: Needs Fixing
Revision history for this message
Jacob Martin (jacobmartin) wrote :

Thanks for the review, I pushed an update to the branch simplifying the kernel version printf.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Thanks.

review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Applied and pushed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubuntu_dgx_mofed_build/check-mofed-modules.sh b/ubuntu_dgx_mofed_build/check-mofed-modules.sh
2index 80a2976..8a6613d 100755
3--- a/ubuntu_dgx_mofed_build/check-mofed-modules.sh
4+++ b/ubuntu_dgx_mofed_build/check-mofed-modules.sh
5@@ -12,9 +12,18 @@ printf " %s\n" $release
6 printf "INFO: Detecting MOFED driver version..."
7 mofedver="$(dpkg-query --showformat='${Version}' --show mlnx-ofed-kernel-only)"
8 printf " %s\n" ${mofedver}
9-printf "INFO: Detecting Kernel version... %s\n" "$(uname -r)"
10+kernelver="$(uname -r)"
11+printf "INFO: Detecting Kernel version... %s\n" ${kernelver}
12 actual="$(mktemp)"
13-expected="$(pwd)/expected-mofed-modules/${mofedver}-${release}.lst"
14+
15+# First check for a list specific to this major kernel version
16+expected="$(pwd)/expected-mofed-modules/${mofedver}-${release}-${kernelver%%-*}.lst"
17+if [ ! -f "${expected}" ]; then
18+ # Fall back to a general list for this MOFED version & series combination.
19+ printf "INFO: No expected module list at '%s', falling back to " "${expected}"
20+ expected="$(pwd)/expected-mofed-modules/${mofedver}-${release}.lst"
21+ printf "'%s'\n" "${expected}"
22+fi
23
24 # This test assumes that the only modules installed here are the MOFED ones.
25 # If other DKMS packages are installed that will throw it off.
26@@ -26,6 +35,8 @@ if [ ! -f ${expected} ]; then
27 exit 1
28 fi
29
30+echo "INFO: Using expected module list file '${expected}'"
31+
32 if diff -u ${expected} ${actual}; then
33 echo "INFO: Success: Actual module list matches expected module list."
34 exit 0
35diff --git a/ubuntu_dgx_mofed_build/expected-mofed-modules/23.10-1.1.9.0-jammy-6.5.0.lst b/ubuntu_dgx_mofed_build/expected-mofed-modules/23.10-1.1.9.0-jammy-6.5.0.lst
36new file mode 100644
37index 0000000..a7f6bc8
38--- /dev/null
39+++ b/ubuntu_dgx_mofed_build/expected-mofed-modules/23.10-1.1.9.0-jammy-6.5.0.lst
40@@ -0,0 +1,23 @@
41+ib_cm.ko
42+ib_core.ko
43+ib_ipoib.ko
44+ib_iser.ko
45+ib_isert.ko
46+ib_srp.ko
47+ib_umad.ko
48+ib_uverbs.ko
49+irdma.ko
50+iw_cm.ko
51+knem.ko
52+mlx5-vfio-pci.ko
53+mlx5_core.ko
54+mlx5_ib.ko
55+mlx5_vdpa.ko
56+mlx_compat.ko
57+mlxdevm.ko
58+mlxfw.ko
59+mst_pci.ko
60+mst_pciconf.ko
61+rdma_cm.ko
62+rdma_ucm.ko
63+scsi_transport_srp.ko

Subscribers

People subscribed via source and target branches

to all changes: