Re: [libvirt] [PATCH 3/3] tests: add test case for -serial option for ppce500

2014-05-26 Thread Ján Tomko
On 05/22/2014 12:55 PM, Olivia Yin wrote:
 ---
  .../qemuxml2argv-ppce500-serial.args   |  7 ++
  .../qemuxml2argv-ppce500-serial.xml| 26 
 ++
  tests/qemuxml2argvtest.c   |  1 +
  3 files changed, 34 insertions(+)
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.xml
 

This test passes even without applying the previous patches...

 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
 index 1ea7bf8..b2aa22a 100644
 --- a/tests/qemuxml2argvtest.c
 +++ b/tests/qemuxml2argvtest.c
 @@ -1279,6 +1279,7 @@ mymain(void)
  QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
  
  DO_TEST(ppc-dtb, QEMU_CAPS_KVM, QEMU_CAPS_DTB);
 +DO_TEST(ppce500-serial, QEMU_CAPS_KVM, QEMU_CAPS_DRIVE, 
 QEMU_CAPS_CHARDEV);

... because the QEMU_CAPS_DEVICE capability is missing.

  
  DO_TEST(tpm-passthrough, QEMU_CAPS_DEVICE,
  QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_TIS);
 

Jan



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/3] tests: add test case for -serial option for ppce500

2014-05-26 Thread hong-hua....@freescale.com
Hi Jan,

You're right. It should be QEMU_CAPS_DEVICE other than QEMU_CAPS_DRIVE.

Best Regards,
Olivia

 -Original Message-
 From: Ján Tomko [mailto:jto...@redhat.com]
 Sent: Monday, May 26, 2014 7:37 PM
 To: Yin Olivia-R63875; libvir-list@redhat.com
 Subject: Re: [libvirt] [PATCH 3/3] tests: add test case for -serial option
 for ppce500
 
 On 05/22/2014 12:55 PM, Olivia Yin wrote:
  ---
   .../qemuxml2argv-ppce500-serial.args   |  7 ++
   .../qemuxml2argv-ppce500-serial.xml| 26
 ++
   tests/qemuxml2argvtest.c   |  1 +
   3 files changed, 34 insertions(+)
   create mode 100644
  tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args
   create mode 100644
  tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.xml
 
 
 This test passes even without applying the previous patches...
 
  diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index
  1ea7bf8..b2aa22a 100644
  --- a/tests/qemuxml2argvtest.c
  +++ b/tests/qemuxml2argvtest.c
  @@ -1279,6 +1279,7 @@ mymain(void)
   QEMU_CAPS_DEVICE_VIRTIO_RNG,
  QEMU_CAPS_OBJECT_RNG_RANDOM);
 
   DO_TEST(ppc-dtb, QEMU_CAPS_KVM, QEMU_CAPS_DTB);
  +DO_TEST(ppce500-serial, QEMU_CAPS_KVM, QEMU_CAPS_DRIVE,
  + QEMU_CAPS_CHARDEV);
 
 ... because the QEMU_CAPS_DEVICE capability is missing.
 
 
   DO_TEST(tpm-passthrough, QEMU_CAPS_DEVICE,
   QEMU_CAPS_DEVICE_TPM_PASSTHROUGH,
  QEMU_CAPS_DEVICE_TPM_TIS);
 
 
 Jan


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 3/3] tests: add test case for -serial option for ppce500

2014-05-22 Thread Olivia Yin
---
 .../qemuxml2argv-ppce500-serial.args   |  7 ++
 .../qemuxml2argv-ppce500-serial.xml| 26 ++
 tests/qemuxml2argvtest.c   |  1 +
 3 files changed, 34 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args 
b/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args
new file mode 100644
index 000..c7b4819
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args
@@ -0,0 +1,7 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-ppc -S -M ppce500 -m 256 -smp 1 -nographic \
+-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \
+-kernel /media/ram/uImage -initrd /media/ram/ramdisk \
+-append 'root=/dev/ram rw console=ttyS0,115200' \
+-usb -net none -serial pty -parallel none
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.xml 
b/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.xml
new file mode 100644
index 000..397aadc
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.xml
@@ -0,0 +1,26 @@
+domain type='kvm'
+  nameQEMUGuest1/name
+  memory unit='KiB'262144/memory
+  currentMemory unit='KiB'262144/currentMemory
+  vcpu placement='static'1/vcpu
+  os
+type arch='ppc' machine='ppce500'hvm/type
+kernel/media/ram/uImage/kernel
+initrd/media/ram/ramdisk/initrd
+cmdlineroot=/dev/ram rw console=ttyS0,115200/cmdline
+  /os
+  clock offset='utc'/
+  on_poweroffdestroy/on_poweroff
+  on_rebootrestart/on_reboot
+  on_crashdestroy/on_crash
+  devices
+emulator/usr/bin/qemu-system-ppc/emulator
+serial type='pty'
+  target port='0'/
+/serial
+console type='pty'
+  target type='serial' port='0'/
+/console
+memballoon model='virtio'/
+  /devices
+/domain
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 1ea7bf8..b2aa22a 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1279,6 +1279,7 @@ mymain(void)
 QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
 
 DO_TEST(ppc-dtb, QEMU_CAPS_KVM, QEMU_CAPS_DTB);
+DO_TEST(ppce500-serial, QEMU_CAPS_KVM, QEMU_CAPS_DRIVE, 
QEMU_CAPS_CHARDEV);
 
 DO_TEST(tpm-passthrough, QEMU_CAPS_DEVICE,
 QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_TIS);
-- 
1.8.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list