Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QemuHCK: Ensure to kill swtpm #292

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/setupmanagers/qemuhck/devices/tpm-tis.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"-device tpm-tis,tpmdev=tpm0"
],
"define_variables": {
"@tpm_pid@": "@workspace@/swtpm_@run_id@_@[email protected]",
"@tpm_state_dir@": "@workspace@/swtpm_state_@run_id@_@client_id@",
"@tpm_socket@": "/tmp/swtpm_@run_id@_@client_id@_sock"
},
Expand All @@ -15,6 +16,9 @@
],
"pre_start_commands": [
"rm -f @tpm_socket@",
"swtpm socket --daemon --tpm2 --tpmstate dir=@tpm_state_dir@ --ctrl type=unixio,path=@tpm_socket@ --log file=@tpm_state_dir@/swtpm.log,level=20"
"swtpm socket --daemon --pid file=@tpm_pid@ --tpm2 --tpmstate dir=@tpm_state_dir@ --ctrl type=unixio,path=@tpm_socket@ --log file=@tpm_state_dir@/swtpm.log,level=20"
],
"post_stop_commands": [
"kill $(cat @tpm_pid@) || true"
]
}
Loading