* [Qemu-devel] [PULL 0/2] hmp queue
@ 2017-12-14 12:48 Dr. David Alan Gilbert (git)
2017-12-14 12:48 ` [Qemu-devel] [PULL 1/2] hmp-commands: Remove the deprecated usb_add and usb_del Dr. David Alan Gilbert (git)
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2017-12-14 12:48 UTC (permalink / raw)
To: qemu-devel
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
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(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 1/2] hmp-commands: Remove the deprecated usb_add and usb_del
2017-12-14 12:48 [Qemu-devel] [PULL 0/2] hmp queue Dr. David Alan Gilbert (git)
@ 2017-12-14 12:48 ` Dr. David Alan Gilbert (git)
2017-12-14 12:48 ` [Qemu-devel] [PULL 2/2] tests: test-hmp: print command execution result Dr. David Alan Gilbert (git)
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2017-12-14 12:48 UTC (permalink / raw)
To: qemu-devel
From: Thomas Huth <thuth@redhat.com>
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.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1512073140-17672-1-git-send-email-thuth@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
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(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 4afd57cf5f..6d5ebdf6ab 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -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
{
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index e56dc3348a..11f7720d71 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -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[] = {
diff --git a/include/hw/usb.h b/include/hw/usb.h
index eb28655270..9dd9c6f0d9 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -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)
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index c083869fcf..31612caf10 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -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,
diff --git a/qemu-doc.texi b/qemu-doc.texi
index db2351c746..ee206b8cba 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -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)
diff --git a/vl.c b/vl.c
index 1ad1c04637..fc8bd9372f 100644
--- a/vl.c
+++ b/vl.c
@@ -1479,28 +1479,6 @@ done:
return 0;
}
-static int usb_device_del(const char *devname)
-{
- int bus_num, addr;
- const char *p;
-
- if (strstart(devname, "host:", &p)) {
- return -1;
- }
-
- if (!machine_usb(current_machine)) {
- return -1;
- }
-
- p = strchr(devname, '.');
- if (!p)
- return -1;
- bus_num = strtoul(devname, NULL, 0);
- addr = strtoul(p + 1, NULL, 0);
-
- return usb_device_delete_addr(bus_num, addr);
-}
-
static int usb_parse(const char *cmdline)
{
int r;
@@ -1511,28 +1489,6 @@ static int usb_parse(const char *cmdline)
return r;
}
-void hmp_usb_add(Monitor *mon, const QDict *qdict)
-{
- const char *devname = qdict_get_str(qdict, "devname");
-
- error_report("usb_add is deprecated, please use device_add instead");
-
- if (usb_device_add(devname) < 0) {
- error_report("could not add USB device '%s'", devname);
- }
-}
-
-void hmp_usb_del(Monitor *mon, const QDict *qdict)
-{
- const char *devname = qdict_get_str(qdict, "devname");
-
- error_report("usb_del is deprecated, please use device_del instead");
-
- if (usb_device_del(devname) < 0) {
- error_report("could not delete USB device '%s'", devname);
- }
-}
-
/***********************************************************/
/* machine registration */
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 2/2] tests: test-hmp: print command execution result
2017-12-14 12:48 [Qemu-devel] [PULL 0/2] hmp queue Dr. David Alan Gilbert (git)
2017-12-14 12:48 ` [Qemu-devel] [PULL 1/2] hmp-commands: Remove the deprecated usb_add and usb_del Dr. David Alan Gilbert (git)
@ 2017-12-14 12:48 ` Dr. David Alan Gilbert (git)
2017-12-14 16:39 ` [Qemu-devel] [PULL 0/2] hmp queue Peter Maydell
2017-12-14 16:56 ` no-reply
3 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2017-12-14 12:48 UTC (permalink / raw)
To: qemu-devel
From: Vadim Galitsyn <vadim.galitsyn@profitbricks.com>
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.
Signed-off-by: Vadim Galitsyn <vadim.galitsyn@profitbricks.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org
Message-Id: <20171023151310.6462-5-vadim.galitsyn@profitbricks.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
tests/test-hmp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/test-hmp.c b/tests/test-hmp.c
index 5677fbf775..5b7e447b6a 100644
--- a/tests/test-hmp.c
+++ b/tests/test-hmp.c
@@ -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);
}
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] hmp queue
2017-12-14 12:48 [Qemu-devel] [PULL 0/2] hmp queue Dr. David Alan Gilbert (git)
2017-12-14 12:48 ` [Qemu-devel] [PULL 1/2] hmp-commands: Remove the deprecated usb_add and usb_del Dr. David Alan Gilbert (git)
2017-12-14 12:48 ` [Qemu-devel] [PULL 2/2] tests: test-hmp: print command execution result Dr. David Alan Gilbert (git)
@ 2017-12-14 16:39 ` Peter Maydell
2017-12-14 16:56 ` no-reply
3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2017-12-14 16:39 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git); +Cc: QEMU Developers
On 14 December 2017 at 12:48, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> 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
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] hmp queue
2017-12-14 12:48 [Qemu-devel] [PULL 0/2] hmp queue Dr. David Alan Gilbert (git)
` (2 preceding siblings ...)
2017-12-14 16:39 ` [Qemu-devel] [PULL 0/2] hmp queue Peter Maydell
@ 2017-12-14 16:56 ` no-reply
3 siblings, 0 replies; 5+ messages in thread
From: no-reply @ 2017-12-14 16:56 UTC (permalink / raw)
To: dgilbert; +Cc: famz, qemu-devel
Hi,
This series failed build test on ppc host. Please find the details below.
Message-id: 20171214124817.2567-1-dgilbert@redhat.com
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/1513269392-23224-1-git-send-email-jianjay.zhou@huawei.com -> patchew/1513269392-23224-1-git-send-email-jianjay.zhou@huawei.com
- [tag update] patchew/20171214124817.2567-1-dgilbert@redhat.com -> patchew/20171214124817.2567-1-dgilbert@redhat.com
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 patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-15 0:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 12:48 [Qemu-devel] [PULL 0/2] hmp queue Dr. David Alan Gilbert (git)
2017-12-14 12:48 ` [Qemu-devel] [PULL 1/2] hmp-commands: Remove the deprecated usb_add and usb_del Dr. David Alan Gilbert (git)
2017-12-14 12:48 ` [Qemu-devel] [PULL 2/2] tests: test-hmp: print command execution result Dr. David Alan Gilbert (git)
2017-12-14 16:39 ` [Qemu-devel] [PULL 0/2] hmp queue Peter Maydell
2017-12-14 16:56 ` no-reply
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).