/
githubmirror
/
libtpms
Обзор
Документация
Войти
/
githubmirror
/
libtpms
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/tpm2_setprofile.sh
38 строк
595 B
Stefan Berger
tests: Add test case for TPMLIB_SetProfile()
15 июл 2024, 18:51
15 июл 2024, 18:51
bda4571
Код
Авторство
О чём код?
#!/usr/bin/env bash # For the license, see the LICENSE file in the root directory. ROOT=${abs_top_builddir:-$(pwd)/..} TESTDIR=${abs_top_testdir:-$(dirname "$0")} DIR=${PWD} WORKDIR=$(mktemp -d) . "${TESTDIR}/common" function cleanup() { rm -rf "${WORKDIR}" } trap "cleanup" QUIT EXIT pushd "$WORKDIR" &>/dev/null || exit 1 "${DIR}/tpm2_setprofile" rc=$? if ! fs=$(get_filesize NVChip); then exit 1 fi exp=176832 if [ "$fs" -ne "$exp" ]; then echo "Error: Unexpected size of NVChip file." echo "Expected: $exp" echo "Got : $fs" rc=1 fi popd &>/dev/null || exit 1 exit "$rc"