提交 44d32a0a 编写于 作者: P Peter Krempa

tests: qemuxml2argv: Modernize tpm-passthrough tests

XML->XML testing uses DO_TEST_CAPS_LATEST so use it also for the
XML->argv testing. Additionally use the same more modern machine type
in both tests.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 03a2235a
...@@ -8,25 +8,30 @@ XDG_CACHE_HOME=/tmp/lib/domain--1-TPM-VM/.cache \ ...@@ -8,25 +8,30 @@ XDG_CACHE_HOME=/tmp/lib/domain--1-TPM-VM/.cache \
XDG_CONFIG_HOME=/tmp/lib/domain--1-TPM-VM/.config \ XDG_CONFIG_HOME=/tmp/lib/domain--1-TPM-VM/.config \
QEMU_AUDIO_DRV=none \ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-x86_64 \ /usr/bin/qemu-system-x86_64 \
-name TPM-VM \ -name guest=TPM-VM,debug-threads=on \
-S \ -S \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
-machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \ -machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu64 \
-m 2048 \ -m 2048 \
-realtime mlock=off \ -overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \ -smp 1,sockets=1,cores=1,threads=1 \
-uuid 11d7cd22-da89-3094-6212-079a48a309a1 \ -uuid 11d7cd22-da89-3094-6212-079a48a309a1 \
-display none \ -display none \
-no-user-config \ -no-user-config \
-nodefaults \ -nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-TPM-VM/monitor.sock,\ -chardev socket,id=charmonitor,fd=1729,server,nowait \
server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \ -mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \ -rtc base=utc \
-no-shutdown \ -no-shutdown \
-boot menu=on \ -boot menu=on,strict=on \
-usb \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-tpmdev passthrough,id=tpm-tpm0,path=/dev/fdset/0,cancel-path=/dev/fdset/1 \ -tpmdev passthrough,id=tpm-tpm0,path=/dev/fdset/0,cancel-path=/dev/fdset/1 \
-add-fd set=0,fd=1730 \ -add-fd set=0,fd=1730 \
-add-fd set=1,fd=1731 \ -add-fd set=1,fd=1731 \
-device tpm-crb,tpmdev=tpm-tpm0,id=tpm0 \ -device tpm-crb,tpmdev=tpm-tpm0,id=tpm0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
...@@ -8,25 +8,30 @@ XDG_CACHE_HOME=/tmp/lib/domain--1-TPM-VM/.cache \ ...@@ -8,25 +8,30 @@ XDG_CACHE_HOME=/tmp/lib/domain--1-TPM-VM/.cache \
XDG_CONFIG_HOME=/tmp/lib/domain--1-TPM-VM/.config \ XDG_CONFIG_HOME=/tmp/lib/domain--1-TPM-VM/.config \
QEMU_AUDIO_DRV=none \ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-x86_64 \ /usr/bin/qemu-system-x86_64 \
-name TPM-VM \ -name guest=TPM-VM,debug-threads=on \
-S \ -S \
-machine pc-0.12,accel=tcg,usb=off,dump-guest-core=off \ -object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
-machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu64 \
-m 2048 \ -m 2048 \
-realtime mlock=off \ -overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \ -smp 1,sockets=1,cores=1,threads=1 \
-uuid 11d7cd22-da89-3094-6212-079a48a309a1 \ -uuid 11d7cd22-da89-3094-6212-079a48a309a1 \
-display none \ -display none \
-no-user-config \ -no-user-config \
-nodefaults \ -nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-TPM-VM/monitor.sock,\ -chardev socket,id=charmonitor,fd=1729,server,nowait \
server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \ -mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \ -rtc base=utc \
-no-shutdown \ -no-shutdown \
-boot menu=on \ -boot menu=on,strict=on \
-usb \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-tpmdev passthrough,id=tpm-tpm0,path=/dev/fdset/0,cancel-path=/dev/fdset/1 \ -tpmdev passthrough,id=tpm-tpm0,path=/dev/fdset/0,cancel-path=/dev/fdset/1 \
-add-fd set=0,fd=1730 \ -add-fd set=0,fd=1730 \
-add-fd set=1,fd=1731 \ -add-fd set=1,fd=1731 \
-device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 \ -device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<currentMemory unit='KiB'>512288</currentMemory> <currentMemory unit='KiB'>512288</currentMemory>
<vcpu placement='static'>1</vcpu> <vcpu placement='static'>1</vcpu>
<os> <os>
<type arch='x86_64' machine='pc-0.12'>hvm</type> <type arch='x86_64' machine='pc-i440fx-2.12'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
<bootmenu enable='yes'/> <bootmenu enable='yes'/>
</os> </os>
......
...@@ -2177,10 +2177,8 @@ mymain(void) ...@@ -2177,10 +2177,8 @@ mymain(void)
DO_TEST("ppce500-serial", DO_TEST("ppce500-serial",
QEMU_CAPS_KVM); QEMU_CAPS_KVM);
DO_TEST("tpm-passthrough", DO_TEST_CAPS_LATEST("tpm-passthrough");
QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_TIS); DO_TEST_CAPS_LATEST("tpm-passthrough-crb");
DO_TEST("tpm-passthrough-crb",
QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_CRB);
DO_TEST_PARSE_ERROR("tpm-no-backend-invalid", DO_TEST_PARSE_ERROR("tpm-no-backend-invalid",
QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_TIS); QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_TIS);
DO_TEST_CAPS_LATEST("tpm-emulator"); DO_TEST_CAPS_LATEST("tpm-emulator");
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<currentMemory unit='KiB'>512288</currentMemory> <currentMemory unit='KiB'>512288</currentMemory>
<vcpu placement='static'>1</vcpu> <vcpu placement='static'>1</vcpu>
<os> <os>
<type arch='x86_64' machine='pc-0.12'>hvm</type> <type arch='x86_64' machine='pc-i440fx-2.12'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
<bootmenu enable='yes'/> <bootmenu enable='yes'/>
</os> </os>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册