@@ -227,11 +227,11 @@ def test_arm_ast2600_evb_buildroot_tpm(self):
image_path = self.ASSET_BR2_202302_AST2600_TPM_FLASH.fetch()
- socket_dir = tempfile.TemporaryDirectory(prefix="qemu_")
- socket = os.path.join(socket_dir.name, 'swtpm-socket')
+ tpmstate_dir = tempfile.TemporaryDirectory(prefix="qemu_")
+ socket = os.path.join(tpmstate_dir.name, 'swtpm-socket')
subprocess.run(['swtpm', 'socket', '-d', '--tpm2',
- '--tpmstate', f'dir={self.vm.temp_dir}',
+ '--tpmstate', f'dir={tpmstate_dir.name}',
'--ctrl', f'type=unixio,path={socket}'])
self.vm.add_args('-chardev', f'socket,id=chrtpm,path={socket}')