1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
set -e
source helpers.sh
start_up
CRYPTO_PROFILE="RSA"
setup_fapi $CRYPTO_PROFILE
function cleanup {
tss2 delete --path=/
shut_down
}
trap cleanup EXIT
DATA_OUTPUT_FILE=$TEMP_DIR/output.file
tss2 provision
tss2 getinfo --info=$DATA_OUTPUT_FILE --force
if [ ! -s $DATA_OUTPUT_FILE ]
then
echo "File is empty"
exit 1
fi
expect <<EOF
# Try with missing info file
spawn tss2 getinfo
set ret [wait]
if {[lindex \$ret 2] || [lindex \$ret 3] != 1} {
Command has not failed as expected\n"
exit 1
}
EOF
exit 0
|