diff --git a/containers/runner/README.md b/containers/runner/README.md index 3110f0a0..8a02d752 100644 --- a/containers/runner/README.md +++ b/containers/runner/README.md @@ -162,6 +162,6 @@ If you want to keep virtual machine of a finished test alive for further investi If you want to prevent killing virtual machine of a test on a failure detected in the log before the installation finishes (eg `Traceback` indicated in the log) it is possible to configure monitored messages in the [log monitor](/scripts/launcher/lib/log_monitor/log_handler.py) file. -You can run the tests in dry-run mode using `--dry-run` option. It can be used to see which tests would be actually run and the kickstarts with substitutions applied. +You can run the tests in dry-run mode using `--dry-run` option. It can be used to see which tests would be actually run and the kickstarts with substitutions applied. Or to get the list of packages composing the installer image. We are tracking the test suite issues and flakes in the repository issues. There is a [script](/scripts/classify-failures) to detect such known issues from test logs. diff --git a/scripts/probe_boot_iso.sh b/scripts/probe_boot_iso.sh index 912eeabf..234ff26d 100755 --- a/scripts/probe_boot_iso.sh +++ b/scripts/probe_boot_iso.sh @@ -38,20 +38,6 @@ fi IMAGE="$1" -# Fast path if ./discinfo is present (for Fedora); if it exists, it looks like this: -# 1587584254.021611 -# 32 -# x86_64 -DISCINFO_VER=$(isoinfo -R -x /.discinfo -i "$IMAGE" | sed -n '2 p') -if [ -n "$DISCINFO_VER" ]; then - # make sure it looks like a Fedora version name/number - if [ "$DISCINFO_VER" = "Rawhide" ] || [ $(echo $DISCINFO_VER | cut -d. -f1) -gt 30 ]; then - echo "NAME=Fedora" - echo "VERSION=$DISCINFO_VER" - exit 0 - fi -fi - # Probe boot.iso → install.img → stage 2 and dig out useful information from it. ISO_TMP=$(mktemp -d /tmp/kstest-iso.XXXXXXX) trap "rm -rf '$ISO_TMP'" EXIT INT QUIT PIPE @@ -72,23 +58,43 @@ fi # Extract files from stage2 OS_RELEASE=/etc/os-release ROOTFS=/LiveOS/rootfs.img +LORAX_PACKAGES=/root/lorax-packages.log -unsquashfs -no-xattrs -follow -no-progress -d "$ISO_TMP/stage2" "$ISO_TMP/install.img" $OS_RELEASE $ROOTFS +unsquashfs -no-xattrs -follow -no-progress -d "$ISO_TMP/stage2" "$ISO_TMP/install.img" $OS_RELEASE $ROOTFS $LORAX_PACKAGES rm "$ISO_TMP/install.img" chmod -R a+w $ISO_TMP # Extract required information from stage2 if [ -e "$ISO_TMP/stage2$OS_RELEASE" ]; then cp "$ISO_TMP/stage2$OS_RELEASE" "$ISO_TMP/os-release" + cp "$ISO_TMP/stage2$LORAX_PACKAGES" "$ISO_TMP/lorax-packages.log" else # On RHEL-8 and RHEL-9 the filesystem is packed in ext4 image (ENGCMP-766) timeout -k 10s 30s virt-cat -a "$ISO_TMP/stage2$ROOTFS" $OS_RELEASE > "$ISO_TMP/os-release" + timeout -k 10s 30s virt-cat -a "$ISO_TMP/stage2$ROOTFS" $LORAX_PACKAGES > "$ISO_TMP/lorax-packages.log" if [ $? -eq 124 ]; then echo "Error: virt-cat timed out" >&2 exit 4 fi fi +echo "PACKAGES=$(cat $ISO_TMP/lorax-packages.log | tr '\n' ' ')" + +# Fast path to get version if ./discinfo is present (for Fedora); if it exists, it looks like this: +# 1587584254.021611 +# 32 +# x86_64 +DISCINFO_VER=$(isoinfo -R -x /.discinfo -i "$IMAGE" | sed -n '2 p') +if [ -n "$DISCINFO_VER" ]; then + # make sure it looks like a Fedora version name/number + if [ "$DISCINFO_VER" = "Rawhide" ] || [ $(echo $DISCINFO_VER | cut -d. -f1) -gt 30 ]; then + echo "NAME=Fedora" + echo "VERSION=$DISCINFO_VER" + exit 0 + fi +fi + + # Return useful information to stdout echo "NAME=$(. "$ISO_TMP/os-release"; echo "$ID")" echo "VERSION=$(. "$ISO_TMP/os-release"; echo "$VERSION_ID")" diff --git a/scripts/run_kickstart_tests.sh b/scripts/run_kickstart_tests.sh index 22d522b8..be0708a8 100755 --- a/scripts/run_kickstart_tests.sh +++ b/scripts/run_kickstart_tests.sh @@ -182,7 +182,10 @@ ISO_OS_NAME=$(echo "${output}" | grep 'NAME=') ISO_OS_NAME="${ISO_OS_NAME##NAME=}" ISO_OS_VERSION=$(echo "${output}" | grep 'VERSION=') ISO_OS_VERSION="${ISO_OS_VERSION##VERSION=}" - +ISO_PACKAGES=$(echo "${output}" | grep 'PACKAGES=') +ISO_PACKAGES="${ISO_PACKAGES##PACKAGES=}" +echo Saving list of installer image packages to /var/tmp/kstest-image-packages.log +echo $ISO_PACKAGES | tr ' ' '\n' | tee /var/tmp/kstest-image-packages.log # Append sed args to substitute sed_args=" -e s#@KSTEST_OS_NAME@#${ISO_OS_NAME}# -e s#@KSTEST_OS_VERSION@#${ISO_OS_VERSION}#"