From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxA3o-00084X-Id for qemu-devel@nongnu.org; Thu, 20 Oct 2016 05:54:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxA3l-0002lM-Hq for qemu-devel@nongnu.org; Thu, 20 Oct 2016 05:54:52 -0400 References: <1476934994-5515-1-git-send-email-david@gibson.dropbear.id.au> <1476934994-5515-9-git-send-email-david@gibson.dropbear.id.au> From: Laurent Vivier Message-ID: Date: Thu, 20 Oct 2016 11:54:42 +0200 MIME-Version: 1.0 In-Reply-To: <1476934994-5515-9-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv3 08/11] tests: Clean up IO handling in ide-test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , pbonzini@redhat.com, qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, agraf@suse.de, stefanha@redhat.com, mst@redhat.com, aik@ozlabs.ru, mdroth@linux.vnet.ibm.com, groug@kaod.org, thuth@redhat.com 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 > --- > 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 Thanks, Laurent