send.sh 599 B

123456789101112131415161718192021222324
  1. # SPDX-License-Identifier: BSD-3-Clause
  2. source helpers.sh
  3. # assume this script is run from the test/ directory
  4. TPM2_COMMAND_FILE="${abs_srcdir}/test/integration/fixtures/get-capability-tpm-prop-fixed.bin"
  5. start_up
  6. if [ ! -f "${TPM2_COMMAND_FILE}" ]; then
  7. echo "No TPM2 command file, cannot run $0"
  8. exit 1
  9. fi
  10. # check default stdin(file fd)/stdout
  11. tpm2 send < "${TPM2_COMMAND_FILE}" > /dev/null
  12. # check default stdin(pipe fd) with output file
  13. cat ${TPM2_COMMAND_FILE} | tpm2 send -o /dev/null
  14. # check -o out and argument file input
  15. tpm2 send -o /dev/null "${TPM2_COMMAND_FILE}"
  16. exit 0