mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
tests: add test file for smartcard database
Add test case explicitly defining a smartcard host certificates database via the following xml: <smartcard mode='host-certificates'> <database>/tmp/foo</database> </smartcard> This case is not currently covered in the test suite. Signed-off-by: Anya Harter <aharter@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
d43cedcb8e
commit
22b7247d48
@ -0,0 +1,28 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-i686 \
|
||||
-name QEMUGuest1 \
|
||||
-S \
|
||||
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
|
||||
-m 214 \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
-nodefaults \
|
||||
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
|
||||
server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=control \
|
||||
-rtc base=utc \
|
||||
-no-shutdown \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device usb-ccid,id=ccid0,bus=usb.0,port=1 \
|
||||
-usb \
|
||||
-device ccid-card-emulated,backend=certificates,cert1=cert1,cert2=cert2,\
|
||||
cert3=cert3,db=/tmp/foo,id=smartcard0,bus=ccid0.0 \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
@ -0,0 +1,21 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory unit='KiB'>219136</memory>
|
||||
<currentMemory unit='KiB'>219136</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-i686</emulator>
|
||||
<smartcard mode='host-certificates'>
|
||||
<certificate>cert1</certificate>
|
||||
<certificate>cert2</certificate>
|
||||
<certificate>cert3</certificate>
|
||||
<database>/tmp/foo</database>
|
||||
</smartcard>
|
||||
<memballoon model='virtio'/>
|
||||
</devices>
|
||||
</domain>
|
@ -1404,6 +1404,8 @@ mymain(void)
|
||||
QEMU_CAPS_CCID_EMULATED);
|
||||
DO_TEST("smartcard-host-certificates",
|
||||
QEMU_CAPS_CCID_EMULATED);
|
||||
DO_TEST("smartcard-host-certificates-database",
|
||||
QEMU_CAPS_CCID_EMULATED);
|
||||
DO_TEST("smartcard-passthrough-tcp",
|
||||
QEMU_CAPS_CCID_PASSTHRU);
|
||||
DO_TEST("smartcard-passthrough-spicevmc",
|
||||
|
@ -0,0 +1,35 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory unit='KiB'>219136</memory>
|
||||
<currentMemory unit='KiB'>219136</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-i686</emulator>
|
||||
<controller type='usb' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<controller type='ccid' index='0'/>
|
||||
<smartcard mode='host-certificates'>
|
||||
<certificate>cert1</certificate>
|
||||
<certificate>cert2</certificate>
|
||||
<certificate>cert3</certificate>
|
||||
<database>/tmp/foo</database>
|
||||
<address type='ccid' controller='0' slot='0'/>
|
||||
</smartcard>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<memballoon model='virtio'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</memballoon>
|
||||
</devices>
|
||||
</domain>
|
@ -1163,6 +1163,7 @@ mymain(void)
|
||||
|
||||
DO_TEST("smartcard-host", NONE);
|
||||
DO_TEST("smartcard-host-certificates", NONE);
|
||||
DO_TEST("smartcard-host-certificates-database", NONE);
|
||||
DO_TEST("smartcard-passthrough-tcp", NONE);
|
||||
DO_TEST("smartcard-passthrough-spicevmc", NONE);
|
||||
DO_TEST("smartcard-controller", NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user