From e26c2028b3e2aa02cc6c268a5ee59fca4c431ee2 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Wed, 5 Nov 2025 09:34:18 +0800 Subject: [PATCH] test: Fix OSCI gating failure Signed-off-by: Xiaofeng Wang --- hack/Containerfile.packit | 12 ++++++++++-- hack/packit-reboot.yml | 3 +++ hack/provision-packit.sh | 6 ++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/hack/Containerfile.packit b/hack/Containerfile.packit index a4c006efe..0b5c40c25 100644 --- a/hack/Containerfile.packit +++ b/hack/Containerfile.packit @@ -5,8 +5,6 @@ FROM quay.io/centos-bootc/centos-bootc:stream10 WORKDIR /bootc-test -# Some rhts-*, rstrnt-* and tmt-* commands are in /usr/local/bin -COPY bin /usr/local/bin # Save testing farm run files COPY ARTIFACTS /var/ARTIFACTS # Copy bootc repo @@ -19,8 +17,18 @@ set -xeuo pipefail if [[ $ID == "rhel" ]]; then cp rhel.repo /etc/yum.repos.d/ fi +# OSCI uses /var/lib/tmt/scripts to save tmt-* commands +# Fedora CI and Packit use /usr/local/bin +if [[ -d scripts ]]; then + mkdir -p /var/lib/tmt + cp -r scripts /var/lib/tmt/ +else + cp -r bin /usr/local +fi cp test-artifacts.repo /etc/yum.repos.d/ dnf -y update bootc +# Required by tmt avc checking after test +dnf -y install audit ./provision-derived.sh # For test-22-logically-bound-install diff --git a/hack/packit-reboot.yml b/hack/packit-reboot.yml index 9641a6237..431b83c79 100644 --- a/hack/packit-reboot.yml +++ b/hack/packit-reboot.yml @@ -7,6 +7,9 @@ tasks: - name: Reboot system to image mode reboot: + reboot_timeout: 1200 + connect_timeout: 30 + pre_reboot_delay: 15 - name: Wait for connection to become reachable/usable wait_for_connection: diff --git a/hack/provision-packit.sh b/hack/provision-packit.sh index b459067eb..9cf2eacc7 100755 --- a/hack/provision-packit.sh +++ b/hack/provision-packit.sh @@ -24,13 +24,15 @@ source /etc/os-release # Some rhts-*, rstrnt-* and tmt-* commands are in /usr/local/bin if [[ -d /var/lib/tmt/scripts ]]; then cp -r /var/lib/tmt/scripts "$BOOTC_TEMPDIR" + ls -al "${BOOTC_TEMPDIR}/scripts" else cp -r /usr/local/bin "$BOOTC_TEMPDIR" + ls -al "${BOOTC_TEMPDIR}/bin" fi # Get base image URL TEST_OS="${ID}-${VERSION_ID}" -BASE=$(cat os-image-map.json | jq --arg v "$TEST_OS" '.[$v]') +BASE=$(jq -r --arg v "$TEST_OS" '.[$v]' < os-image-map.json) if [[ "$ID" == "rhel" ]]; then # OSCI gating only @@ -78,7 +80,7 @@ ls -al /var/share/test-artifacts cp /etc/yum.repos.d/test-artifacts.repo "$BOOTC_TEMPDIR" # Let's check things in hack folder -ls -al "$BOOTC_TEMPDIR" "${BOOTC_TEMPDIR}/bin" +ls -al "$BOOTC_TEMPDIR" # Do not use just because it's only available on Fedora, not on CS and RHEL podman build --jobs=4 --from "$BASE" -v "$BOOTC_TEMPDIR":/bootc-test:z -t localhost/bootc-integration -f "${BOOTC_TEMPDIR}/Containerfile.packit" "$BOOTC_TEMPDIR"