[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCHv3 08/11] tests: Clean up IO handling in ide-test
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCHv3 08/11] tests: Clean up IO handling in ide-test |
Date: |
Fri, 21 Oct 2016 10:49:55 +1100 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Thu, Oct 20, 2016 at 11:54:42AM +0200, Laurent Vivier wrote:
>
>
> On 20/10/2016 05:43, David Gibson wrote:
> > ide-test uses many explicit inb() / outb() operations for its IO, which
> > means it's not portable to non-x86 platforms. This cleans it up to use
> > the libqos PCI accessors instead.
> >
> > Signed-off-by: David Gibson <address@hidden>
> > ---
> > tests/ide-test.c | 181
> > ++++++++++++++++++++++++++++++++++++-------------------
> > 1 file changed, 119 insertions(+), 62 deletions(-)
> >
> > diff --git a/tests/ide-test.c b/tests/ide-test.c
> > index a8a4081..454fcf8 100644
> > --- a/tests/ide-test.c
> > +++ b/tests/ide-test.c
> ...
> > @@ -494,7 +523,7 @@ static void test_identify(void)
> > g_assert(ret == 0);
> >
> > /* Write cache enabled bit */
> > - assert_bit_set(buf[85], 0x20);
> > + assert_bit_set(le16_to_cpu(buf[85]), 0x20);
> >
> > ide_test_quit();
> > }
>
> This assert breaks the test on BE host.
>
> TEST: tests/ide-test... (pid=7945)
> /i386/ide/identify: **
> ERROR:/home/laurent/Projects/qemu/tests/ide-test.c:525:test_identify:
> assertion failed ((le16_to_cpu(buf[85])) & (0x20) == (0x20)):
> (0x00000000 == 0x00000020)
> FAIL
Bother. Yes, that's a leftover from when I was trying to treat the
identify block as a bytestream, rather than an array of 16-bit words.
Oh.. duh. I just realized I'm an idiot. I thought I'd tested these
by running the tests on the Power machine. But it turns out it was
installed LE, thus defeating the purpose.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PATCHv3 06/11] libqos: Add streaming accessors for PCI MMIO, (continued)
- [Qemu-ppc] [PATCHv3 06/11] libqos: Add streaming accessors for PCI MMIO, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 05/11] tests: Adjust tco-test to use qpci_legacy_iomap(), David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 10/11] tests: Use qpci_mem{read, write} in ivshmem-test, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 01/11] libqos: Give qvirtio_config_read*() consistent semantics, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 02/11] libqos: Handle PCI IO de-multiplexing in common code, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 04/11] libqos: Better handling of PCI legacy IO, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 09/11] libqos: Add 64-bit PCI IO accessors, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 08/11] tests: Clean up IO handling in ide-test, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 03/11] libqos: Move BAR assignment to common code, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 07/11] libqos: Implement mmio accessors in terms of mem{read, write}, David Gibson, 2016/10/19
- [Qemu-ppc] [PATCHv3 11/11] libqos: Change PCI accessors to take opaque BAR handle, David Gibson, 2016/10/19