#!/bin/sh
# autopkgtest check: Check if the QAT engine is available for openssl
# (C) 2024 Canonical Ltd.
# Author: Hector Cao <hector.cao@canonical.com>
set -e
# run openssl benchmark with qatengine and verify that the engine QAT is enabled
# NB: in absence of QAT hardware, QAT engine will use software acceleration
# NB : output the stderr & stdout to file and check for QAT engine usage
openssl speed -seconds 1 -elapsed -engine qatengine -elapsed rsa2048 > $AUTOPKGTEST_ARTIFACTS/openssl_output.txt 2>&1
grep "Engine \"qatengine\" set" $AUTOPKGTEST_ARTIFACTS/openssl_output.txt
|