From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Lucas Meneghel Rodrigues" <lmr@redhat.com>,
"Jan Kiszka" <jan.kiszka@siemens.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] debugexit: support for custom exit port (LGPL VGA BIOS port 0x501)
Date: Fri, 05 Oct 2012 09:23:22 -0500 [thread overview]
Message-ID: <87mx01gfqd.fsf@codemonkey.ws> (raw)
In-Reply-To: <506EEB96.2070706@redhat.com>
Paolo Bonzini <pbonzini@redhat.com> writes:
> Il 05/10/2012 15:58, Anthony Liguori ha scritto:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>
>>> Il 05/10/2012 14:43, Jan Kiszka ha scritto:
>>>>>>>> This "| 1" might be the problem. Anthony, are you relying on it in
>>>>>>>> qemu-test and/or can you work out the changes if we use just
>>>>>>>> "exit(val)"?
>>>>>>
>>>>>> The reason for ' | 1' was to make sure that the guest couldn't trigger
>>>>>> an exit(0).
>>>>>>
>>>>>> If there's a compelling reason to drop '| 1', I can adjust my tests
>>>>>> accordingly.
>>>> assert(val); (or hw_error)
>>>> exit(val);
>>>>
>>>> I would suggest.
>>>
>>> I think what the kvm_unittests want is exactly to trigger an exit(0).
>>> Why did you rule it out?
>>
>> Mainly to differientiate between an open coded exit(0)/exit(1) and
>> something triggered by the unit test.
>>
>> The problem I tried to cope with was:
>>
>> anthony@titi:~/git/qemu$ grep 'exit([01])' hw/*.c | wc -l
>> 249
>
> Understood. The right solution is of course to fix hw/*.c.
I don't think it's an awful thing for test harnesses to just use a
reserved range of exit reasons.
Should be easy enough to change kvm-unittests, no?
Regards,
Anthony Liguori
>
> Let's start with exit(0).
>
> hw/eeprom93xx.c: exit(0); <--- should be hw_error
> hw/pci.c: exit(0); <--- move to qemu_show_nic_models
> hw/spapr.c: exit(0); <--- should be exit(1) !!
>
> For exit(1), many of them should become hw_error, especially those in
> this files:
>
> hw/bonito.c
> hw/ivshmem.c
> hw/lsi53c895a.c
> hw/pci.c
> hw/pl022.c
> hw/pl061.c
> hw/pl110.c
> hw/qxl.c
> hw/smbus.c
> hw/ssd0303.c
> hw/ssi-sd.c
> hw/stellaris_enet.c
> hw/virtio-blk.c
> hw/virtio.c
> hw/virtio-net.c
> hw/virtio-scsi.c
>
> Any takers?
>
> Paolo
next prev parent reply other threads:[~2012-10-05 14:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1349388419-21924-1-git-send-email-lmr@redhat.com>
[not found] ` <1349388419-21924-2-git-send-email-lmr@redhat.com>
[not found] ` <506E8C53.5050107@redhat.com>
[not found] ` <87ehldccsj.fsf@codemonkey.ws>
2012-10-05 12:43 ` [Qemu-devel] [PATCH 1/2] debugexit: support for custom exit port (LGPL VGA BIOS port 0x501) Jan Kiszka
2012-10-05 12:46 ` Paolo Bonzini
2012-10-05 13:10 ` Jan Kiszka
2012-10-05 13:58 ` Anthony Liguori
2012-10-05 14:15 ` Paolo Bonzini
2012-10-05 14:23 ` Anthony Liguori [this message]
2012-10-05 14:30 ` Paolo Bonzini
2012-10-05 16:09 ` Blue Swirl
2012-10-04 17:31 [Qemu-devel] [PATCH 0/2] Adding pc-testdev to qemu Lucas Meneghel Rodrigues
2012-10-04 17:31 ` [Qemu-devel] [PATCH 1/2] debugexit: support for custom exit port (LGPL VGA BIOS port 0x501) Lucas Meneghel Rodrigues
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=87mx01gfqd.fsf@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=hpoussin@reactos.org \
--cc=jan.kiszka@siemens.com \
--cc=lmr@redhat.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).