From e35345a446f26fea92ae916b47257fc0712b8670 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:25:36 +0200 Subject: tpm: T4919: Fix check for /dev/tpm0 --- scripts/check-qemu-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index e1fd45f1..d28cb48a 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -569,7 +569,7 @@ try: tpm_timeout = 600 # Give it 10 mins to encrypt # Verify TPM is loaded - c.sendline('ls /dev/tpm0') + c.sendline('find /dev -name tpm0') c.expect('/dev/tpm0') c.expect(op_mode_prompt) -- cgit v1.2.3 From d60f5222c264cdc426c5ea4ebba5107566900d22 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:20:09 +0200 Subject: tpm: T4919: Fix TPM test for changes in 7f23b57 --- scripts/check-qemu-install | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index d28cb48a..dfb772d8 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -360,11 +360,15 @@ if args.qemu_cmd: test_timeout = 3 *3600 # 3 hours (in seconds) tpm_process = None try: + # Start TPM emulator + if args.tpmtest: + tpm_process = start_swtpm() + ################################################# # Installing image to disk ################################################# log.info('Installing system') - cmd = get_qemu_cmd(qemu_name, args.uefi, args.disk, raid=diskname_raid, iso_img=args.iso, vnc_enabled=args.vnc, secure_boot=args.sbtest) + cmd = get_qemu_cmd(qemu_name, args.uefi, args.disk, raid=diskname_raid, tpm=args.tpmtest, iso_img=args.iso, vnc_enabled=args.vnc, secure_boot=args.sbtest) log.debug(f'Executing command: {cmd}') c = pexpect.spawn(cmd, logfile=stl, timeout=60) @@ -488,12 +492,6 @@ try: log.info('eject installation media') os.system(f'echo "eject -f drive-cd1" | socat - unix-connect:/tmp/qemu-monitor-socket-{args.disk}') - ################################################# - # Powering down installer - ################################################# - if args.tpmtest: - tpm_process = start_swtpm() - ################################################# # Booting installed system ################################################# @@ -608,21 +606,8 @@ try: c.sendline('exit') c.expect(op_mode_prompt) - # Shutdown VM - shutdownVM(c, log, 'Shutdown VM after TPM encryption') - - # Shutdown kills swtpm - tpm_process.join() - tpm_process.close() - - # Start emulator again - tpm_process = start_swtpm() - - # Booting back into VM - log.info('Booting TPM-backed system') - cmd = get_qemu_cmd(qemu_name, args.uefi, args.disk, raid=diskname_raid, tpm=args.tpmtest, vnc_enabled=args.vnc) - log.debug(f'Executing command: {cmd}') - c = pexpect.spawn(cmd, logfile=stl) + log.info('system installed, rebooting') + c.sendline('reboot now') try: c.expect('The highlighted entry will be executed automatically in', timeout=10) -- cgit v1.2.3 From 983e4ffd9779451510cb40acb4ef34e86dd56084 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:23:54 +0200 Subject: build: T861: Add socat as needed by commit 7f23b57 --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 576d1085..498dd69a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -87,7 +87,8 @@ RUN apt-get update && apt-get install -y \ gosu \ po4a \ openssh-client \ - jq + jq \ + socat # Packages needed for vyos-build RUN apt-get update && apt-get install -y \ -- cgit v1.2.3