[libvirt] [PATCH] smartcard: spell ccid-card-emulated qemu property correctly

Reported by Anthony Messina in https://bugzilla.redhat.com/show_bug.cgi?id=904692 Present since introduction of smartcard support in commit f5fd9baa * src/qemu/qemu_command.c (qemuBuildCommandLine): Match qemu spelling. --- No one has spotted my bug, latent since Feb 2011, until now. I guess smartcard use is not very common... src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a0c278f..59a6061 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6843,7 +6843,7 @@ qemuBuildCommandLine(virConnectPtr conn, } else { database = VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE; } - virBufferAsprintf(&opt, ",database=%s", database); + virBufferAsprintf(&opt, ",db=%s", database); break; case VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH: -- 1.8.1.4

On Mon, Apr 01, 2013 at 04:57:00PM -0600, Eric Blake wrote:
Reported by Anthony Messina in https://bugzilla.redhat.com/show_bug.cgi?id=904692 Present since introduction of smartcard support in commit f5fd9baa
* src/qemu/qemu_command.c (qemuBuildCommandLine): Match qemu spelling. ---
No one has spotted my bug, latent since Feb 2011, until now. I guess smartcard use is not very common...
src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a0c278f..59a6061 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6843,7 +6843,7 @@ qemuBuildCommandLine(virConnectPtr conn, } else { database = VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE; } - virBufferAsprintf(&opt, ",database=%s", database); + virBufferAsprintf(&opt, ",db=%s", database); break;
case VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH:
ACK, Is a test case worthwhile ? It wouldn't have spotted this if the test case had had the same typo though Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 04/02/2013 04:10 AM, Daniel P. Berrange wrote:
On Mon, Apr 01, 2013 at 04:57:00PM -0600, Eric Blake wrote:
Reported by Anthony Messina in https://bugzilla.redhat.com/show_bug.cgi?id=904692 Present since introduction of smartcard support in commit f5fd9baa
} - virBufferAsprintf(&opt, ",database=%s", database); + virBufferAsprintf(&opt, ",db=%s", database); break;
case VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH:
ACK,
Is a test case worthwhile ? It wouldn't have spotted this if the test case had had the same typo though
Indeed, I failed to run 'make check' before submitting this, and we did have a test with the same typo. I'm squashing this in, then pushing. diff --git i/tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args w/tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args index 8b4be3a..b7b14c7 100644 --- i/tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args +++ w/tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args @@ -4,5 +4,5 @@ socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \ chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -device \ usb-ccid,id=ccid0 -usb -device \ ccid-card-emulated,backend=certificates,cert1=cert1,cert2=cert2,cert3=cert3\ -,database=/etc/pki/nssdb,id=smartcard0,bus=ccid0.0 -device \ +,db=/etc/pki/nssdb,id=smartcard0,bus=ccid0.0 -device \ virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel P. Berrange
-
Eric Blake