python/machine: remove unused sock_dir argument

By using a socketpair for all of the sockets managed by the VM class and
its extensions, we don't need the sock_dir argument anymore, so remove
it.

We only added this argument so that we could specify a second, shorter
temporary directory for cases where the temp/log dirs were "too long" as
a socket name on macOS. We don't need it for this class now. In one
case, avocado testing takes over responsibility for creating an
appropriate sockdir.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230928044943.849073-7-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
John Snow 2023-09-28 00:49:43 -04:00
parent d396737813
commit 46d4747ab5
7 changed files with 9 additions and 31 deletions

View file

@ -247,7 +247,10 @@ class AST2x00Machine(QemuSystemTest):
image_path = self.fetch_asset(image_url, asset_hash=image_hash,
algorithm='sha256')
socket = os.path.join(self.vm.sock_dir, 'swtpm-socket')
# force creation of VM object, which also defines self._sd
vm = self.vm
socket = os.path.join(self._sd.name, 'swtpm-socket')
subprocess.run(['swtpm', 'socket', '-d', '--tpm2',
'--tpmstate', f'dir={self.vm.temp_dir}',