#!/bin/bash## kola:## # This test pulls a container from a registry.## tags: "platform-independent needs-internet"## # This test doesn't make meaningful changes to the system and should## # be able to be combined with other tests.## exclusive: false## # Only run on fcos, as rhel does not support emulation## distros: fcos## # We ship the x86_64 on all non-x86_64 arches.## architectures: "! x86_64"## description: Verify the x86_64 qemu emulator works on non-x86_64 instances.# See https://github.com/coreos/fedora-coreos-tracker/issues/1237set -xeuo pipefail# shellcheck disable=SC1091. "$KOLA_EXT_DATA/commonlib.sh"container=$(get_fedora_container_ref)case "$(arch)" inaarch64|ppc64le|s390x)containerArch=$(podman run --arch=amd64 --rm "${container}" arch)if [ "$containerArch" != "x86_64" ]; thenfatal "Test failed: x86_64 qemu emulator failed to run"fiok "Test passed: x86_64 qemu emulator works on $(arch)" ;;*)# We shouldn't reach this pointfatal "No qemu-user-static support for $(arch)" ;;esac