Skip to content

Commit

Permalink
Fix passing multiple kernel versions
Browse files Browse the repository at this point in the history
  • Loading branch information
scaronni authored and amilonenv committed Oct 21, 2024
1 parent 848e874 commit 57fb128
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dkms.in
Original file line number Diff line number Diff line change
Expand Up @@ -1999,8 +1999,8 @@ make_tarball()
else
local i
for ((i=0; i<${#kernelver[@]}; i++)); do
local -r intree_module_dir="$dkms_tree/$module/$module_version/${kernelver[$i]}/${arch[$i]}"
local -r temp_module_dir="$temp_dir_name/dkms_main_tree/${kernelver[$i]}"
local intree_module_dir="$dkms_tree/$module/$module_version/${kernelver[$i]}/${arch[$i]}"
local temp_module_dir="$temp_dir_name/dkms_main_tree/${kernelver[$i]}"

if ! [[ -d "$intree_module_dir" ]]; then
die 6 "No modules built for ${kernelver[$i]} (${arch[$i]})." \
Expand Down
9 changes: 9 additions & 0 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,15 @@ run_status_with_expected_output 'dkms_test' << EOF
dkms_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built
EOF

echo 'Building the test module for more than one kernel version (same version twice for this test)'
run_with_expected_output dkms build -k "${KERNEL_VER}" -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF
Module dkms_test/1.0 already built for kernel ${KERNEL_VER} (${KERNEL_ARCH}), skip. You may override by specifying --force.
Module dkms_test/1.0 already built for kernel ${KERNEL_VER} (${KERNEL_ARCH}), skip. You may override by specifying --force.
EOF
run_status_with_expected_output 'dkms_test' << EOF
dkms_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built
EOF

if (( NO_SIGNING_TOOL == 0 )); then
echo 'Building the test module with bad sign_file path in framework file'
cp test/framework/bad_sign_file_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf
Expand Down

0 comments on commit 57fb128

Please sign in to comment.