From 904cb3aee873c31fd523f33f0904de42705adaa0 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Thu, 21 Nov 2024 22:02:11 +0100 Subject: [PATCH] run_test.sh: do not remove blank lines from command output --- run_test.sh | 230 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 199 insertions(+), 31 deletions(-) diff --git a/run_test.sh b/run_test.sh index b1e0d354..be79aead 100755 --- a/run_test.sh +++ b/run_test.sh @@ -196,8 +196,6 @@ generalize_expected_output() { # Apport related error that can occur in the CI. Drop from the output to be more generic sed -i "/^python3: can't open file '\/usr\/share\/apport\/package-hooks\/dkms_packages.py'\: \[Errno 2\] No such file or directory$/d" ${output_log} sed -i "/^ERROR (dkms apport): /d" ${output_log} - # Drop empty lines - sed -i "/^$/d" ${output_log} # Swap any CC/LD/... flags (if set) with a placeholder message sed -i "s|\(make -j1 KERNELRELEASE=${KERNEL_VER} all\).*|\1 |" ${output_log} } @@ -345,7 +343,8 @@ if [ "${sign_file}" = "/usr/bin/kmodsign" ]; then fi if (( NO_SIGNING_TOOL == 0 )); then - SIGNING_PROLOGUE="${SIGNING_PROLOGUE_command} + SIGNING_PROLOGUE=" +${SIGNING_PROLOGUE_command} ${SIGNING_PROLOGUE_key} ${SIGNING_PROLOGUE_cert} " @@ -371,6 +370,7 @@ rm /etc/dkms/framework.conf.d/dkms_test_framework.conf echo 'Adding the test module by version (expected error)' run_with_expected_error 2 dkms add -m dkms_test -v 1.0 << EOF + Error! Could not find module source directory. Directory: /usr/src/dkms_test-1.0 does not exist. EOF @@ -386,12 +386,14 @@ EOF echo 'Adding the test module again (expected error)' run_with_expected_error 3 dkms add test/dkms_test-1.0 << EOF + Error! DKMS tree already contains: dkms_test/1.0 You cannot add the same module/version combo more than once. EOF echo 'Adding the test module by version (expected error)' run_with_expected_error 3 dkms add -m dkms_test -v 1.0 << EOF + Error! DKMS tree already contains: dkms_test/1.0 You cannot add the same module/version combo more than once. EOF @@ -399,7 +401,8 @@ EOF echo 'Building the test module' set_signing_message "dkms_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -426,7 +429,8 @@ EOF if (( NO_SIGNING_TOOL == 0 )); then SIGNING_PROLOGUE_="${SIGNING_PROLOGUE}" - SIGNING_PROLOGUE="${SIGNING_PROLOGUE_command} + SIGNING_PROLOGUE=" +${SIGNING_PROLOGUE_command} Signing key: /tmp/dkms_test_private_key Public certificate (MOK): /tmp/dkms_test_certificate " @@ -434,8 +438,10 @@ Public certificate (MOK): /tmp/dkms_test_certificate 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 run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF + Sign command: /no/such/file Binary /no/such/file not found, modules won't be signed + Cleaning build area... done. Building module(s)... done. Cleaning build area... done. @@ -444,10 +450,12 @@ EOF echo ' Building the test module with bad mok_signing_key path in framework file' cp test/framework/bad_key_file_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF + ${SIGNING_PROLOGUE_command} Signing key: /no/such/path.key Public certificate (MOK): /var/lib/dkms/mok.pub Key file /no/such/path.key not found and can't be generated, modules won't be signed + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -456,10 +464,12 @@ EOF echo ' Building the test module with bad mok_certificate path in framework file' cp test/framework/bad_cert_file_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF + ${SIGNING_PROLOGUE_command} Signing key: /tmp/dkms_test_private_key Public certificate (MOK): /no/such/path.crt Certificate file /no/such/path.crt not found and can't be generated, modules won't be signed + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -470,9 +480,11 @@ EOF mkdir "/tmp/dkms_test_dir_${KERNEL_VER}/" cp test/framework/variables_in_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF + Sign command: /lib/modules/${KERNEL_VER}/build/scripts/sign-file Signing key: /tmp/dkms_test_dir_${KERNEL_VER}/key Public certificate (MOK): /tmp/dkms_test_dir_${KERNEL_VER}/cert + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -497,7 +509,8 @@ EOF fi echo "CONFIG_MODULE_SIG_HASH=\"${ALTER_HASH}\"" > /tmp/dkms_test_kconfig run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --config /tmp/dkms_test_kconfig --force << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -514,7 +527,8 @@ cp test/framework/temp_key_cert.conf /etc/dkms/framework.conf.d/dkms_test_framew echo 'Building the test module again by force' run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -529,6 +543,7 @@ fi echo 'Installing the test module' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -550,10 +565,12 @@ fi echo 'Installing the test module again by force' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF + Module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -590,6 +607,7 @@ fi echo 'Uninstalling the test module' run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF + Module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} @@ -632,6 +650,7 @@ echo 'Removing the test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF Module dkms_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -651,6 +670,7 @@ EOF echo 'Removing the test module' run_with_expected_output dkms remove --all -m dkms_test -v 1.0 << EOF + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -659,9 +679,11 @@ EOF echo 'Installing the test module by version (combining add, build, install)' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF ${SIGNING_PROLOGUE}Creating symlink /var/lib/dkms/dkms_test/1.0/source -> /usr/src/dkms_test-1.0 + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -703,10 +725,12 @@ fi echo 'Removing the test module with --all' run_with_expected_output dkms remove --all -m dkms_test -v 1.0 << EOF + Module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -721,6 +745,7 @@ remove_module_source_tree /usr/src/dkms_test-1.0 echo 'Building the test module by config file (combining add, build)' run_with_expected_output dkms build -k "${KERNEL_VER}" test/dkms_test-1.0/dkms.conf << EOF ${SIGNING_PROLOGUE}Creating symlink /var/lib/dkms/dkms_test/1.0/source -> /usr/src/dkms_test-1.0 + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -731,6 +756,7 @@ EOF echo "Running dkms autoinstall" run_with_expected_output dkms autoinstall -k "${KERNEL_VER}" << EOF + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. @@ -741,19 +767,23 @@ EOF echo "Running dkms autoinstall for a kernel without headers installed (expected error)" run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}-noheaders" << EOF + Error! Your kernel headers for kernel ${KERNEL_VER}-noheaders cannot be found at /lib/modules/${KERNEL_VER}-noheaders/build or /lib/modules/${KERNEL_VER}-noheaders/source. Please install the linux-headers-${KERNEL_VER}-noheaders package or use the --kernelsourcedir option to tell DKMS where it's located. Autoinstall on ${KERNEL_VER}-noheaders failed for module(s) dkms_test(1). + Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF echo 'Removing the test module with --all' run_with_expected_output dkms remove --all -m dkms_test -v 1.0 << EOF + Module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -789,9 +819,11 @@ patching file dkms_patches_test.c applying patch subdir/patch2.patch...patching file Makefile patching file dkms_patches_test.c done. + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE_patches}Cleaning build area... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_patches_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -801,6 +833,7 @@ EOF echo ' Unbuilding the test module with patches' run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_patches_test -v 1.0 << EOF + Module dkms_patches_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_patches_test.ko${mod_compression_ext} @@ -813,6 +846,7 @@ EOF echo ' Adding test module with pre/post scripts' run_with_expected_output dkms add test/dkms_scripts_test-1.0 << EOF Creating symlink /var/lib/dkms/dkms_scripts_test/1.0/source -> /usr/src/dkms_scripts_test-1.0 + Running the post_add script: EOF check_module_source_tree_created /usr/src/dkms_scripts_test-1.0 @@ -824,13 +858,19 @@ echo ' Building and installing the test module with pre/post scripts' set_signing_message "dkms_scripts_test" "1.0" SIGNING_MESSAGE_scripts="$SIGNING_MESSAGE" run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_scripts_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Running the pre_build script: +${SIGNING_PROLOGUE} +Running the pre_build script: + Cleaning build area... done. Building module(s)... done. -${SIGNING_MESSAGE_scripts}Running the post_build script: +${SIGNING_MESSAGE_scripts} +Running the post_build script: Cleaning build area... done. + + Running the pre_install script: Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_scripts_test.ko${mod_compression_ext} + Running the post_install script: Running depmod... done. EOF @@ -840,9 +880,11 @@ EOF echo ' Unbuilding the test module with pre/post scripts' run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_scripts_test -v 1.0 << EOF + Module dkms_scripts_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_scripts_test.ko${mod_compression_ext} + Running the post_remove script: Running depmod... done. EOF @@ -853,6 +895,7 @@ EOF echo ' Adding noisy test module' run_with_expected_output dkms add test/dkms_noisy_test-1.0 << EOF Creating symlink /var/lib/dkms/dkms_noisy_test/1.0/source -> /usr/src/dkms_noisy_test-1.0 + Running the post_add script: /var/lib/dkms/dkms_noisy_test/1.0/source/script.sh post_add post_add: line 1 @@ -878,6 +921,7 @@ Hunk #1 succeeded at 3 (offset 2 lines). patching file dkms_noisy_test.c Hunk #1 succeeded at 18 (offset 2 lines). done. + Running the pre_build script: /var/lib/dkms/dkms_noisy_test/1.0/build/script.sh pre_build pre_build: line 1 @@ -885,9 +929,11 @@ pre_build: line 2/stderr pre_build: line 3 pre_build: line 4/stderr pre_build: line 5 + Cleaning build area... done. Building module(s)... done. -${SIGNING_MESSAGE_noisy}Running the post_build script: +${SIGNING_MESSAGE_noisy} +Running the post_build script: /var/lib/dkms/dkms_noisy_test/1.0/build/script.sh post_build post_build: line 1 post_build: line 2/stderr @@ -895,6 +941,8 @@ post_build: line 3 post_build: line 4/stderr post_build: line 5 Cleaning build area... done. + + Running the pre_install script: /var/lib/dkms/dkms_noisy_test/1.0/source/script.sh pre_install pre_install: line 1 @@ -903,6 +951,7 @@ pre_install: line 3 pre_install: line 4/stderr pre_install: line 5 Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noisy_test.ko${mod_compression_ext} + Running the post_install script: /var/lib/dkms/dkms_noisy_test/1.0/source/script.sh post_install post_install: line 1 @@ -918,9 +967,11 @@ EOF echo ' Unbuilding the noisy test module' run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_noisy_test -v 1.0 << EOF + Module dkms_noisy_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noisy_test.ko${mod_compression_ext} + Running the post_remove script: /var/lib/dkms/dkms_noisy_test/1.0/source/script.sh post_remove post_remove: line 1 @@ -944,6 +995,7 @@ Hunk #1 succeeded at 3 (offset 2 lines). patching file dkms_noisy_test.c Hunk #1 succeeded at 18 (offset 2 lines). done. + Running the pre_build script: /var/lib/dkms/dkms_noisy_test/1.0/build/script.sh pre_build pre_build: line 1 @@ -951,9 +1003,11 @@ pre_build: line 2/stderr pre_build: line 3 pre_build: line 4/stderr pre_build: line 5 + Cleaning build area... done. Building module(s)... done. -${SIGNING_MESSAGE_noisy}Running the post_build script: +${SIGNING_MESSAGE_noisy} +Running the post_build script: /var/lib/dkms/dkms_noisy_test/1.0/build/script.sh post_build post_build: line 1 post_build: line 2/stderr @@ -961,6 +1015,8 @@ post_build: line 3 post_build: line 4/stderr post_build: line 5 Cleaning build area... done. + + Running the pre_install script: /var/lib/dkms/dkms_noisy_test/1.0/source/script.sh pre_install pre_install: line 1 @@ -969,6 +1025,7 @@ pre_install: line 3 pre_install: line 4/stderr pre_install: line 5 Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noisy_test.ko${mod_compression_ext} + Running the post_install script: /var/lib/dkms/dkms_noisy_test/1.0/source/script.sh post_install post_install: line 1 @@ -983,18 +1040,26 @@ patching file dkms_patches_test.c applying patch subdir/patch2.patch...patching file Makefile patching file dkms_patches_test.c done. + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE_patches}Cleaning build area... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_patches_test.ko${mod_compression_ext} Running depmod... done. -${SIGNING_PROLOGUE}Running the pre_build script: +${SIGNING_PROLOGUE} +Running the pre_build script: + Cleaning build area... done. Building module(s)... done. -${SIGNING_MESSAGE_scripts}Running the post_build script: +${SIGNING_MESSAGE_scripts} +Running the post_build script: Cleaning build area... done. + + Running the pre_install script: Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_scripts_test.ko${mod_compression_ext} + Running the post_install script: Running depmod... done. Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_noisy_test dkms_patches_test dkms_scripts_test. @@ -1012,6 +1077,7 @@ EOF echo ' Unbuilding the test modules' run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_patches_test -v 1.0 << EOF + Module dkms_patches_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_patches_test.ko${mod_compression_ext} @@ -1022,9 +1088,11 @@ dkms_patches_test/1.0: added EOF run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_scripts_test -v 1.0 << EOF + Module dkms_scripts_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_scripts_test.ko${mod_compression_ext} + Running the post_remove script: Running depmod... done. EOF @@ -1033,9 +1101,11 @@ dkms_scripts_test/1.0: added EOF run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_noisy_test -v 1.0 << EOF + Module dkms_noisy_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noisy_test.ko${mod_compression_ext} + Running the post_remove script: /var/lib/dkms/dkms_noisy_test/1.0/source/script.sh post_remove post_remove: line 1 @@ -1053,6 +1123,7 @@ echo ' Removing the test module with patches' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_patches_test -v 1.0 << EOF Module dkms_patches_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_patches_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_patches_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_patches_test' << EOF @@ -1062,6 +1133,7 @@ echo ' Removing the test module with pre/post scripts' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_scripts_test -v 1.0 << EOF Module dkms_scripts_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_scripts_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_scripts_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_scripts_test' << EOF @@ -1071,6 +1143,7 @@ echo ' Removing the noisy test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_noisy_test -v 1.0 << EOF Module dkms_noisy_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_noisy_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_noisy_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_noisy_test' << EOF @@ -1104,7 +1177,8 @@ EOF echo 'Building the noautoinstall test module' set_signing_message "dkms_noautoinstall_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_noautoinstall_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -1114,6 +1188,7 @@ EOF echo 'Installing the noautoinstall test module' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_noautoinstall_test -v 1.0 << EOF + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noautoinstall_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -1123,6 +1198,7 @@ EOF echo 'Uninstalling the noautoinstall test module' run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_noautoinstall_test -v 1.0 << EOF + Module dkms_noautoinstall_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noautoinstall_test.ko${mod_compression_ext} @@ -1148,6 +1224,7 @@ echo 'Removing the noautoinstall test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_noautoinstall_test -v 1.0 << EOF Module dkms_noautoinstall_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_noautoinstall_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_noautoinstall_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_noautoinstall_test' << EOF @@ -1170,6 +1247,7 @@ abspwd=$(readlink -f $(pwd)) echo 'Testing dkms add of source tree without dkms.conf (expected error)' run_with_expected_error 1 dkms add ${abspwd}/test/dkms_conf_test_no_conf << EOF + Error! Arguments and are not specified. Usage: add / or add -m / or @@ -1181,6 +1259,7 @@ run_with_expected_error 8 dkms add test/dkms_conf_test_empty << EOF dkms.conf: Error! No 'PACKAGE_NAME' directive specified. dkms.conf: Error! No 'PACKAGE_VERSION' directive specified. dkms.conf: Warning! Zero modules specified. + Error! Bad conf file. File: ${abspwd}/test/dkms_conf_test_empty/dkms.conf does not represent a valid dkms.conf file. EOF @@ -1195,6 +1274,7 @@ dkms.conf: Error! 'BUILT_MODULE_NAME' directive ends in '.o' or '.ko' in record dkms.conf: Error! No 'DEST_MODULE_LOCATION' directive specified for record #1. dkms.conf: Error! Directive 'DEST_MODULE_LOCATION' does not begin with '/kernel', '/updates', or '/extra' in record #1. + Error! Bad conf file. File: ${abspwd}/test/dkms_conf_test_invalid/dkms.conf does not represent a valid dkms.conf file. EOF @@ -1211,6 +1291,7 @@ dkms_conf_test/1.0: added EOF run_with_expected_output dkms remove --all -m dkms_conf_test -v 1.0 << EOF + Deleting module dkms_conf_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_conf_test' << EOF @@ -1220,9 +1301,11 @@ echo 'Testing add/build/install of a test module building zero kernel modules' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_conf_test -v 1.0 << EOF ${SIGNING_PROLOGUE}dkms.conf: Warning! Zero modules specified. Creating symlink /var/lib/dkms/dkms_conf_test/1.0/source -> /usr/src/dkms_conf_test-1.0 + Cleaning build area... done. Building module(s)... done. Cleaning build area... done. + Running depmod... done. EOF run_status_with_expected_output 'dkms_conf_test' << EOF @@ -1233,9 +1316,11 @@ EOF run_with_expected_output dkms remove --all -m dkms_conf_test -v 1.0 << EOF dkms.conf: Warning! Zero modules specified. dkms.conf: Warning! Zero modules specified. + Module dkms_conf_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Running depmod... done. + Deleting module dkms_conf_test/1.0 completely from the DKMS tree. EOF @@ -1252,7 +1337,8 @@ EOF echo 'Building test module without source (expected error)' run_with_expected_error 8 dkms build -k "${KERNEL_VER}" -m dkms_conf_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Error! The directory /var/lib/dkms/dkms_conf_test/1.0/source does not appear to have module source located within it. +${SIGNING_PROLOGUE} +Error! The directory /var/lib/dkms/dkms_conf_test/1.0/source does not appear to have module source located within it. Build halted. EOF run_status_with_expected_output 'dkms_conf_test' << EOF @@ -1260,6 +1346,7 @@ dkms_conf_test/1.0: added EOF run_with_expected_output dkms remove --all -m dkms_conf_test -v 1.0 << EOF + Deleting module dkms_conf_test/1.0 completely from the DKMS tree. EOF @@ -1276,7 +1363,8 @@ EOF echo ' Building test module with missing patch (expected error)' run_with_expected_error 5 dkms build -k "${KERNEL_VER}" -m dkms_conf_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Error! Patch missing.patch as specified in dkms.conf cannot be +${SIGNING_PROLOGUE} +Error! Patch missing.patch as specified in dkms.conf cannot be found in /var/lib/dkms/dkms_conf_test/1.0/build/patches/. EOF run_status_with_expected_output 'dkms_conf_test' << EOF @@ -1284,6 +1372,7 @@ dkms_conf_test/1.0: added EOF run_with_expected_output dkms remove --all -m dkms_conf_test -v 1.0 << EOF + Deleting module dkms_conf_test/1.0 completely from the DKMS tree. EOF @@ -1300,13 +1389,15 @@ EOF echo ' Building test module with bad patch path (expected error)' run_with_expected_error 5 dkms build -k "${KERNEL_VER}" -m dkms_conf_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Error! Patch ../badpath.patch as specified in dkms.conf contains '..' path component. +${SIGNING_PROLOGUE} +Error! Patch ../badpath.patch as specified in dkms.conf contains '..' path component. EOF run_status_with_expected_output 'dkms_conf_test' << EOF dkms_conf_test/1.0: added EOF run_with_expected_output dkms remove --all -m dkms_conf_test -v 1.0 << EOF + Deleting module dkms_conf_test/1.0 completely from the DKMS tree. EOF @@ -1323,13 +1414,15 @@ EOF echo ' Building test module with bad patch path (expected error)' run_with_expected_error 5 dkms build -k "${KERNEL_VER}" -m dkms_conf_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Error! Patch subdir/../badpath.patch as specified in dkms.conf contains '..' path component. +${SIGNING_PROLOGUE} +Error! Patch subdir/../badpath.patch as specified in dkms.conf contains '..' path component. EOF run_status_with_expected_output 'dkms_conf_test' << EOF dkms_conf_test/1.0: added EOF run_with_expected_output dkms remove --all -m dkms_conf_test -v 1.0 << EOF + Deleting module dkms_conf_test/1.0 completely from the DKMS tree. EOF @@ -1355,13 +1448,15 @@ else BUILD_MESSAGES="${SIGNING_MESSAGE}${SIGNING_MESSAGE}" fi run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_duplicate_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area...(bad exit status: 1) +${SIGNING_PROLOGUE} +Cleaning build area...(bad exit status: 1) Failed command: echo oops >&2 && false Building module(s)... done. ${BUILD_MESSAGES}Cleaning build area...(bad exit status: 1) Failed command: echo oops >&2 && false + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_duplicate_test.ko${mod_compression_ext} Module /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_duplicate_test.ko${mod_compression_ext} already installed (unversioned module), override by specifying --force Running depmod... done. @@ -1372,11 +1467,13 @@ EOF echo ' Removing the test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_duplicate_test -v 1.0 << EOF + Module dkms_duplicate_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_duplicate_test.ko${mod_compression_ext} Module dkms_duplicate_test.ko${mod_compression_ext} was not found within /lib/modules/${KERNEL_VER}/ Running depmod... done. + Deleting module dkms_duplicate_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_duplicate_test' << EOF @@ -1411,7 +1508,8 @@ EOF echo 'Building the multiver test modules' set_signing_message "dkms_multiver_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_multiver_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -1421,7 +1519,8 @@ dkms_multiver_test/2.0: added EOF set_signing_message "dkms_multiver_test" "2.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_multiver_test -v 2.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -1432,6 +1531,7 @@ EOF echo 'Installing the multiver test modules' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_multiver_test -v 1.0 << EOF + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_multiver_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -1440,6 +1540,7 @@ dkms_multiver_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built EOF run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_multiver_test -v 2.0 << EOF + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_multiver_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -1448,9 +1549,12 @@ dkms_multiver_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed EOF run_with_expected_error 6 dkms install -k "${KERNEL_VER}" -m dkms_multiver_test -v 1.0 << EOF + + Error! Module version 1.0 for dkms_multiver_test.ko${mod_compression_ext} is not newer than what is already found in kernel ${KERNEL_VER} (2.0). You may override by specifying --force. + Error! Installation aborted. EOF run_status_with_expected_output 'dkms_multiver_test' << EOF @@ -1467,6 +1571,7 @@ dkms_multiver_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed EOF run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_multiver_test -v 2.0 << EOF + Module dkms_multiver_test/2.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_multiver_test.ko${mod_compression_ext} @@ -1501,6 +1606,7 @@ echo 'Removing the multiver test modules' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_multiver_test -v 1.0 << EOF Module dkms_multiver_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_multiver_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_multiver_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_multiver_test' << EOF @@ -1509,6 +1615,7 @@ EOF run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_multiver_test -v 2.0 << EOF Module dkms_multiver_test/2.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_multiver_test/2.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_multiver_test/2.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_multiver_test' << EOF @@ -1542,7 +1649,8 @@ EOF echo 'Building the nover/emptyver test modules' set_signing_message "dkms_nover_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_nover_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -1551,7 +1659,8 @@ dkms_nover_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built EOF set_signing_message "dkms_emptyver_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_emptyver_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -1561,6 +1670,7 @@ EOF echo 'Installing the nover/emptyver test modules' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_nover_test -v 1.0 << EOF + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -1568,6 +1678,7 @@ run_status_with_expected_output 'dkms_nover_test' << EOF dkms_nover_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed EOF run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_emptyver_test -v 1.0 << EOF + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_emptyver_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -1577,6 +1688,7 @@ EOF echo 'Uninstalling the nover/emptyver test modules' run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_nover_test -v 1.0 << EOF + Module dkms_nover_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_test.ko${mod_compression_ext} @@ -1590,6 +1702,7 @@ if [[ -e "/lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_test.ko${mo exit 1 fi run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_emptyver_test -v 1.0 << EOF + Module dkms_emptyver_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_emptyver_test.ko${mod_compression_ext} @@ -1621,6 +1734,7 @@ echo 'Removing the nover/emptyver test modules' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_nover_test -v 1.0 << EOF Module dkms_nover_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_nover_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_nover_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_nover_test' << EOF @@ -1628,6 +1742,7 @@ EOF run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_emptyver_test -v 1.0 << EOF Module dkms_emptyver_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_emptyver_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_emptyver_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_emptyver_test' << EOF @@ -1647,9 +1762,11 @@ EOF echo 'Installing the nover update test 1.0 modules' set_signing_message "dkms_nover_update_test" "1.0" run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_nover_update_test -v 1.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -1670,9 +1787,11 @@ EOF echo 'Installing the nover update test 2.0 modules' set_signing_message "dkms_nover_update_test" "2.0" run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_nover_update_test -v 2.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} Running depmod... done. EOF @@ -1695,7 +1814,8 @@ EOF echo 'Building the nover update test 3.0 modules' set_signing_message "dkms_nover_update_test" "3.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_nover_update_test -v 3.0 << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. EOF @@ -1714,7 +1834,9 @@ else echo ' Installing the nover update test 3.0 modules (expected error)' set_signing_message "dkms_nover_update_test" "3.0" run_with_expected_error 6 dkms install -k "${KERNEL_VER}" -m dkms_nover_update_test -v 3.0 << EOF + Module /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} already installed (unversioned module), override by specifying --force + Error! Installation aborted. EOF run_status_with_expected_output 'dkms_nover_update_test' << EOF @@ -1727,17 +1849,21 @@ fi echo 'Removing the nover update test modules' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_nover_update_test -v 3.0 << EOF Module dkms_nover_update_test/3.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_nover_update_test/3.0 completely from the DKMS tree. EOF run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_nover_update_test -v 2.0 << EOF + Module dkms_nover_update_test/2.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} Running depmod... done. + Deleting module dkms_nover_update_test/2.0 completely from the DKMS tree. EOF run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_nover_update_test -v 1.0 << EOF Module dkms_nover_update_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_nover_update_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_nover_update_test' << EOF @@ -1761,13 +1887,16 @@ EOF check_module_source_tree_created /usr/src/dkms_failing_test-1.0 echo 'Running autoinstall with failing test module (expected error)' run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}" << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)...(bad exit status: 2) Failed command: make -j1 KERNELRELEASE=${KERNEL_VER} all + Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH}) Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information. Autoinstall on ${KERNEL_VER} failed for module(s) dkms_failing_test(10). + Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1779,14 +1908,17 @@ EOF check_module_source_tree_created /usr/src/dkms_dependencies_test-1.0 echo 'Running autoinstall with failing test module and test module with dependencies on the failing module (expected error)' run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}" << EOF -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)...(bad exit status: 2) Failed command: make -j1 KERNELRELEASE=${KERNEL_VER} all + Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH}) Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information. Autoinstall on ${KERNEL_VER} failed for module(s) dkms_failing_test(10). dkms_dependencies_test/1.0 autoinstall failed due to missing dependencies: dkms_failing_test. + Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1795,6 +1927,7 @@ echo 'Removing failing test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_failing_test -v 1.0 << EOF Module dkms_failing_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_failing_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_failing_test/1.0 completely from the DKMS tree. EOF @@ -1803,6 +1936,7 @@ remove_module_source_tree /usr/src/dkms_failing_test-1.0 echo 'Running autoinstall with test module with missing dependencies (expected error)' run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}" << EOF dkms_dependencies_test/1.0 autoinstall failed due to missing dependencies: dkms_failing_test. + Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1811,6 +1945,7 @@ echo 'Removing test module with dependencies' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_dependencies_test -v 1.0 << EOF Module dkms_dependencies_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_dependencies_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_dependencies_test/1.0 completely from the DKMS tree. EOF @@ -1874,9 +2009,11 @@ ${SIGNING_PROLOGUE}Warning: The /var/lib/dkms/dkms_build_exclusive_test/1.0/${KE for module dkms_build_exclusive_test/1.0 includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config. This indicates that it should not be built. -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. @@ -1891,6 +2028,7 @@ EOF echo 'Unbuilding the test module' run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF + Module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} @@ -1912,20 +2050,25 @@ ${SIGNING_PROLOGUE}Warning: The /var/lib/dkms/dkms_build_exclusive_test/1.0/${KE for module dkms_build_exclusive_test/1.0 includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config. This indicates that it should not be built. -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)...(bad exit status: 2) Failed command: make -j1 KERNELRELEASE=${KERNEL_VER} all + Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH}) Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information. -${SIGNING_PROLOGUE}Cleaning build area... done. +${SIGNING_PROLOGUE} +Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. Autoinstall on ${KERNEL_VER} was skipped for module(s) dkms_build_exclusive_test. Autoinstall on ${KERNEL_VER} failed for module(s) dkms_failing_test(10). + Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1934,6 +2077,7 @@ echo 'Removing failing test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_failing_test -v 1.0 << EOF Module dkms_failing_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_failing_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_failing_test/1.0 completely from the DKMS tree. EOF @@ -1941,10 +2085,12 @@ remove_module_source_tree /usr/src/dkms_failing_test-1.0 echo 'Removing the test module' run_with_expected_output dkms remove --all -m dkms_test -v 1.0 << EOF + Module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -1982,6 +2128,7 @@ EOF echo 'Removing the build-exclusive dependencies test module' run_with_expected_output dkms remove --all -m dkms_build_exclusive_dependencies_test -v 1.0 << EOF + Deleting module dkms_build_exclusive_dependencies_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_build_exclusive_dependencies_test' << EOF @@ -1991,6 +2138,7 @@ remove_module_source_tree /usr/src/dkms_build_exclusive_dependencies_test-1.0 echo 'Removing the build-exclusive test module' run_with_expected_output dkms remove --all -m dkms_build_exclusive_test -v 1.0 << EOF + Deleting module dkms_build_exclusive_test/1.0 completely from the DKMS tree. EOF run_status_with_expected_output 'dkms_build_exclusive_test' << EOF @@ -2030,6 +2178,7 @@ mv_osrelease "/usr/lib/os-release" "_usrlib-os-release" echo "Adding the dkms_test-1.0 module with no os-release files (expected error)" run_with_expected_error 4 dkms add test/dkms_test-1.0 << EOF + Error! System is missing os-release file. EOF @@ -2048,6 +2197,7 @@ echo 'Removing dkms_test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF Module dkms_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF @@ -2071,6 +2221,7 @@ echo 'Removing dkms_test module' run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF Module dkms_test/1.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... Module dkms_test/1.0 is not built for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF @@ -2106,6 +2257,7 @@ rm /var/lib/dkms/dkms_test/1.0/source echo 'Checking broken status' run_with_expected_output dkms status dkms_test/1.0 << EOF dkms_test/1.0: broken + Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! EOF @@ -2120,6 +2272,7 @@ rm /var/lib/dkms/dkms_test/1.0/source echo 'Building broken test module (expected error)' run_with_expected_error 4 dkms build dkms_test/1.0 << EOF + Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -2127,6 +2280,7 @@ EOF echo 'Installing broken test module (expected error)' run_with_expected_error 4 dkms install dkms_test/1.0 << EOF + Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -2134,6 +2288,7 @@ EOF echo 'Unbuild broken test module (expected error)' run_with_expected_error 4 dkms unbuild dkms_test/1.0 << EOF + Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -2141,6 +2296,7 @@ EOF echo 'Uninstall broken test module (expected error)' run_with_expected_error 4 dkms uninstall dkms_test/1.0 << EOF + Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -2156,12 +2312,14 @@ echo 'Checking broken status' run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: added dkms_test/1.0: broken + Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! EOF echo 'Remove broken test module (expected error)' run_with_expected_error 4 dkms remove dkms_test/1.0 << EOF + Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -2178,6 +2336,7 @@ echo 'Checking broken status' run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: added dkms_test/1.0: broken + Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! EOF @@ -2192,6 +2351,7 @@ echo 'Adding and building the test module by directory' set_signing_message "dkms_test" "1.0" run_with_expected_output dkms build test/dkms_test-1.0 -k "${KERNEL_VER}" << EOF ${SIGNING_PROLOGUE}Creating symlink /var/lib/dkms/dkms_test/1.0/source -> /usr/src/dkms_test-1.0 + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -2201,6 +2361,7 @@ echo 'Adding and building the multiver test module 1.0 by directory' set_signing_message "dkms_multiver_test" "1.0" run_with_expected_output dkms build test/dkms_multiver_test/1.0 -k "${KERNEL_VER}" << EOF ${SIGNING_PROLOGUE}Creating symlink /var/lib/dkms/dkms_multiver_test/1.0/source -> /usr/src/dkms_multiver_test-1.0 + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -2213,6 +2374,7 @@ echo 'Adding and building the multiver test module 2.0 by directory' set_signing_message "dkms_multiver_test" "2.0" run_with_expected_output dkms build test/dkms_multiver_test/2.0 -k "${KERNEL_VER}" << EOF ${SIGNING_PROLOGUE}Creating symlink /var/lib/dkms/dkms_multiver_test/2.0/source -> /usr/src/dkms_multiver_test-2.0 + Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -2220,14 +2382,17 @@ EOF echo 'Running dkms autoinstall' run_with_expected_output dkms autoinstall -k "${KERNEL_VER}" << EOF + Error! dkms_multiver_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! + Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. EOF run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: broken + Error! dkms_multiver_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built @@ -2237,16 +2402,19 @@ EOF echo 'Removing all modules' echo ' Removing the test module' run_with_expected_output dkms remove dkms_test/1.0 -k "${KERNEL_VER}" << EOF + Module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. + Deleting module dkms_test/1.0 completely from the DKMS tree. EOF echo ' Removing the multi_ver_test 2.0 module' run_with_expected_output dkms remove -m dkms_multiver_test -v 2.0 -k "${KERNEL_VER}" << EOF Module dkms_multiver_test/2.0 is not installed for kernel ${KERNEL_VER} (${KERNEL_ARCH}). Skipping... + Deleting module dkms_multiver_test/2.0 completely from the DKMS tree. EOF