From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, lvivier@redhat.com, mreitz@redhat.com
Subject: [Qemu-devel] [PULL 01/13] tests/libqtest: Remove unused global_qtest-related wrapper functions
Date: Tue, 21 May 2019 12:53:32 +0200 [thread overview]
Message-ID: <20190521105344.11637-2-thuth@redhat.com> (raw)
In-Reply-To: <20190521105344.11637-1-thuth@redhat.com>
A bunch of the wrapper functions that use global_qtest are not used
anymore. Remove them to avoid that they are used in new code again.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20190510052239.21947-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/libqtest.c | 11 +----
tests/libqtest.h | 108 -----------------------------------------------
2 files changed, 1 insertion(+), 118 deletions(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index c49b85482d..8ac0c02af4 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -1038,15 +1038,6 @@ QDict *qmp(const char *fmt, ...)
return response;
}
-void qmp_send(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- qtest_qmp_vsend(global_qtest, fmt, ap);
- va_end(ap);
-}
-
char *hmp(const char *fmt, ...)
{
va_list ap;
@@ -1232,7 +1223,7 @@ void qtest_qmp_device_del(const char *id)
&got_event);
qobject_unref(rsp);
if (!got_event) {
- rsp = qmp_receive();
+ rsp = qtest_qmp_receive(global_qtest);
g_assert_cmpstr(qdict_get_try_str(rsp, "event"),
==, "DEVICE_DELETED");
qobject_unref(rsp);
diff --git a/tests/libqtest.h b/tests/libqtest.h
index a16acd58a6..3f7675fcf0 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -618,26 +618,6 @@ static inline void qtest_end(void)
*/
QDict *qmp(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
-/**
- * qmp_send:
- * @fmt...: QMP message to send to qemu, formatted like
- * qobject_from_jsonf_nofail(). See parse_escape() for what's
- * supported after '%'.
- *
- * Sends a QMP message to QEMU and leaves the response in the stream.
- */
-void qmp_send(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
-
-/**
- * qmp_receive:
- *
- * Reads a QMP message from QEMU and returns the response.
- */
-static inline QDict *qmp_receive(void)
-{
- return qtest_qmp_receive(global_qtest);
-}
-
/**
* qmp_eventwait:
* @s: #event event to wait for.
@@ -649,18 +629,6 @@ static inline void qmp_eventwait(const char *event)
return qtest_qmp_eventwait(global_qtest, event);
}
-/**
- * qmp_eventwait_ref:
- * @s: #event event to wait for.
- *
- * Continuously polls for QMP responses until it receives the desired event.
- * Returns a copy of the event for further investigation.
- */
-static inline QDict *qmp_eventwait_ref(const char *event)
-{
- return qtest_qmp_eventwait_ref(global_qtest, event);
-}
-
/**
* hmp:
* @fmt...: HMP command to send to QEMU, formats arguments like sprintf().
@@ -682,30 +650,6 @@ static inline bool get_irq(int num)
return qtest_get_irq(global_qtest, num);
}
-/**
- * irq_intercept_in:
- * @string: QOM path of a device.
- *
- * Associate qtest irqs with the GPIO-in pins of the device
- * whose path is specified by @string.
- */
-static inline void irq_intercept_in(const char *string)
-{
- qtest_irq_intercept_in(global_qtest, string);
-}
-
-/**
- * qtest_irq_intercept_out:
- * @string: QOM path of a device.
- *
- * Associate qtest irqs with the GPIO-out pins of the device
- * whose path is specified by @string.
- */
-static inline void irq_intercept_out(const char *string)
-{
- qtest_irq_intercept_out(global_qtest, string);
-}
-
/**
* outb:
* @addr: I/O port to write to.
@@ -894,19 +838,6 @@ static inline void memread(uint64_t addr, void *data, size_t size)
qtest_memread(global_qtest, addr, data, size);
}
-/**
- * bufread:
- * @addr: Guest address to read from.
- * @data: Pointer to where memory contents will be stored.
- * @size: Number of bytes to read.
- *
- * Read guest memory into a buffer, receive using a base64 encoding.
- */
-static inline void bufread(uint64_t addr, void *data, size_t size)
-{
- qtest_bufread(global_qtest, addr, data, size);
-}
-
/**
* memwrite:
* @addr: Guest address to write to.
@@ -920,32 +851,6 @@ static inline void memwrite(uint64_t addr, const void *data, size_t size)
qtest_memwrite(global_qtest, addr, data, size);
}
-/**
- * bufwrite:
- * @addr: Guest address to write to.
- * @data: Pointer to the bytes that will be written to guest memory.
- * @size: Number of bytes to write.
- *
- * Write a buffer to guest memory, transmit using a base64 encoding.
- */
-static inline void bufwrite(uint64_t addr, const void *data, size_t size)
-{
- qtest_bufwrite(global_qtest, addr, data, size);
-}
-
-/**
- * qmemset:
- * @addr: Guest address to write to.
- * @patt: Byte pattern to fill the guest memory region with.
- * @size: Number of bytes to write.
- *
- * Write a pattern to guest memory.
- */
-static inline void qmemset(uint64_t addr, uint8_t patt, size_t size)
-{
- qtest_memset(global_qtest, addr, patt, size);
-}
-
/**
* clock_step_next:
*
@@ -971,19 +876,6 @@ static inline int64_t clock_step(int64_t step)
return qtest_clock_step(global_qtest, step);
}
-/**
- * clock_set:
- * @val: Nanoseconds value to advance the clock to.
- *
- * Advance the QEMU_CLOCK_VIRTUAL to @val nanoseconds since the VM was launched.
- *
- * Returns: The current value of the QEMU_CLOCK_VIRTUAL in nanoseconds.
- */
-static inline int64_t clock_set(int64_t val)
-{
- return qtest_clock_set(global_qtest, val);
-}
-
QDict *qmp_fd_receive(int fd);
void qmp_fd_vsend(int fd, const char *fmt, va_list ap) GCC_FMT_ATTR(2, 0);
void qmp_fd_send(int fd, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
--
2.21.0
next prev parent reply other threads:[~2019-05-21 10:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 10:53 [Qemu-devel] [PULL 00/13] qtests and some iotest patches Thomas Huth
2019-05-21 10:53 ` Thomas Huth [this message]
2019-05-21 10:53 ` [Qemu-devel] [PULL 02/13] tests/libqtest: Fix description of qtest_vinitf() and qtest_initf() Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 03/13] tests/libqos: Get rid of global_qtest dependency in qvring_init() Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 04/13] tests/q35-test: Make test independent of global_qtest Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 05/13] tests/numa-test: Use qtest_init() instead of qtest_start() Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 06/13] tests/qom-test: " Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 07/13] tests/device-introspect: " Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 08/13] tests/hd-geo-test: " Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 09/13] tests/qemu-iotests/005: Add a sanity check for large sparse file support Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 10/13] tests/qemu-iotests/check: Pick a default machine if necessary Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 11/13] tests/qemu-iotests: Do not hard-code the path to bash Thomas Huth
2019-05-24 8:12 ` Ed Maste
2019-05-21 10:53 ` [Qemu-devel] [PULL 12/13] cirrus / travis: Add gnu-sed and bash for macOS and FreeBSD Thomas Huth
2019-05-21 10:53 ` [Qemu-devel] [PULL 13/13] tests/qemu-iotests: Remove the "_supported_os Linux" line from many tests Thomas Huth
2019-05-24 8:11 ` Ed Maste
2019-05-21 13:56 ` [Qemu-devel] [PULL 00/13] qtests and some iotest patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190521105344.11637-2-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=mreitz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).