From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>
Subject: [Qemu-devel] [PATCH 6/9] libqtest: add IRQ intercept commands
Date: Thu, 15 Mar 2012 08:37:43 -0500 [thread overview]
Message-ID: <1331818666-31718-7-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1331818666-31718-1-git-send-email-aliguori@us.ibm.com>
From: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
tests/libqtest.c | 12 ++++++++++++
tests/libqtest.h | 6 ++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index dd07b07..1d1b06e 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -235,6 +235,18 @@ bool qtest_get_irq(QTestState *s, int num)
return s->irq_level[num];
}
+void qtest_irq_intercept_out(QTestState *s, const char *qom_path)
+{
+ qtest_sendf(s, "irq_intercept_out %s\n", qom_path);
+ qtest_rsp(s, 0);
+}
+
+void qtest_irq_intercept_in(QTestState *s, const char *qom_path)
+{
+ qtest_sendf(s, "irq_intercept_in %s\n", qom_path);
+ qtest_rsp(s, 0);
+}
+
static void qtest_out(QTestState *s, const char *cmd, uint16_t addr, uint32_t value)
{
qtest_sendf(s, "%s 0x%x 0x%x\n", cmd, addr, value);
diff --git a/tests/libqtest.h b/tests/libqtest.h
index dd82926..b5ca04e 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -26,6 +26,10 @@ void qtest_quit(QTestState *s);
bool qtest_get_irq(QTestState *s, int num);
+void qtest_irq_intercept_in(QTestState *s, const char *string);
+
+void qtest_irq_intercept_out(QTestState *s, const char *string);
+
void qtest_outb(QTestState *s, uint16_t addr, uint8_t value);
void qtest_outw(QTestState *s, uint16_t addr, uint16_t value);
@@ -51,6 +55,8 @@ void qtest_add_func(const char *str, void (*fn));
)
#define get_irq(num) qtest_get_irq(global_qtest, (num))
+#define irq_intercept_in(num) qtest_irq_intercept_in(global_qtest, (num))
+#define irq_intercept_out(num) qtest_irq_intercept_out(global_qtest, (num))
#define outb(addr, val) qtest_outb(global_qtest, (addr), (val))
#define outw(addr, val) qtest_outw(global_qtest, (addr), (val))
#define outl(addr, val) qtest_outl(global_qtest, (addr), (val))
--
1.7.5.4
next prev parent reply other threads:[~2012-03-15 13:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 13:37 [Qemu-devel] [PATCH 0/9] qtest: a testing framework for devices (v3) Anthony Liguori
2012-03-15 13:37 ` [Qemu-devel] [PATCH 1/9] w32: Support tests (make check) Anthony Liguori
2012-03-15 13:37 ` [Qemu-devel] [PATCH 2/9] qtest: add test framework (v3) Anthony Liguori
2012-03-15 13:37 ` [Qemu-devel] [PATCH 3/9] qtest: add C version of test infrastructure Anthony Liguori
2012-03-15 14:42 ` Stefan Hajnoczi
2012-03-15 14:58 ` Kevin Wolf
2012-03-15 15:04 ` Paolo Bonzini
2012-03-15 15:03 ` Anthony Liguori
2012-03-15 13:37 ` [Qemu-devel] [PATCH 4/9] make: add check targets based on gtester (v2) Anthony Liguori
2012-03-15 15:08 ` Paolo Bonzini
2012-03-15 13:37 ` [Qemu-devel] [PATCH 5/9] qtest: IRQ interception infrastructure (v2) Anthony Liguori
2012-03-15 13:37 ` Anthony Liguori [this message]
2012-03-15 13:37 ` [Qemu-devel] [PATCH 7/9] rtc: split out macros into a header file and use in test case Anthony Liguori
2012-03-15 13:37 ` [Qemu-devel] [PATCH 8/9] qtest: add rtc-test test-case (v3) Anthony Liguori
2012-03-15 13:37 ` [Qemu-devel] [PATCH 9/9] qtest: add clock management Anthony Liguori
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=1331818666-31718-7-git-send-email-aliguori@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--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).