qemu: Ensure tmpdir is allocated for swtpm
FCOS pipeline is seeing `swtpm/` directory in the working dir:
I didn't reproduce but this should fix it.
@@ -988,6 +988,10 @@ func (builder *QemuBuilder) Exec() (*QemuInstance, error) {
// Handle Software TPM
if builder.Swtpm && builder.supportsSwtpm() {
+ err = builder.ensureTempdir()
+ if err != nil {
+ return nil, err
+ }
swtpmSock := filepath.Join(builder.tempdir, "swtpm-sock")
swtpmdir := filepath.Join(builder.tempdir, "swtpm")
if err := os.Mkdir(swtpmdir, 0755); err != nil {
