From: Paolo Bonzini <pbonzini@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>,
"Alastair D'Silva" <alastair@au1.ibm.com>,
qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>,
Alastair D'Silva <alastair@d-silva.org>
Subject: Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts
Date: Tue, 22 Nov 2016 18:24:10 +0100 [thread overview]
Message-ID: <3888651b-fd60-e827-a9f8-575a8f01be72@redhat.com> (raw)
In-Reply-To: <debe3f9c-d3ec-aad0-0424-7228bf60765b@kaod.org>
On 22/11/2016 18:22, Cédric Le Goater wrote:
>> +
>> + g_assert(words[1]); /* device */
>> + g_assert(words[2]); /* gpio list */
>> + g_assert(words[3]); /* gpio line in list */
>> + g_assert(words[4]); /* level */
>> + dev = DEVICE(object_resolve_path(words[1], NULL));
>> + if (!dev) {
>> + qtest_send_prefix(chr);
>> + qtest_send(chr, "FAIL Unknown device\n");
>> + return;
>> + }
>> +
>> + irq_num = atoi(words[3]);
>> + level = atoi(words[4]);
>> +
>> + QLIST_FOREACH(ngl, &dev->gpios, node) {
>> + if (strcmp(words[2], ngl->name) == 0 && ngl->num_in > irq_num) {
>> + irq = ngl->in[irq_num];
>> + }
>> + }
>> +
>> + if (irq == NULL) {
>> + qtest_send_prefix(chr);
>> + qtest_send(chr, "FAIL Unknown IRQ\n");
>> + return;
>> + }
>> +
>> + qemu_set_irq(irq, level);
This seems wrong. The IRQ should not be modifiable by the test.
Paolo
>> +
>> + qtest_send_prefix(chr);
>> + qtest_send(chr, "OK\n");
next prev parent reply other threads:[~2016-11-22 17:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 4:36 [Qemu-devel] [PATCH 0/4] Add support for the Epson RX8900 RTC to the aspeed board Alastair D'Silva
2016-11-17 4:36 ` [Qemu-devel] [PATCH 1/4] arm: Uniquely name imx25 I2C buses Alastair D'Silva
2016-11-17 7:50 ` Cédric Le Goater
2016-11-17 4:36 ` [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts Alastair D'Silva
2016-11-22 17:22 ` Cédric Le Goater
2016-11-22 17:24 ` Paolo Bonzini [this message]
2016-11-22 22:31 ` Alastair D'Silva
2016-11-22 22:39 ` Paolo Bonzini
2016-11-22 23:19 ` Alastair D'Silva
2016-11-23 9:43 ` Paolo Bonzini
2016-11-23 10:05 ` [Qemu-devel] [Qemu-arm] " Edgar E. Iglesias
2016-11-23 10:34 ` Paolo Bonzini
2016-11-17 4:36 ` [Qemu-devel] [PATCH 3/4] hw/timer: Add Epson RX8900 RTC support Alastair D'Silva
2016-11-17 8:29 ` Cédric Le Goater
2016-11-18 0:19 ` Alastair D'Silva
2016-11-18 8:52 ` Cédric Le Goater
2016-11-17 4:36 ` [Qemu-devel] [PATCH 4/4] arm: Add an RX8900 RTC to the ASpeed board Alastair D'Silva
2016-11-22 16:56 ` Cédric Le Goater
2016-11-23 0:46 ` Alastair D'Silva
2016-11-23 8:48 ` Cédric Le Goater
2016-11-24 0:15 ` Andrew Jeffery
2016-11-17 15:33 ` [Qemu-devel] [PATCH 0/4] Add support for the Epson RX8900 RTC to the aspeed board no-reply
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=3888651b-fd60-e827-a9f8-575a8f01be72@redhat.com \
--to=pbonzini@redhat.com \
--cc=alastair@au1.ibm.com \
--cc=alastair@d-silva.org \
--cc=andrew@aj.id.au \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.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).