From d259f65daa86f6e21502da3b2b59c3a07bfabc70 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Wed, 4 Sep 2024 12:17:44 -0700 Subject: [PATCH] ci: add kernel-crash-dumps checks and examples - Add an example kernel-crash-dumps section to the most-options.yaml example file and check the curthook is updated correctly. - Add a check in the autoinstall-simple case that asserts the default value for the kernel-crash-dumps curthook config. --- examples/autoinstall/most-options.yaml | 2 ++ scripts/runtests.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/examples/autoinstall/most-options.yaml b/examples/autoinstall/most-options.yaml index 5fa2055b9..34b0216c7 100644 --- a/examples/autoinstall/most-options.yaml +++ b/examples/autoinstall/most-options.yaml @@ -69,3 +69,5 @@ storage: - {type: format, fstype: ext4, volume: raid-system, preserve: false, id: format-system} - {type: mount, device: format-system, path: /, id: mount-system} - {type: mount, device: format-boot, path: /boot, id: mount-boot, options: 'errors=remount-ro'} +kernel-crash-dumps: + enabled: false diff --git a/scripts/runtests.sh b/scripts/runtests.sh index f20a95d5a..da282be31 100755 --- a/scripts/runtests.sh +++ b/scripts/runtests.sh @@ -171,6 +171,8 @@ python3 scripts/check-yaml-fields.py <(python3 scripts/check-yaml-fields.py $tmp timezone='"Pacific/Guam"' \ ubuntu_advantage.token='"C1NWcZTHLteJXGVMM6YhvHDpGrhyy7"' \ 'snap.commands=[snap install --channel=3.2/stable etcd]' +python3 scripts/check-yaml-fields.py "$tmpdir"/var/log/installer/curtin-install/subiquity-curthooks.conf \ + kernel-crash-dumps.enabled=false grep -q 'finish: subiquity/Install/install/postinstall/install_package1: SUCCESS: installing package1' \ $tmpdir/subiquity-server-debug.log grep -q 'finish: subiquity/Install/install/postinstall/install_package2: SUCCESS: installing package2' \ @@ -193,6 +195,8 @@ validate python3 scripts/check-yaml-fields.py "$tmpdir"/var/log/installer/autoinstall-user-data \ 'autoinstall.source.id="ubuntu-server-minimal"' grep -q 'finish: subiquity/Install/install/postinstall/run_unattended_upgrades: SUCCESS: downloading and installing security updates' $tmpdir/subiquity-server-debug.log +python3 scripts/check-yaml-fields.py "$tmpdir"/var/log/installer/curtin-install/subiquity-curthooks.conf \ + kernel-crash-dumps.enabled=null clean testname=autoinstall-hybrid