Re: [PATCH v1] selftest/trustedkeys: TPM 1.2 trusted keys test

From: Jarkko Sakkinen
Date: Tue Oct 29 2019 - 07:45:59 EST


On Tue, Oct 29, 2019 at 11:25:16AM +0200, Jarkko Sakkinen wrote:
> I'll anyway try to setup user space with TrouSerS so that I can try
> it out. BuildRoot has recipe for that but not for IBM TSS 2.0 so I'll
> skip that and use my own test script for TPM2 trusted keys.

Busybox version of mktemp gives this error message:

mktemp: Invalid argument

I get that three times.

Then I get non-existent directory error from line 65 but it is probably
consequence of the previous errors.

This the help for mktemp:

"
Usage: mktemp [-dt] [-p DIR] [TEMPLATE]

Create a temporary file with name based on TEMPLATE and print its name.
TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).
Without TEMPLATE, -t tmp.XXXXXX is assumed.

-d Make directory, not file
-q Fail silently on errors
-t Prepend base directory name to TEMPLATE
-p DIR Use DIR as a base directory (implies -t)
-u Do not create anything; print a name

Base directory is: -p DIR, else $TMPDIR, else /tmp
"

Use total six X's seems to fix the problem.

/Jarkko