qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] make check failures


From: Peter Maydell
Subject: Re: [Qemu-devel] make check failures
Date: Sun, 21 Apr 2013 14:07:20 +0100

On 21 April 2013 11:37, Blue Swirl <address@hidden> wrote:
> I'm getting this error for make check on an ARM host:
>
> GTESTER check-qtest-i386
> GTester: last random seed: R02Sb8a38f2b54abc70ad75be1aa6db12891
> **
> ERROR:/src/qemu/tests/i440fx-test.c:39:test_i440fx_defaults: assertion
> failed: (dev != NULL)

This is a bug in qtest.c. The test program sends the command
"outl" "0xcf8" "0x80000000"
qtest.c does
  value = strtol(words[2], NULL, 0);
and since this is a "long is 32 bits" platform strtol returns
0x7FFFFFFF (and sets errno to ERANGE, but we don't check that).
We then write the wrong value to the PCI config register. As it
happens bit 31 of this bit means "actually do stuff" so since
we haven't set it the following pci_host_data_read() call returns
-1 and this propagates up to the test program itself as a failure
to create the pci device, hence the assert.

The comment in qtest.c says "ADDR, SIZE, VALUE are all integers
parsed with strtoul()" so the fix is probably to make the code
do what the comment says it should... (Plus we should actually
check the errno from strtoul!)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]