diff --git a/tests/integration/image-install-upgrade.sh b/tests/integration/image-install-upgrade.sh index 70aab1558..0c347a6a8 100755 --- a/tests/integration/image-install-upgrade.sh +++ b/tests/integration/image-install-upgrade.sh @@ -201,11 +201,14 @@ ansible-playbook -v \ playbooks/check-system.yaml greenprint "Create upgrade Containerfile" -tee "$UPGRADE_CONTAINERFILE" > /dev/null << EOF +tee "$UPGRADE_CONTAINERFILE" > /dev/null << REALEOF FROM "$TEST_IMAGE_URL" RUN dnf -y install wget && \ dnf -y clean all +RUN cat <> /usr/lib/bootc/kargs.d/01-console.toml +kargs = ["systemd.unified_cgroup_hierarchy=0"] EOF +REALEOF greenprint "Build $TEST_OS upgrade container image" sudo podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$UPGRADE_CONTAINERFILE" . @@ -224,6 +227,32 @@ ansible-playbook -v \ -e bootc_image="$TEST_IMAGE_URL" \ -e image_label_version_id="$REDHAT_VERSION_ID" \ -e upgrade="true" \ + -e kargs="systemd.unified_cgroup_hierarchy=0" \ + playbooks/check-system.yaml + +greenprint "Create second upgrade Containerfile to test kargs delta" +tee "$UPGRADE_CONTAINERFILE" > /dev/null << REALEOF +FROM "$TEST_IMAGE_URL" +RUN dnf -y install wget && \ + dnf -y clean all +RUN cat <> /usr/lib/bootc/kargs.d/01-console.toml +kargs = ["systemd.unified_cgroup_hierarchy=1"] +EOF +REALEOF + +greenprint "Upgrade $TEST_OS system" +ansible-playbook -v \ + -i "$INVENTORY_FILE" \ + playbooks/upgrade.yaml + +greenprint "Run ostree checking test after upgrade on $PLATFORM instance" +ansible-playbook -v \ + -i "$INVENTORY_FILE" \ + -e test_os="$TEST_OS" \ + -e bootc_image="$TEST_IMAGE_URL" \ + -e image_label_version_id="$REDHAT_VERSION_ID" \ + -e upgrade="true" \ + -e kargs="systemd.unified_cgroup_hierarchy=1" \ playbooks/check-system.yaml greenprint "Rollback $TEST_OS system" diff --git a/tests/integration/install-upgrade.fmf b/tests/integration/install-upgrade.fmf index be8cc94d2..5ccbc12d8 100644 --- a/tests/integration/install-upgrade.fmf +++ b/tests/integration/install-upgrade.fmf @@ -12,8 +12,3 @@ summary: bootc install to-disk and upgrade test test: ./image-install-upgrade.sh duration: 90m - -/bootc-kargs: - summary: bootc kargs test - test: ./bootc-kargs.sh - duration: 90m diff --git a/tests/integration/playbooks/check-system.yaml b/tests/integration/playbooks/check-system.yaml index a04c6a7c1..50ee69b8d 100644 --- a/tests/integration/playbooks/check-system.yaml +++ b/tests/integration/playbooks/check-system.yaml @@ -455,13 +455,13 @@ # case: check karg - name: grep for kargs - when: kargs != '' shell: cat /proc/cmdline | grep $item with_items: "{{ kargs.split(',') }}" register: kargs_check # grep will exit with 1 when no results found. # This causes the task not to halt play. ignore_errors: true + when: kargs != '' - name: check if kargs exist block: @@ -477,7 +477,7 @@ - name: failed count + 1 set_fact: failed_counter: "{{ failed_counter | int + 1 }}" - when: karg != '' + when: kargs != '' # case: check reboot times - name: check reboot times