hmp queue
[Qemu-devel] [PULL 2/2] tests: test-hmp: print command execution result
In reply to Dr. David Alan Gilbert (git)From: Vadim Galitsyn <[email protected]>
Provide HMP monitor command execution result as it would be seen by user who established an HMP monitor session.
Currently many commands may silently fail without any sign of that. This patch let this info to be printed once test is running in verbose mode.
For the future it might be useful to fail the test if command has failed, however it would require a bit of rework inside test engine itself.
A simple example of silent failure without reporting it would to add some non-existent HMP command into 'hmp_cmds' list. In this case test will report it successfully passed without error.
Message-Id: <[email protected]>
--- tests/test-hmp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
tests/test-hmp.c +5 -2
@@ -78,10 +78,13 @@ static void test_commands(void)int i;for (i =0 ; hmp_cmds[i] !=NULL ; i++) { + response =hmp ("%s" , hmp_cmds[i]);if (verbose) { -fprintf (stderr,"\t%s\n" , hmp_cmds[i]); +fprintf (stderr, +"\texecute HMP command: %s\n" +"\tresult : %s\n" , + hmp_cmds[i], response); } - response =hmp ("%s" , hmp_cmds[i]);g_free (response); }
Signature · 1 line
2.14.3
From: "Dr. David Alan Gilbert" <[email protected]>
The following changes since commit 0a0dc59d27527b78a195c2d838d28b7b49e5a639:
Update version for v2.11.0 release (2017-12-13 14:31:09 +0000)
are available in the Git repository at:
git://github.com/dagrh/qemu.git tags/pull-hmp-20171214
for you to fetch changes up to 0eaf3b824745cacebfc321aef6787528d33d58fe:
tests: test-hmp: print command execution result (2017-12-14 11:09:42 +0000)
----------------------------------------------------------------
HMP pull 2017-12-14
----------------------------------------------------------------
Thomas Huth (1):
hmp-commands: Remove the deprecated usb_add and usb_del
Vadim Galitsyn (1):
tests: test-hmp: print command execution result
hmp-commands.hx | 33 --------------------------------- hw/usb/bus.c | 22 ---------------------- include/hw/usb.h | 1 - include/sysemu/sysemu.h | 2 -- qemu-doc.texi | 8 -------- tests/test-hmp.c | 7 +++++-- vl.c | 44 -------------------------------------------- 7 files changed, 5 insertions(+), 112 deletions(-)
[Qemu-devel] [PULL 1/2] hmp-commands: Remove the deprecated usb_add and usb_del
From: Thomas Huth <[email protected]>
It's easy to use device_add and device_del as replacement instead. The usb_add and usb_del commands are deprecated since QEMU 2.10, and nobody complained that they are still needed, so let's get rid of them now to make the HMP interface a little bit less overloaded.
Message-Id: <[email protected]>
--- hmp-commands.hx | 33 --------------------------------- hw/usb/bus.c | 22 ---------------------- include/hw/usb.h | 1 - include/sysemu/sysemu.h | 2 -- qemu-doc.texi | 8 -------- vl.c | 44 -------------------------------------------- 6 files changed, 110 deletions(-)
hmp-commands.hx +0 -33
@@ -663,39 +663,6 @@ STEXI @item sum @var{addr} @var{size} @findex sum Compute the checksum of a memory region. -ETEXI - - { - .name = "usb_add", - .args_type = "devname:s", - .params = "device", - .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')", - .cmd = hmp_usb_add, - }, - -STEXI -@item usb_add @var{devname} -@findex usb_add -Add the USB device @var{devname}. This command is deprecated, please -use @code{device_add} instead. For details of available devices see -@ref{usb_devices} -ETEXI - - { - .name = "usb_del", - .args_type = "devname:s", - .params = "device", - .help = "remove USB device 'bus.addr'", - .cmd = hmp_usb_del, - }, - -STEXI -@item usb_del @var{devname} -@findex usb_del -Remove the USB device @var{devname} from the QEMU virtual USB -hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor -command @code{info usb} to see the devices you can remove. This -command is deprecated, please use @code{device_del} instead. ETEXI {
hw/usb/bus.c +0 -22
@@ -559,28 +559,6 @@ int usb_device_detach(USBDevice *dev)return 0 ; } -int usb_device_delete_addr (int busnr,int addr) -{ -USBBus *bus; -USBPort *port; -USBDevice *dev; - - bus =usb_bus_find (busnr); -if (!bus) -return -1 ; - - QTAILQ_FOREACH(port, &bus->used, next) { -if (port->dev->addr == addr) -break ; - } -if (!port) -return -1 ; - dev = port->dev; - -object_unparent (OBJECT (dev)); -return 0 ; -} -static const char *usb_speed (unsigned int speed) {static const char *txt[] = {
include/hw/usb.h +0 -1
@@ -549,7 +549,6 @@ void usb_claim_port(USBDevice *dev, Error **errp);void usb_release_port (USBDevice *dev);void usb_device_attach (USBDevice *dev,Error **errp);int usb_device_detach (USBDevice *dev); -int usb_device_delete_addr (int busnr,int addr);void usb_check_attach (USBDevice *dev,Error **errp);static inline USBBus *usb_bus_from_device (USBDevice *d)
include/sysemu/sysemu.h +0 -2
@@ -166,8 +166,6 @@ extern Chardev *serial_hds[MAX_SERIAL_PORTS];extern Chardev *parallel_hds[MAX_PARALLEL_PORTS ]; -void hmp_usb_add (Monitor *mon,const QDict *qdict); -void hmp_usb_del (Monitor *mon,const QDict *qdict);void hmp_info_usb (Monitor *mon,const QDict *qdict); void add_boot_device_path(int32_t bootindex, DeviceState *dev,
qemu-doc.texi +0 -8
@@ -2518,14 +2518,6 @@ The ``host_net_add'' command is replaced by the ``netdev_add'' command. The ``host_net_remove'' command is replaced by the ``netdev_del'' command. -@subsection usb_add (since 2.10.0) - -The ``usb_add'' command is replaced by the ``device_add'' command. - -@subsection usb_del (since 2.10.0) - -The ``usb_del'' command is replaced by the ``device_del'' command. - @section System emulator devices @subsection ivshmem (since 2.6.0)
vl.c +0 -44
56 lines not on this page · raw message
Signature · 1 line
2.14.3
Peter Maydell
AppliedQuoted 17 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
The following changes since commit
0a0dc59d27527b78a195c2d838d28b7b49e5a639:Update version for v2.11.0 release (2017-12-13 14:31:09 +0000)
are available in the Git repository at:
git://github.com/dagrh/qemu.gittags/pull-hmp-20171214for you to fetch changes up to
0eaf3b824745cacebfc321aef6787528d33d58fe:tests: test-hmp: print command execution result (2017-12-14 11:09:42 +0000)
----------------------------------------------------------------
HMP pull 2017-12-14
Quoted 7 lines
----------------------------------------------------------------
Thomas Huth (1):
hmp-commands: Remove the deprecatedusb_addandusb_delVadim Galitsyn (1):
tests: test-hmp: print command execution result
Applied, thanks.
-- PMM
This series failed build test on ppc host. Please find the details below.
Hi,
This series failed build test on ppc host. Please find the details below.
Message-id: [email protected]
Subject: [Qemu-devel] [PULL 0/2] hmp queue
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base"
# branch set -e echo "=== ENV ===" env echo "=== PACKAGES ===" rpm -qa echo "=== TEST BEGIN ===" INSTALL=$PWD/install BUILD=$PWD/build mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --prefix=$INSTALL make -j100 # XXX: we need reliable clean up # make check -j100 V=1 make install === TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
- [tag update] patchew/[email protected] -> patchew/[email protected]
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Submodule 'pixman' (git://anongit.freedesktop.org/pixman) registered for path 'pixman'
Submodule 'roms/SLOF' (git://git.qemu-project.org/SLOF.git) registered for path 'roms/SLOF'
Submodule 'roms/ipxe' (git://git.qemu-project.org/ipxe.git) registered for path 'roms/ipxe'
Submodule 'roms/openbios' (git://git.qemu-project.org/openbios.git) registered for path 'roms/openbios'
Submodule 'roms/openhackware' (git://git.qemu-project.org/openhackware.git) registered for path 'roms/openhackware' Submodule 'roms/qemu-palcode' (git://github.com/rth7680/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (git://git.qemu-project.org/seabios.git/) registered for path 'roms/seabios'
Submodule 'roms/sgabios' (git://git.qemu-project.org/sgabios.git) registered for path 'roms/sgabios'
Submodule 'roms/u-boot' (git://git.qemu-project.org/u-boot.git) registered for path 'roms/u-boot'
Submodule 'roms/vgabios' (git://git.qemu-project.org/vgabios.git/) registered for path 'roms/vgabios'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf'
Cloning into 'pixman'...
Submodule path 'pixman': checked out '87eea99e443b389c978cf37efc52788bf03a0ee0'
Cloning into 'roms/SLOF'...
Submodule path 'roms/SLOF': checked out 'e3d05727a074619fc12d0a67f05cf2c42c875cce'
Cloning into 'roms/ipxe'...
Submodule path 'roms/ipxe': checked out '04186319181298083ef28695a8309028b26fe83c'
Cloning into 'roms/openbios'...
Submodule path 'roms/openbios': checked out 'e79bca64838c96ec44fd7acd508879c5284233dd'
Cloning into 'roms/openhackware'...
Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5'
Cloning into 'roms/qemu-palcode'...
Submodule path 'roms/qemu-palcode': checked out 'c87a92639b28ac42bc8f6c67443543b405dc479b'
Cloning into 'roms/seabios'...
Submodule path 'roms/seabios': checked out 'e2fc41e24ee0ada60fc511d60b15a41b294538be'
Cloning into 'roms/sgabios'...
Submodule path 'roms/sgabios': checked out '23d474943dcd55d0550a3d20b3d30e9040a4f15b'
Cloning into 'roms/u-boot'...
Submodule path 'roms/u-boot': checked out '2072e7262965bb48d7fffb1e283101e6ed8b21a8'
Cloning into 'roms/vgabios'...
Submodule path 'roms/vgabios': checked out '19ea12c230ded95928ecaef0db47a82231c2e485'
warning: unable to rmdir pixman: Directory not empty
Switched to a new branch 'test'
M dtc
M roms/SLOF
M roms/ipxe
M roms/openbios
M roms/qemu-palcode
M roms/seabios
M roms/sgabios
M roms/u-boot
fatal: Not a valid branch point: '0ef0583d5adceb9138bdb47494dabd1549ac5b6d'.
Traceback (most recent call last):
File "/home/patchew/patchew/patchew-cli", line 508, in test_one
cwd=clone, stdout=logf, stderr=logf)
File "/usr/lib64/python3.4/subprocess.py", line 558, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'branch', 'base', '0ef0583d5adceb9138bdb47494dabd1549ac5b6d']' returned non-zero exit status 128
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]