#!/bin/bash
## kola:
##   exclusive: false

set -xeuo pipefail

. $KOLA_EXT_DATA/commonlib.sh

# https://bugzilla.redhat.com/show_bug.cgi?id=1830280
case "$(arch)" in
    x86_64)
        config=$(grep ^CONFIG_RANDOM_TRUST_CPU /lib/modules/$(uname -r)/config)
        if [ "$config" != "CONFIG_RANDOM_TRUST_CPU=y" ]; then
            fatal "Error: Failed to find crng trusting CPU"
        fi
        ok "random trust cpu" ;;
    *) echo "Don't know how to test hardware RNG state on arch=$(arch)" ;;
esac
