From 5ed3df55e385275d95945334ca7f75f5a00df60c Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 4 Nov 2026 10:05:50 -0700 Subject: [PATCH] further checks --- smoketest/lib/scenario.sh | 2 ++ smoketest/scenarios/10-fresh-install.sh | 2 +- smoketest/scenarios/11-refresh.sh | 2 +- smoketest/scenarios/20-noop-update.sh | 2 +- smoketest/scenarios/30-upgrade-from-baseline.sh | 2 +- smoketest/scenarios/31-update-replaces-itself.sh | 4 ++-- smoketest/scenarios/32-new-migration.sh | 2 +- smoketest/scenarios/40-failing-migration.sh | 2 +- smoketest/scenarios/41-failing-hook.sh | 2 +- smoketest/scenarios/42-upstream-unreachable.sh | 2 +- smoketest/scenarios/43-local-edits.sh | 2 +- smoketest/scenarios/44-low-disk.sh | 2 +- smoketest/scenarios/50-stale-system.sh | 2 +- smoketest/scenarios/51-skip-packages.sh | 2 +- smoketest/scenarios/52-siblings.sh | 2 +- utils.sh | 4 +++- 16 files changed, 20 insertions(+), 16 deletions(-) diff --git a/smoketest/lib/scenario.sh b/smoketest/lib/scenario.sh index 759fe91..aa934b4 100644 --- a/smoketest/lib/scenario.sh +++ b/smoketest/lib/scenario.sh @@ -124,6 +124,8 @@ cd_install() { } # cd_update [VAR=value...]: run update, with those variables set +# Scenarios pass the variables, e.g. 44-low-disk.sh +# shellcheck disable=SC2120 cd_update() { local vars="" var for var in "$@"; do diff --git a/smoketest/scenarios/10-fresh-install.sh b/smoketest/scenarios/10-fresh-install.sh index 609224f..58f7c14 100644 --- a/smoketest/scenarios/10-fresh-install.sh +++ b/smoketest/scenarios/10-fresh-install.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="install.sh on a fresh Arch + GNOME machine; saves the reference fingerprint" IMAGE=base -TIER=nightly +TIER="nightly" scenario() { cd_install diff --git a/smoketest/scenarios/11-refresh.sh b/smoketest/scenarios/11-refresh.sh index f0c641e..8d6f0f2 100644 --- a/smoketest/scenarios/11-refresh.sh +++ b/smoketest/scenarios/11-refresh.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="refresh (re-running install.sh) on an installed machine changes nothing" IMAGE=installed -TIER=pr +TIER="pr" scenario() { fingerprint "$SMOKETEST_RESULTS/before.fingerprint" diff --git a/smoketest/scenarios/20-noop-update.sh b/smoketest/scenarios/20-noop-update.sh index dd849b3..a0f150c 100644 --- a/smoketest/scenarios/20-noop-update.sh +++ b/smoketest/scenarios/20-noop-update.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="update with nothing new to do installs nothing and changes nothing" IMAGE=installed -TIER=pr +TIER="pr" # smoketest_prepare has already updated the machine to the commit under test scenario() { diff --git a/smoketest/scenarios/30-upgrade-from-baseline.sh b/smoketest/scenarios/30-upgrade-from-baseline.sh index 7010cad..d9ebbfc 100644 --- a/smoketest/scenarios/30-upgrade-from-baseline.sh +++ b/smoketest/scenarios/30-upgrade-from-baseline.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="install an older commit, update to the commit under test: same machine as a fresh install" IMAGE=base -TIER=nightly +TIER="nightly" mapfile -t VARIANTS < <(sed 's/#.*//' "$(dirname "${BASH_SOURCE[0]}")/../baselines" | awk 'NF { print $1 }') scenario() { diff --git a/smoketest/scenarios/31-update-replaces-itself.sh b/smoketest/scenarios/31-update-replaces-itself.sh index 821216d..d33f738 100644 --- a/smoketest/scenarios/31-update-replaces-itself.sh +++ b/smoketest/scenarios/31-update-replaces-itself.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="a release that changes update and adds a hook: the new update and hook run in the same update" IMAGE=installed -TIER=pr +TIER="pr" scenario() { upstream_commit "Change update and add a hook" ' @@ -14,6 +14,6 @@ scenario() { assert_status 0 assert_output "smoketest: the new update ran" assert_vm "the new hook ran" 'test -f ~/smoketest-hook-ran' - assert_vm "~/.local/bin/update is the new one" \ + assert_vm "the update in ~/.local/bin is the new one" \ 'cmp ~/.local/bin/update ~/.local/share/coredesktop/update' } diff --git a/smoketest/scenarios/32-new-migration.sh b/smoketest/scenarios/32-new-migration.sh index 2252bc7..3e90088 100644 --- a/smoketest/scenarios/32-new-migration.sh +++ b/smoketest/scenarios/32-new-migration.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="a release with a new migration: it runs once, and is recorded" IMAGE=installed -TIER=pr +TIER="pr" scenario() { upstream_commit "Add a migration" ' diff --git a/smoketest/scenarios/40-failing-migration.sh b/smoketest/scenarios/40-failing-migration.sh index 9ad9325..131b853 100644 --- a/smoketest/scenarios/40-failing-migration.sh +++ b/smoketest/scenarios/40-failing-migration.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="a failing migration stops later ones, fails the update, and runs again next time" IMAGE=installed -TIER=pr +TIER="pr" scenario() { # The first fails while ~/smoketest-block exists; the second must wait for it diff --git a/smoketest/scenarios/41-failing-hook.sh b/smoketest/scenarios/41-failing-hook.sh index 32747ce..99d2a0d 100644 --- a/smoketest/scenarios/41-failing-hook.sh +++ b/smoketest/scenarios/41-failing-hook.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="a failing update hook fails the update but not the hooks after it" IMAGE=installed -TIER=pr +TIER="pr" scenario() { upstream_commit "Add a failing hook" ' diff --git a/smoketest/scenarios/42-upstream-unreachable.sh b/smoketest/scenarios/42-upstream-unreachable.sh index db101b8..b931bd5 100644 --- a/smoketest/scenarios/42-upstream-unreachable.sh +++ b/smoketest/scenarios/42-upstream-unreachable.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="update when CoreDesktop's repo can't be reached runs the hooks on disk and reports it" IMAGE=installed -TIER=pr +TIER="pr" scenario() { assert_vm "take the upstream away" "sudo mv $UPSTREAM $UPSTREAM.away" diff --git a/smoketest/scenarios/43-local-edits.sh b/smoketest/scenarios/43-local-edits.sh index 165d32b..e2a54ce 100644 --- a/smoketest/scenarios/43-local-edits.sh +++ b/smoketest/scenarios/43-local-edits.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="local edits to the checkout: kept if upstream doesn't touch the file, reported if it does" IMAGE=installed -TIER=pr +TIER="pr" # Expanded in the VM, not here # shellcheck disable=SC2088 diff --git a/smoketest/scenarios/44-low-disk.sh b/smoketest/scenarios/44-low-disk.sh index aa3a394..b7602c3 100644 --- a/smoketest/scenarios/44-low-disk.sh +++ b/smoketest/scenarios/44-low-disk.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="update refuses to start with less than 10 GiB free, unless UPDATE_FORCE=1" IMAGE=installed -TIER=pr +TIER="pr" scenario() { # Leave 5 GiB free on / diff --git a/smoketest/scenarios/50-stale-system.sh b/smoketest/scenarios/50-stale-system.sh index fb132f0..c5d1f34 100644 --- a/smoketest/scenarios/50-stale-system.sh +++ b/smoketest/scenarios/50-stale-system.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="a machine a month behind on a stale mirror: update picks fresh mirrors, upgrades the kernel, asks for a reboot" IMAGE=installed -TIER=nightly +TIER="nightly" scenario() { local date kernel_before diff --git a/smoketest/scenarios/51-skip-packages.sh b/smoketest/scenarios/51-skip-packages.sh index dd77a19..09cfb24 100644 --- a/smoketest/scenarios/51-skip-packages.sh +++ b/smoketest/scenarios/51-skip-packages.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="update doesn't reinstall a package or Flatpak listed in skip-packages" IMAGE=installed -TIER=pr +TIER="pr" scenario() { assert_vm "remove Zoom and LibreOffice, and skip them" ' diff --git a/smoketest/scenarios/52-siblings.sh b/smoketest/scenarios/52-siblings.sh index af26ffa..3aabed4 100644 --- a/smoketest/scenarios/52-siblings.sh +++ b/smoketest/scenarios/52-siblings.sh @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 DESCRIPTION="update pulls a sibling project and runs its update.sh; a failing one is reported" IMAGE=installed -TIER=pr +TIER="pr" SIB="$SMOKETEST_VM_DIR/smoketest-sibling" diff --git a/utils.sh b/utils.sh index e630184..82ec9dc 100755 --- a/utils.sh +++ b/utils.sh @@ -202,7 +202,9 @@ initramfs_build_failed() { # pacman downloads from the first mirror in this list (system/mirrors.sh keeps # it fresh). Overridable for the tests. MIRRORLIST="${MIRRORLIST:-/etc/pacman.d/mirrorlist}" -# A mirror further behind Arch than this is stale; most sync every few hours +# A mirror further behind Arch than this is stale; most sync every few hours. +# Used by version and updates.d/10-pacman.sh. +# shellcheck disable=SC2034 MIRROR_STALE_HOURS=24 # The first mirror in MIRRORLIST, without its /$repo/os/$arch