mbox series

[0/2] configure: Fix make check-tcg for ppc64le

Message ID 20190501223819.8584-1-richard.henderson@linaro.org
Headers show
Series configure: Fix make check-tcg for ppc64le | expand

Message

Richard Henderson May 1, 2019, 10:38 p.m. UTC
At present make check-tcg will produce errors like

  RUN     tests for ppc64
  TEST    test-mmap (default) on ppc64
test-mmap: Invalid ELF image for this architecture
make[2]: *** [run-test-mmap] Error 255
make[1]: *** [run-guest-tests] Error 2
make: *** [run-tcg-tests-ppc64-linux-user] Error 2

which is caused by the use of the host ppc64le compiler
in building guest ppc64(be) executables.


r~


Richard Henderson (2):
  configure: Distinguish ppc64 and ppc64le hosts
  configure: Use quotes around uses of $CPU_CFLAGS

 configure | 54 ++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 34 insertions(+), 20 deletions(-)

-- 
2.17.1

Comments

David Gibson May 2, 2019, 4:04 a.m. UTC | #1
On Wed, May 01, 2019 at 03:38:17PM -0700, Richard Henderson wrote:
> At present make check-tcg will produce errors like

> 

>   RUN     tests for ppc64

>   TEST    test-mmap (default) on ppc64

> test-mmap: Invalid ELF image for this architecture

> make[2]: *** [run-test-mmap] Error 255

> make[1]: *** [run-guest-tests] Error 2

> make: *** [run-tcg-tests-ppc64-linux-user] Error 2

> 

> which is caused by the use of the host ppc64le compiler

> in building guest ppc64(be) executables.


Thanks for looking at this.

I've staged this tentatively in ppc-for-4.1.  However while it removes
the "Invalid ELF image" message I still get:

  TEST    test-mmap (4096 byte pages) on ppc64le
test-mmap: Invalid argument
make[2]: *** [/home/dwg/qemu/tests/tcg/multiarch/Makefile.target:35: run-test-mmap-4096] Error 255
make[2]: Target 'run' not remade because of errors.
make[1]: *** [/home/dwg/qemu/tests/tcg/Makefile.include:71: run-guest-tests] Error 2
make: *** [/home/dwg/qemu/tests/Makefile.include:1079: run-tcg-tests-ppc64le-linux-user] Error 2

Running on a POWER9 host.  Do you see that as well?

-- 
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
Richard Henderson May 2, 2019, 4:59 a.m. UTC | #2
On 5/1/19 9:04 PM, David Gibson wrote:
> I've staged this tentatively in ppc-for-4.1.  However while it removes

> the "Invalid ELF image" message I still get:

> 

>   TEST    test-mmap (4096 byte pages) on ppc64le

> test-mmap: Invalid argument

> make[2]: *** [/home/dwg/qemu/tests/tcg/multiarch/Makefile.target:35: run-test-mmap-4096] Error 255

> make[2]: Target 'run' not remade because of errors.

> make[1]: *** [/home/dwg/qemu/tests/tcg/Makefile.include:71: run-guest-tests] Error 2

> make: *** [/home/dwg/qemu/tests/Makefile.include:1079: run-tcg-tests-ppc64le-linux-user] Error 2

> 

> Running on a POWER9 host.  Do you see that as well?


Yes.

It's a semi-bogus test, really.  We can't run test-mmap
with a page size smaller than that of the host, and of
course ppc64le uses 64k pages.

This needs a different set of cleanups.  ;-)


r~
Alex Bennée May 2, 2019, 10:47 a.m. UTC | #3
Richard Henderson <richard.henderson@linaro.org> writes:

> On 5/1/19 9:04 PM, David Gibson wrote:

>> I've staged this tentatively in ppc-for-4.1.  However while it removes

>> the "Invalid ELF image" message I still get:

>>

>>   TEST    test-mmap (4096 byte pages) on ppc64le

>> test-mmap: Invalid argument

>> make[2]: *** [/home/dwg/qemu/tests/tcg/multiarch/Makefile.target:35: run-test-mmap-4096] Error 255

>> make[2]: Target 'run' not remade because of errors.

>> make[1]: *** [/home/dwg/qemu/tests/tcg/Makefile.include:71: run-guest-tests] Error 2

>> make: *** [/home/dwg/qemu/tests/Makefile.include:1079: run-tcg-tests-ppc64le-linux-user] Error 2

>>

>> Running on a POWER9 host.  Do you see that as well?

>

> Yes.

>

> It's a semi-bogus test, really.  We can't run test-mmap

> with a page size smaller than that of the host, and of

> course ppc64le uses 64k pages.


The default run-test-mmap should just run against the host page size
(which may be bogus for the emulated architecture). The additional runs
are all added with EXTRA_RUNS:

  EXTRA_RUNS+=run-test-mmap-4096 #run-test-mmap-65536

Currently the 64k pages are disabled because it crashes so somebody
should probably look into that.

Looking at -p setting the confusing named qemu_host_page_size doesn't
seem to reflect this in:

  #ifdef TARGET_NR_getpagesize
      case TARGET_NR_getpagesize:
          return TARGET_PAGE_SIZE;
  #endif

> This needs a different set of cleanups.  ;-)


I guess this is another use case for softmmu support in linux-user where
HOST_PAGE != TARGET_PAGE?

--
Alex Bennée
Richard Henderson May 2, 2019, 3:14 p.m. UTC | #4
On 5/2/19 3:47 AM, Alex Bennée wrote:
>> This needs a different set of cleanups.  ;-)

> 

> I guess this is another use case for softmmu support in linux-user where

> HOST_PAGE != TARGET_PAGE?


Well, yes, but I was thinking more short-term, wherein we do not test things
that we know will not work.  E.g. testing 4k pages on a 64k page host.


r~
Alex Bennée May 2, 2019, 3:22 p.m. UTC | #5
Richard Henderson <richard.henderson@linaro.org> writes:

> On 5/2/19 3:47 AM, Alex Bennée wrote:

>>> This needs a different set of cleanups.  ;-)

>>

>> I guess this is another use case for softmmu support in linux-user where

>> HOST_PAGE != TARGET_PAGE?

>

> Well, yes, but I was thinking more short-term, wherein we do not test things

> that we know will not work.  E.g. testing 4k pages on a 64k page host.


I guess we could add something to configure to emit the host page size
so we can conditionalise the tests. Or just fix mmap to take advantage
of the fact that getpagesize() reports the host page size and nope out
when that is greater than test-mmap -p....

>

>

> r~



--
Alex Bennée