[Qemu-devel] [PULL 00/56] add check-tcg and associated machinery

Alex Bennée posted 56 patches 5 years, 10 months ago
Only 41 patches received!
There is a newer version of this series
.travis.yml                                        |    8 +
MAINTAINERS                                        |   15 +
Makefile.target                                    |    5 +
configure                                          |  134 +-
tests/Makefile.include                             |   41 +-
tests/docker/Makefile.include                      |   47 +-
tests/docker/docker.py                             |  107 +-
tests/docker/dockerfiles/debian-alpha-cross.docker |   12 +
tests/docker/dockerfiles/debian-apt-fake.sh        |   46 -
tests/docker/dockerfiles/debian-hppa-cross.docker  |   12 +
tests/docker/dockerfiles/debian-m68k-cross.docker  |   12 +
.../docker/dockerfiles/debian-mips64-cross.docker  |   12 +
.../docker/dockerfiles/debian-powerpc-cross.docker |   39 +-
.../docker/dockerfiles/debian-riscv64-cross.docker |   12 +
tests/docker/dockerfiles/debian-sh4-cross.docker   |   12 +
tests/docker/dockerfiles/debian-sid.docker         |   32 +
.../docker/dockerfiles/debian-sparc64-cross.docker |   12 +
tests/docker/dockerfiles/debian8.docker            |    3 -
tests/tcg/Makefile                                 |  219 +-
tests/tcg/Makefile.include                         |   88 +
tests/tcg/Makefile.probe                           |   31 +
tests/tcg/README                                   |   69 +-
tests/tcg/aarch64/Makefile.include                 |    8 +
tests/tcg/aarch64/Makefile.target                  |   17 +
tests/tcg/aarch64/fcvt.ref                         | 3268 ++++++++++++++++++++
tests/tcg/alpha/Makefile                           |   35 -
tests/tcg/alpha/Makefile.include                   |    2 +
tests/tcg/alpha/Makefile.target                    |   18 +
tests/tcg/alpha/crt.s                              |   26 -
tests/tcg/alpha/hello-alpha.c                      |    2 +
tests/tcg/alpha/test-cond.c                        |    1 +
tests/tcg/alpha/test-ovf.c                         |    2 +
tests/tcg/arm/Makefile.include                     |    8 +
tests/tcg/arm/Makefile.target                      |   32 +
tests/tcg/arm/README                               |   11 +
tests/tcg/arm/fcvt.c                               |  458 +++
tests/tcg/arm/fcvt.ref                             | 3268 ++++++++++++++++++++
tests/tcg/{ => arm}/hello-arm.c                    |    0
.../{test-arm-iwmmxt.s => arm/test-arm-iwmmxt.S}   |    0
tests/tcg/hppa/Makefile.include                    |    2 +
tests/tcg/hppa/Makefile.target                     |    6 +
tests/tcg/i386/Makefile.include                    |    9 +
tests/tcg/i386/Makefile.target                     |   52 +
tests/tcg/i386/README                              |   38 +
tests/tcg/{ => i386}/hello-i386.c                  |    1 +
tests/tcg/{ => i386}/pi_10.com                     |  Bin
tests/tcg/{ => i386}/runcom.c                      |    0
tests/tcg/{ => i386}/test-i386-code16.S            |    0
tests/tcg/{ => i386}/test-i386-fprem.c             |   12 +-
tests/tcg/{ => i386}/test-i386-muldiv.h            |    0
tests/tcg/{ => i386}/test-i386-shift.h             |    0
tests/tcg/{ => i386}/test-i386-ssse3.c             |    0
tests/tcg/{ => i386}/test-i386-vm86.S              |    0
tests/tcg/{ => i386}/test-i386.c                   |    7 +-
tests/tcg/{ => i386}/test-i386.h                   |    0
tests/tcg/m68k/Makefile.include                    |    2 +
tests/tcg/m68k/Makefile.target                     |    7 +
tests/tcg/mips/Makefile.include                    |   20 +
tests/tcg/mips/Makefile.target                     |   22 +
tests/tcg/mips/README                              |    7 +
tests/tcg/{ => mips}/hello-mips.c                  |    0
tests/tcg/multiarch/Makefile.target                |   36 +
tests/tcg/multiarch/README                         |    1 +
tests/tcg/{ => multiarch}/linux-test.c             |  150 +-
tests/tcg/{ => multiarch}/sha1.c                   |    0
tests/tcg/{ => multiarch}/test-mmap.c              |   40 +-
tests/tcg/{ => multiarch}/testthread.c             |    0
tests/tcg/ppc/Makefile.include                     |    7 +
tests/tcg/ppc/Makefile.target                      |   12 +
tests/tcg/riscv/Makefile.include                   |   10 +
tests/tcg/s390x/Makefile.include                   |    2 +
tests/tcg/sh4/Makefile.include                     |    4 +
tests/tcg/sh4/Makefile.target                      |    7 +
tests/tcg/sparc64/Makefile.include                 |    2 +
tests/tcg/sparc64/Makefile.target                  |   11 +
tests/tcg/test_path.c                              |  157 -
tests/tcg/x86_64/Makefile.target                   |   15 +
77 files changed, 8136 insertions(+), 627 deletions(-)
create mode 100644 tests/docker/dockerfiles/debian-alpha-cross.docker
delete mode 100755 tests/docker/dockerfiles/debian-apt-fake.sh
create mode 100644 tests/docker/dockerfiles/debian-hppa-cross.docker
create mode 100644 tests/docker/dockerfiles/debian-m68k-cross.docker
create mode 100644 tests/docker/dockerfiles/debian-mips64-cross.docker
create mode 100644 tests/docker/dockerfiles/debian-riscv64-cross.docker
create mode 100644 tests/docker/dockerfiles/debian-sh4-cross.docker
create mode 100644 tests/docker/dockerfiles/debian-sid.docker
create mode 100644 tests/docker/dockerfiles/debian-sparc64-cross.docker
create mode 100644 tests/tcg/Makefile.include
create mode 100644 tests/tcg/Makefile.probe
create mode 100644 tests/tcg/aarch64/Makefile.include
create mode 100644 tests/tcg/aarch64/Makefile.target
create mode 100644 tests/tcg/aarch64/fcvt.ref
delete mode 100644 tests/tcg/alpha/Makefile
create mode 100644 tests/tcg/alpha/Makefile.include
create mode 100644 tests/tcg/alpha/Makefile.target
delete mode 100644 tests/tcg/alpha/crt.s
create mode 100644 tests/tcg/arm/Makefile.include
create mode 100644 tests/tcg/arm/Makefile.target
create mode 100644 tests/tcg/arm/README
create mode 100644 tests/tcg/arm/fcvt.c
create mode 100644 tests/tcg/arm/fcvt.ref
rename tests/tcg/{ => arm}/hello-arm.c (100%)
rename tests/tcg/{test-arm-iwmmxt.s => arm/test-arm-iwmmxt.S} (100%)
create mode 100644 tests/tcg/hppa/Makefile.include
create mode 100644 tests/tcg/hppa/Makefile.target
create mode 100644 tests/tcg/i386/Makefile.include
create mode 100644 tests/tcg/i386/Makefile.target
create mode 100644 tests/tcg/i386/README
rename tests/tcg/{ => i386}/hello-i386.c (96%)
rename tests/tcg/{ => i386}/pi_10.com (100%)
rename tests/tcg/{ => i386}/runcom.c (100%)
rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
rename tests/tcg/{ => i386}/test-i386-fprem.c (97%)
rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
rename tests/tcg/{ => i386}/test-i386.c (99%)
rename tests/tcg/{ => i386}/test-i386.h (100%)
create mode 100644 tests/tcg/m68k/Makefile.include
create mode 100644 tests/tcg/m68k/Makefile.target
create mode 100644 tests/tcg/mips/Makefile.include
create mode 100644 tests/tcg/mips/Makefile.target
create mode 100644 tests/tcg/mips/README
rename tests/tcg/{ => mips}/hello-mips.c (100%)
create mode 100644 tests/tcg/multiarch/Makefile.target
create mode 100644 tests/tcg/multiarch/README
rename tests/tcg/{ => multiarch}/linux-test.c (81%)
rename tests/tcg/{ => multiarch}/sha1.c (100%)
rename tests/tcg/{ => multiarch}/test-mmap.c (93%)
rename tests/tcg/{ => multiarch}/testthread.c (100%)
create mode 100644 tests/tcg/ppc/Makefile.include
create mode 100644 tests/tcg/ppc/Makefile.target
create mode 100644 tests/tcg/riscv/Makefile.include
create mode 100644 tests/tcg/s390x/Makefile.include
create mode 100644 tests/tcg/sh4/Makefile.include
create mode 100644 tests/tcg/sh4/Makefile.target
create mode 100644 tests/tcg/sparc64/Makefile.include
create mode 100644 tests/tcg/sparc64/Makefile.target
delete mode 100644 tests/tcg/test_path.c
create mode 100644 tests/tcg/x86_64/Makefile.target
[Qemu-devel] [PULL 00/56] add check-tcg and associated machinery
Posted by Alex Bennée 5 years, 10 months ago
The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:

  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)

are available in the Git repository at:

  https://github.com/stsquad/qemu.git tags/pull-tcg-testing-revivial-190618-1

for you to fetch changes up to 03c79cb5825f2e930a39839e8375dc0feef6d57d:

  .travis.yml: add check-tcg test (2018-06-19 16:38:54 +0100)

----------------------------------------------------------------
Add check-tcg machinary

This restores the ability to run TCG smoke tests by using our docker
infrastructure to support cross building simple tests. It represents
the first step to making better cross-architecture testing available
straight from the source tree ;-)

----------------------------------------------------------------
Alex Bennée (54):
      configure: add support for --cross-cc-FOO
      configure: move i386_cc to cross_cc_i386
      configure: allow user to specify --cross-cc-cflags-foo=
      configure: set cross_cc_FOO for host compiler
      docker: Add "cc" subcommand
      docker: extend "cc" command to accept compiler
      docker: allow "cc" command to run in user context
      docker: Makefile.include introduce DOCKER_SCRIPT
      tests/tcg: move architecture independent tests into subdir
      tests/tcg/multiarch: enable additional linux-test tests
      tests/tcg/multiarch: don't hard code paths/ports for linux-test
      tests/tcg/multiarch: move most output to stdout
      tests/tcg: move i386 specific tests into subdir
      tests/tcg: enable building for i386
      tests/tcg/i386: fix test-i386
      tests/tcg/i386: add runner for test-i386-fprem
      tests/tcg/x86_64: add Makefile.target
      tests/tcg/i386/test-i386: use modern vector_size attributes
      tests/tcg/i386/test-i386: fix printf format
      tests/tcg: move ARM specific tests into subdir
      tests/tcg: enable building for ARM
      tests/tcg/arm: fix up test-arm-iwmmxt test
      tests/tcg: enable building for AArch64
      tests/tcg/arm: add fcvt test cases for AArch32/64
      tests/tcg: move MIPS specific tests into subdir
      tests/tcg: enable building for MIPS
      tests/docker/Makefile.include: fix mipsel-cross dependancy
      tests/tcg/mips: include common mips hello-mips
      tests/tcg: enable building for s390x
      tests/tcg: enable building for ppc64
      tests/tcg: enable building for Alpha
      tests/tcg/alpha: add Alpha specific tests
      tests/tcg: enable building for HPPA
      tests/tcg: enable building for m68k
      tests/tcg: enable building for sh4
      tests/tcg: enable building for sparc64
      tests/tcg: enable building for mips64
      tests/tcg: enable building for RISCV64
      docker: move debian-powerpc-cross to sid based build
      tests/tcg: enable building for PowerPC
      tests/tcg/Makefile: update to be called from Makefile.target
      Makefile.target: add (clean-/build-)guest-tests targets
      tests/Makefile.include: add [build|clean|check]-tcg targets
      tests/tcg: add run, diff, and skip helper macros
      tests/tcg: override runners for broken tests
      tests/tcg/i386: extend timeout for runcom test
      tests: add top-level make dependency for docker builds
      docker: docker.py use "version" to probe usage
      docker: docker.py don't conflate checksums for extra_files
      docker: docker.py add check sub-command
      tests/Makefile: call sub-makes with SKIP_DOCKER_BUILD=1
      docker: docker.py adding age check command
      tests/docker/Makefile.include: only force SID to NOCACHE if old
      .travis.yml: add check-tcg test

Fam Zheng (2):
      tests/tcg/multiarch: Build fix for linux-test
      tests/tcg/i386: Build fix for hello-i386

 .travis.yml                                        |    8 +
 MAINTAINERS                                        |   15 +
 Makefile.target                                    |    5 +
 configure                                          |  134 +-
 tests/Makefile.include                             |   41 +-
 tests/docker/Makefile.include                      |   47 +-
 tests/docker/docker.py                             |  107 +-
 tests/docker/dockerfiles/debian-alpha-cross.docker |   12 +
 tests/docker/dockerfiles/debian-apt-fake.sh        |   46 -
 tests/docker/dockerfiles/debian-hppa-cross.docker  |   12 +
 tests/docker/dockerfiles/debian-m68k-cross.docker  |   12 +
 .../docker/dockerfiles/debian-mips64-cross.docker  |   12 +
 .../docker/dockerfiles/debian-powerpc-cross.docker |   39 +-
 .../docker/dockerfiles/debian-riscv64-cross.docker |   12 +
 tests/docker/dockerfiles/debian-sh4-cross.docker   |   12 +
 tests/docker/dockerfiles/debian-sid.docker         |   32 +
 .../docker/dockerfiles/debian-sparc64-cross.docker |   12 +
 tests/docker/dockerfiles/debian8.docker            |    3 -
 tests/tcg/Makefile                                 |  219 +-
 tests/tcg/Makefile.include                         |   88 +
 tests/tcg/Makefile.probe                           |   31 +
 tests/tcg/README                                   |   69 +-
 tests/tcg/aarch64/Makefile.include                 |    8 +
 tests/tcg/aarch64/Makefile.target                  |   17 +
 tests/tcg/aarch64/fcvt.ref                         | 3268 ++++++++++++++++++++
 tests/tcg/alpha/Makefile                           |   35 -
 tests/tcg/alpha/Makefile.include                   |    2 +
 tests/tcg/alpha/Makefile.target                    |   18 +
 tests/tcg/alpha/crt.s                              |   26 -
 tests/tcg/alpha/hello-alpha.c                      |    2 +
 tests/tcg/alpha/test-cond.c                        |    1 +
 tests/tcg/alpha/test-ovf.c                         |    2 +
 tests/tcg/arm/Makefile.include                     |    8 +
 tests/tcg/arm/Makefile.target                      |   32 +
 tests/tcg/arm/README                               |   11 +
 tests/tcg/arm/fcvt.c                               |  458 +++
 tests/tcg/arm/fcvt.ref                             | 3268 ++++++++++++++++++++
 tests/tcg/{ => arm}/hello-arm.c                    |    0
 .../{test-arm-iwmmxt.s => arm/test-arm-iwmmxt.S}   |    0
 tests/tcg/hppa/Makefile.include                    |    2 +
 tests/tcg/hppa/Makefile.target                     |    6 +
 tests/tcg/i386/Makefile.include                    |    9 +
 tests/tcg/i386/Makefile.target                     |   52 +
 tests/tcg/i386/README                              |   38 +
 tests/tcg/{ => i386}/hello-i386.c                  |    1 +
 tests/tcg/{ => i386}/pi_10.com                     |  Bin
 tests/tcg/{ => i386}/runcom.c                      |    0
 tests/tcg/{ => i386}/test-i386-code16.S            |    0
 tests/tcg/{ => i386}/test-i386-fprem.c             |   12 +-
 tests/tcg/{ => i386}/test-i386-muldiv.h            |    0
 tests/tcg/{ => i386}/test-i386-shift.h             |    0
 tests/tcg/{ => i386}/test-i386-ssse3.c             |    0
 tests/tcg/{ => i386}/test-i386-vm86.S              |    0
 tests/tcg/{ => i386}/test-i386.c                   |    7 +-
 tests/tcg/{ => i386}/test-i386.h                   |    0
 tests/tcg/m68k/Makefile.include                    |    2 +
 tests/tcg/m68k/Makefile.target                     |    7 +
 tests/tcg/mips/Makefile.include                    |   20 +
 tests/tcg/mips/Makefile.target                     |   22 +
 tests/tcg/mips/README                              |    7 +
 tests/tcg/{ => mips}/hello-mips.c                  |    0
 tests/tcg/multiarch/Makefile.target                |   36 +
 tests/tcg/multiarch/README                         |    1 +
 tests/tcg/{ => multiarch}/linux-test.c             |  150 +-
 tests/tcg/{ => multiarch}/sha1.c                   |    0
 tests/tcg/{ => multiarch}/test-mmap.c              |   40 +-
 tests/tcg/{ => multiarch}/testthread.c             |    0
 tests/tcg/ppc/Makefile.include                     |    7 +
 tests/tcg/ppc/Makefile.target                      |   12 +
 tests/tcg/riscv/Makefile.include                   |   10 +
 tests/tcg/s390x/Makefile.include                   |    2 +
 tests/tcg/sh4/Makefile.include                     |    4 +
 tests/tcg/sh4/Makefile.target                      |    7 +
 tests/tcg/sparc64/Makefile.include                 |    2 +
 tests/tcg/sparc64/Makefile.target                  |   11 +
 tests/tcg/test_path.c                              |  157 -
 tests/tcg/x86_64/Makefile.target                   |   15 +
 77 files changed, 8136 insertions(+), 627 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-alpha-cross.docker
 delete mode 100755 tests/docker/dockerfiles/debian-apt-fake.sh
 create mode 100644 tests/docker/dockerfiles/debian-hppa-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-m68k-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-mips64-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-riscv64-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-sh4-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-sid.docker
 create mode 100644 tests/docker/dockerfiles/debian-sparc64-cross.docker
 create mode 100644 tests/tcg/Makefile.include
 create mode 100644 tests/tcg/Makefile.probe
 create mode 100644 tests/tcg/aarch64/Makefile.include
 create mode 100644 tests/tcg/aarch64/Makefile.target
 create mode 100644 tests/tcg/aarch64/fcvt.ref
 delete mode 100644 tests/tcg/alpha/Makefile
 create mode 100644 tests/tcg/alpha/Makefile.include
 create mode 100644 tests/tcg/alpha/Makefile.target
 delete mode 100644 tests/tcg/alpha/crt.s
 create mode 100644 tests/tcg/arm/Makefile.include
 create mode 100644 tests/tcg/arm/Makefile.target
 create mode 100644 tests/tcg/arm/README
 create mode 100644 tests/tcg/arm/fcvt.c
 create mode 100644 tests/tcg/arm/fcvt.ref
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{test-arm-iwmmxt.s => arm/test-arm-iwmmxt.S} (100%)
 create mode 100644 tests/tcg/hppa/Makefile.include
 create mode 100644 tests/tcg/hppa/Makefile.target
 create mode 100644 tests/tcg/i386/Makefile.include
 create mode 100644 tests/tcg/i386/Makefile.target
 create mode 100644 tests/tcg/i386/README
 rename tests/tcg/{ => i386}/hello-i386.c (96%)
 rename tests/tcg/{ => i386}/pi_10.com (100%)
 rename tests/tcg/{ => i386}/runcom.c (100%)
 rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
 rename tests/tcg/{ => i386}/test-i386-fprem.c (97%)
 rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
 rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
 rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
 rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
 rename tests/tcg/{ => i386}/test-i386.c (99%)
 rename tests/tcg/{ => i386}/test-i386.h (100%)
 create mode 100644 tests/tcg/m68k/Makefile.include
 create mode 100644 tests/tcg/m68k/Makefile.target
 create mode 100644 tests/tcg/mips/Makefile.include
 create mode 100644 tests/tcg/mips/Makefile.target
 create mode 100644 tests/tcg/mips/README
 rename tests/tcg/{ => mips}/hello-mips.c (100%)
 create mode 100644 tests/tcg/multiarch/Makefile.target
 create mode 100644 tests/tcg/multiarch/README
 rename tests/tcg/{ => multiarch}/linux-test.c (81%)
 rename tests/tcg/{ => multiarch}/sha1.c (100%)
 rename tests/tcg/{ => multiarch}/test-mmap.c (93%)
 rename tests/tcg/{ => multiarch}/testthread.c (100%)
 create mode 100644 tests/tcg/ppc/Makefile.include
 create mode 100644 tests/tcg/ppc/Makefile.target
 create mode 100644 tests/tcg/riscv/Makefile.include
 create mode 100644 tests/tcg/s390x/Makefile.include
 create mode 100644 tests/tcg/sh4/Makefile.include
 create mode 100644 tests/tcg/sh4/Makefile.target
 create mode 100644 tests/tcg/sparc64/Makefile.include
 create mode 100644 tests/tcg/sparc64/Makefile.target
 delete mode 100644 tests/tcg/test_path.c
 create mode 100644 tests/tcg/x86_64/Makefile.target

--
2.17.1


Re: [Qemu-devel] [PULL 00/56] add check-tcg and associated machinery
Posted by Peter Maydell 5 years, 10 months ago
On 19 June 2018 at 16:43, Alex Bennée <alex.bennee@linaro.org> wrote:
> The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:
>
>   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/stsquad/qemu.git tags/pull-tcg-testing-revivial-190618-1
>
> for you to fetch changes up to 03c79cb5825f2e930a39839e8375dc0feef6d57d:
>
>   .travis.yml: add check-tcg test (2018-06-19 16:38:54 +0100)
>
> ----------------------------------------------------------------
> Add check-tcg machinary
>
> This restores the ability to run TCG smoke tests by using our docker
> infrastructure to support cross building simple tests. It represents
> the first step to making better cross-architecture testing available
> straight from the source tree ;-)
>
> ----------------------------------------------------------------

On x86-64/Linux I get:

Doing build and test cycle...
make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
Traceback (most recent call last):
  File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
line 523, in <module>
    sys.exit(main())
  File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
line 520, in main
    return args.cmdobj.run(args, argv)
  File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
line 475, in run
    dkr = Docker()
  File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
line 137, in __init__
    self._command = _guess_docker_command()
  File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
line 62, in _guess_docker_command
    commands_txt)
Exception: Cannot find working docker command. Tried:
  docker
  sudo -n docker
make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
make: *** Deleting file 'config-host.mak'
make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
config-host.mak is out-of-date, running configure
Traceback (most recent call last):
  File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
line 29, in <module>
    from StringIO import StringIO
ImportError: No module named 'StringIO'
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
firmware path     /usr/local/share/qemu-firmware
[other configure output trimmed]
VxHS block device no
capstone          git
docker

ERROR: configure test passed without -Werror but failed with -Werror.
       This is probably a bug in the configure script. The failing command
       will be at the bottom of config.log.
       You can run configure with --disable-werror to bypass this check.

Makefile:73: recipe for target 'config-host.mak' failed
make: *** [config-host.mak] Error 1

and the last part of config.log is

======
ccache gcc -Werror -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIE -DPIE -m64 -mcx16
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv
-Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
-Wold-style-declaration -Wold-style-definition -Wtype-limits
-fstack-protector-strong -I/usr/include/p11-kit-1
-I/usr/include/libpng12 -I/usr/include/spice-server
-I/usr/include/spice-1 -I$(SRC_PATH)/capstone/include -c -o
config-temp/qemu-conf.o config-temp/qemu-conf.c
c++ -D__STDC_LIMIT_MACROS -Werror -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIE -DPIE -m64 -mcx16
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wall -Wundef
-Wwrite-strings -fno-strict-aliasing -fno-common -fwrapv
-Wendif-labels -Wno-missing-include-dirs -Wempty-body
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
-Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1
-I/usr/include/libpng12 -I/usr/include/spice-server
-I/usr/include/spice-1 -I$(SRC_PATH)/capstone/include -o
config-temp/qemu-conf.exe config-temp/qemu-conf.cxx
config-temp/qemu-conf.o -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie
-m64 -g
aarch64-linux-gnu-gcc -o config-temp/qemu-conf.exe
config-temp/qemu-conf.c -static
aarch64-linux-gnu-gcc -Werror -o config-temp/qemu-conf.exe
config-temp/qemu-conf.c -static
arm-linux-gnueabihf-gcc -o config-temp/qemu-conf.exe
config-temp/qemu-conf.c -static
arm-linux-gnueabihf-gcc -Werror -o config-temp/qemu-conf.exe
config-temp/qemu-conf.c -static
powerpc-linux-gnu-gcc -o config-temp/qemu-conf.exe
config-temp/qemu-conf.c -static
powerpc-linux-gnu-gcc -Werror -o config-temp/qemu-conf.exe
config-temp/qemu-conf.c -static
ccache gcc -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
ccache -Werror gcc -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
ccache: invalid option -- 'W'
Usage:
    ccache [options]
    ccache compiler [compiler options]
    compiler [compiler options]          (via symbolic link)

Options:
    -c, --cleanup         delete old files and recalculate size counters
                          (normally not needed as this is done automatically)
    -C, --clear           clear the cache completely (except configuration)
    -F, --max-files=N     set maximum number of files in cache to N (use 0 for
                          no limit)
    -M, --max-size=SIZE   set maximum size of cache to SIZE (use 0 for no
                          limit); available suffixes: k, M, G, T (decimal) and
                          Ki, Mi, Gi, Ti (binary); default suffix: G
    -o, --set-config=K=V  set configuration key K to value V
    -p, --print-config    print current configuration options
    -s, --show-stats      show statistics summary
    -z, --zero-stats      zero statistics counters

    -h, --help            print this help text
    -V, --version         print version and copyright information

See also <http://ccache.samba.org>.
======

The configure options for this build are
'--cc=ccache gcc' '--enable-debug' '--python=python3'

Looks like something is mishandling CC.

On FreeBSD I get an odd linker error:

  LINK    qemu-ga
/usr/bin/ld: cannot open linker script file ../config-host.ld: No such
file or directory
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:688: qemu-ga] Error 1

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/56] add check-tcg and associated machinery
Posted by Alex Bennée 5 years, 10 months ago
Peter Maydell <peter.maydell@linaro.org> writes:

> On 19 June 2018 at 16:43, Alex Bennée <alex.bennee@linaro.org> wrote:
>> The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:
>>
>>   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)
>>
>> are available in the Git repository at:
>>
>>   https://github.com/stsquad/qemu.git tags/pull-tcg-testing-revivial-190618-1
>>
>> for you to fetch changes up to 03c79cb5825f2e930a39839e8375dc0feef6d57d:
>>
>>   .travis.yml: add check-tcg test (2018-06-19 16:38:54 +0100)
>>
>> ----------------------------------------------------------------
>> Add check-tcg machinary
>>
>> This restores the ability to run TCG smoke tests by using our docker
>> infrastructure to support cross building simple tests. It represents
>> the first step to making better cross-architecture testing available
>> straight from the source tree ;-)
>>
>> ----------------------------------------------------------------
>
> On x86-64/Linux I get:
>
> Doing build and test cycle...
> make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
> Traceback (most recent call last):
>   File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
> line 523, in <module>
>     sys.exit(main())
>   File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
> line 520, in main
>     return args.cmdobj.run(args, argv)
>   File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
> line 475, in run
>     dkr = Docker()
>   File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
> line 137, in __init__
>     self._command = _guess_docker_command()
>   File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
> line 62, in _guess_docker_command
>     commands_txt)
> Exception: Cannot find working docker command. Tried:
>   docker
>   sudo -n docker
> make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
> make: *** Deleting file 'config-host.mak'
> make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
> config-host.mak is out-of-date, running configure
> Traceback (most recent call last):
>   File "/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py",
> line 29, in <module>
>     from StringIO import StringIO
> ImportError: No module named 'StringIO'
> Install prefix    /usr/local
> BIOS directory    /usr/local/share/qemu
> firmware path     /usr/local/share/qemu-firmware
> [other configure output trimmed]
> VxHS block device no
> capstone          git
> docker

Hmm I'm sure I tested this. I'll go and find a box without docker to
double check.

>
> ERROR: configure test passed without -Werror but failed with -Werror.
>        This is probably a bug in the configure script. The failing command
>        will be at the bottom of config.log.
>        You can run configure with --disable-werror to bypass this check.
>
> Makefile:73: recipe for target 'config-host.mak' failed
> make: *** [config-host.mak] Error 1
>
> and the last part of config.log is
>
> ======
> ccache gcc -Werror -pthread -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIE -DPIE -m64 -mcx16
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
> -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv
> -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs
> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
> -Wold-style-declaration -Wold-style-definition -Wtype-limits
> -fstack-protector-strong -I/usr/include/p11-kit-1
> -I/usr/include/libpng12 -I/usr/include/spice-server
> -I/usr/include/spice-1 -I$(SRC_PATH)/capstone/include -c -o
> config-temp/qemu-conf.o config-temp/qemu-conf.c
> c++ -D__STDC_LIMIT_MACROS -Werror -pthread -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIE -DPIE -m64 -mcx16
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wall -Wundef
> -Wwrite-strings -fno-strict-aliasing -fno-common -fwrapv
> -Wendif-labels -Wno-missing-include-dirs -Wempty-body
> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
> -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1
> -I/usr/include/libpng12 -I/usr/include/spice-server
> -I/usr/include/spice-1 -I$(SRC_PATH)/capstone/include -o
> config-temp/qemu-conf.exe config-temp/qemu-conf.cxx
> config-temp/qemu-conf.o -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie
> -m64 -g
> aarch64-linux-gnu-gcc -o config-temp/qemu-conf.exe
> config-temp/qemu-conf.c -static
> aarch64-linux-gnu-gcc -Werror -o config-temp/qemu-conf.exe
> config-temp/qemu-conf.c -static
> arm-linux-gnueabihf-gcc -o config-temp/qemu-conf.exe
> config-temp/qemu-conf.c -static
> arm-linux-gnueabihf-gcc -Werror -o config-temp/qemu-conf.exe
> config-temp/qemu-conf.c -static
> powerpc-linux-gnu-gcc -o config-temp/qemu-conf.exe
> config-temp/qemu-conf.c -static
> powerpc-linux-gnu-gcc -Werror -o config-temp/qemu-conf.exe
> config-temp/qemu-conf.c -static
> ccache gcc -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
> ccache -Werror gcc -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
> ccache: invalid option -- 'W'
> Usage:
>     ccache [options]
>     ccache compiler [compiler options]
>     compiler [compiler options]          (via symbolic link)
>
> Options:
>     -c, --cleanup         delete old files and recalculate size counters
>                           (normally not needed as this is done automatically)
>     -C, --clear           clear the cache completely (except configuration)
>     -F, --max-files=N     set maximum number of files in cache to N (use 0 for
>                           no limit)
>     -M, --max-size=SIZE   set maximum size of cache to SIZE (use 0 for no
>                           limit); available suffixes: k, M, G, T (decimal) and
>                           Ki, Mi, Gi, Ti (binary); default suffix: G
>     -o, --set-config=K=V  set configuration key K to value V
>     -p, --print-config    print current configuration options
>     -s, --show-stats      show statistics summary
>     -z, --zero-stats      zero statistics counters
>
>     -h, --help            print this help text
>     -V, --version         print version and copyright information
>
> See also <http://ccache.samba.org>.
> ======
>
> The configure options for this build are
> '--cc=ccache gcc' '--enable-debug' '--python=python3'
>
> Looks like something is mishandling CC.
>
> On FreeBSD I get an odd linker error:
>
>   LINK    qemu-ga
> /usr/bin/ld: cannot open linker script file ../config-host.ld: No such
> file or directory
> c++: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake: *** [Makefile:688: qemu-ga] Error 1
>
> thanks
> -- PMM


--
Alex Bennée

Re: [Qemu-devel] [PULL 00/56] add check-tcg and associated machinery
Posted by Daniel P. Berrangé 5 years, 10 months ago
On Wed, Jun 20, 2018 at 11:43:57AM +0100, Peter Maydell wrote:
> On 19 June 2018 at 16:43, Alex Bennée <alex.bennee@linaro.org> wrote:
> > The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:
> >
> >   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)
> >
> > are available in the Git repository at:
> >
> >   https://github.com/stsquad/qemu.git tags/pull-tcg-testing-revivial-190618-1
> >
> > for you to fetch changes up to 03c79cb5825f2e930a39839e8375dc0feef6d57d:
> >
> >   .travis.yml: add check-tcg test (2018-06-19 16:38:54 +0100)
> >
> > ----------------------------------------------------------------
> > Add check-tcg machinary
> >
> > This restores the ability to run TCG smoke tests by using our docker
> > infrastructure to support cross building simple tests. It represents
> > the first step to making better cross-architecture testing available
> > straight from the source tree ;-)
> >
> > ----------------------------------------------------------------
> 
> On x86-64/Linux I get:
> 

[snip]

> ERROR: configure test passed without -Werror but failed with -Werror.
>        This is probably a bug in the configure script. The failing command
>        will be at the bottom of config.log.
>        You can run configure with --disable-werror to bypass this check.

[snip]

> ccache gcc -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
> ccache -Werror gcc -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static

This looks dubious - the -Werror arg is in the wrong place on the
command line, hence ccache complaining:

> ccache: invalid option -- 'W'
> Usage:
>     ccache [options]
>     ccache compiler [compiler options]
>     compiler [compiler options]          (via symbolic link)
> 
> Options:
>     -c, --cleanup         delete old files and recalculate size counters
>                           (normally not needed as this is done automatically)
>     -C, --clear           clear the cache completely (except configuration)
>     -F, --max-files=N     set maximum number of files in cache to N (use 0 for
>                           no limit)
>     -M, --max-size=SIZE   set maximum size of cache to SIZE (use 0 for no
>                           limit); available suffixes: k, M, G, T (decimal) and
>                           Ki, Mi, Gi, Ti (binary); default suffix: G
>     -o, --set-config=K=V  set configuration key K to value V
>     -p, --print-config    print current configuration options
>     -s, --show-stats      show statistics summary
>     -z, --zero-stats      zero statistics counters
> 
>     -h, --help            print this help text
>     -V, --version         print version and copyright information
> 
> See also <http://ccache.samba.org>.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PULL 00/56] add check-tcg and associated machinery
Posted by Peter Maydell 5 years, 10 months ago
On 19 June 2018 at 16:43, Alex Bennée <alex.bennee@linaro.org> wrote:
> The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:
>
>   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/stsquad/qemu.git tags/pull-tcg-testing-revivial-190618-1
>
> for you to fetch changes up to 03c79cb5825f2e930a39839e8375dc0feef6d57d:
>
>   .travis.yml: add check-tcg test (2018-06-19 16:38:54 +0100)
>
> ----------------------------------------------------------------
> Add check-tcg machinary
>
> This restores the ability to run TCG smoke tests by using our docker
> infrastructure to support cross building simple tests. It represents
> the first step to making better cross-architecture testing available
> straight from the source tree ;-)
>

Also, I've just noticed that your commit messages are
full of the 'below-the-fold' info about changes since
v3, v4, etc. That shouldn't be in commits in pull requests,
please.

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/56] add check-tcg and associated machinery
Posted by Alex Bennée 5 years, 10 months ago
Peter Maydell <peter.maydell@linaro.org> writes:

> On 19 June 2018 at 16:43, Alex Bennée <alex.bennee@linaro.org> wrote:
>> The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:
>>
>>   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)
>>
>> are available in the Git repository at:
>>
>>   https://github.com/stsquad/qemu.git tags/pull-tcg-testing-revivial-190618-1
>>
>> for you to fetch changes up to 03c79cb5825f2e930a39839e8375dc0feef6d57d:
>>
>>   .travis.yml: add check-tcg test (2018-06-19 16:38:54 +0100)
>>
>> ----------------------------------------------------------------
>> Add check-tcg machinary
>>
>> This restores the ability to run TCG smoke tests by using our docker
>> infrastructure to support cross building simple tests. It represents
>> the first step to making better cross-architecture testing available
>> straight from the source tree ;-)
>>
>
> Also, I've just noticed that your commit messages are
> full of the 'below-the-fold' info about changes since
> v3, v4, etc. That shouldn't be in commits in pull requests,
> please.

Doh... let me add that to my pullreq script...

>
> thanks
> -- PMM


--
Alex Bennée

[Qemu-devel] [PULL 04/56] configure: set cross_cc_FOO for host compiler
Posted by Alex Bennée 5 years, 10 months ago
We can build tests for the host system with the compiler that we have
selected.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

diff --git a/configure b/configure
index b96017b423..069219e9ae 100755
--- a/configure
+++ b/configure
@@ -1431,26 +1431,38 @@ case "$cpu" in
     ppc)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
+           cross_cc_powerpc=$cc
+           cross_cc_cflags_powerpc=$CPU_CFLAGS
            ;;
     ppc64)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_ppc64=$cc
+           cross_cc_cflags_ppc64=$CPU_CFLAGS
            ;;
     sparc)
            CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
            LDFLAGS="-m32 -mv8plus $LDFLAGS"
+           cross_cc_sparc=$cc
+           cross_cc_cflags_sparc=$CPU_CFLAGS
            ;;
     sparc64)
            CPU_CFLAGS="-m64 -mcpu=ultrasparc"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_sparc64=$cc
+           cross_cc_cflags_sparc64=$CPU_CFLAGS
            ;;
     s390)
            CPU_CFLAGS="-m31"
            LDFLAGS="-m31 $LDFLAGS"
+           cross_cc_s390=$cc
+           cross_cc_cflags_s390=$CPU_CFLAGS
            ;;
     s390x)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_s390x=$cc
+           cross_cc_cflags_s390x=$CPU_CFLAGS
            ;;
     i386)
            CPU_CFLAGS="-m32"
@@ -1471,7 +1483,7 @@ case "$cpu" in
            CPU_CFLAGS="-mx32"
            LDFLAGS="-mx32 $LDFLAGS"
            cross_cc_i386=$cc
-           cross_cc_cflags_i386="-m32"
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;
     # No special flags required for other host CPUs
 esac
-- 
2.17.1


[Qemu-devel] [PULL 07/56] docker: allow "cc" command to run in user context
Posted by Alex Bennée 5 years, 10 months ago
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 663dfcba4b..c83fd89985 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -418,6 +418,8 @@ class CcCommand(SubCommand):
                             help="The docker image in which to run cc")
         parser.add_argument("--cc", default="cc",
                             help="The compiler executable to call")
+        parser.add_argument("--user",
+                            help="The user-id to run under")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -431,6 +433,8 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
+        if args.user:
+            cmd += ["-u", args.user]
         cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)
-- 
2.17.1


[Qemu-devel] [PULL 08/56] docker: Makefile.include introduce DOCKER_SCRIPT
Posted by Alex Bennée 5 years, 10 months ago
Define this in one place to make it easy to re-use.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 74fd51c22c..8afb383478 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -15,6 +15,8 @@ DOCKER_TESTS := $(notdir $(shell \
 
 DOCKER_TOOLS := travis
 
+DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py
+
 TESTS ?= %
 IMAGES ?= %
 
@@ -38,7 +40,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 		echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \
 	fi
 	$(call quiet-command,\
-		$(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \
+		$(DOCKER_SCRIPT) build qemu:$* $< \
 		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
 		$(if $(NOUSER),,--add-current-user) \
 		$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\
@@ -133,11 +135,11 @@ docker-run: docker-qemu-src
 	fi
 	$(if $(EXECUTABLE),						\
 		$(call quiet-command,					\
-			$(SRC_PATH)/tests/docker/docker.py update 	\
+			$(DOCKER_SCRIPT) update 			\
 			$(IMAGE) $(EXECUTABLE),				\
 			"  COPYING $(EXECUTABLE) to $(IMAGE)"))
 	$(call quiet-command,						\
-		$(SRC_PATH)/tests/docker/docker.py run 			\
+		$(DOCKER_SCRIPT) run 					\
 			$(if $(NOUSER),,-u $(shell id -u)) 		\
 			--security-opt seccomp=unconfined		\
 			$(if $V,,--rm) 					\
@@ -167,4 +169,4 @@ docker-run-%:
 	@$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu:$(IMAGE)
 
 docker-clean:
-	$(call quiet-command, $(SRC_PATH)/tests/docker/docker.py clean)
+	$(call quiet-command, $(DOCKER_SCRIPT) clean)
-- 
2.17.1


[Qemu-devel] [PULL 10/56] tests/tcg/multiarch: Build fix for linux-test
Posted by Alex Bennée 5 years, 10 months ago
From: Fam Zheng <famz@redhat.com>

To keep the compiler happy, and to fit in our buildsys flags:

- Make local functions "static"
- #ifdef out unused functions
- drop cutils/osdep dependencies

Signed-off-by: Fam Zheng <famz@redhat.com>
[AJB: drop cutils/osdep dependencies]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c
index 5070d31446..4457bd04ba 100644
--- a/tests/tcg/multiarch/linux-test.c
+++ b/tests/tcg/multiarch/linux-test.c
@@ -16,7 +16,6 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#define _GNU_SOURCE
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -31,6 +30,7 @@
 #include <utime.h>
 #include <time.h>
 #include <sys/time.h>
+#include <sys/resource.h>
 #include <sys/uio.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -39,13 +39,12 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
-#include "qemu/cutils.h"
 
 #define TESTPATH "/tmp/linux-test.tmp"
 #define TESTPORT 7654
 #define STACK_SIZE 16384
 
-void error1(const char *filename, int line, const char *fmt, ...)
+static void error1(const char *filename, int line, const char *fmt, ...)
 {
     va_list ap;
     va_start(ap, fmt);
@@ -56,7 +55,7 @@ void error1(const char *filename, int line, const char *fmt, ...)
     exit(1);
 }
 
-int __chk_error(const char *filename, int line, int ret)
+static int __chk_error(const char *filename, int line, int ret)
 {
     if (ret < 0) {
         error1(filename, line, "%m (ret=%d, errno=%d)",
@@ -73,7 +72,7 @@ int __chk_error(const char *filename, int line, int ret)
 
 #define FILE_BUF_SIZE 300
 
-void test_file(void)
+static void test_file(void)
 {
     int fd, i, len, ret;
     uint8_t buf[FILE_BUF_SIZE];
@@ -210,7 +209,7 @@ void test_file(void)
     chk_error(rmdir(TESTPATH));
 }
 
-void test_fork(void)
+static void test_fork(void)
 {
     int pid, status;
 
@@ -224,7 +223,7 @@ void test_fork(void)
         error("waitpid status=0x%x", status);
 }
 
-void test_time(void)
+static void test_time(void)
 {
     struct timeval tv, tv2;
     struct timespec ts, rem;
@@ -251,34 +250,7 @@ void test_time(void)
         error("getrusage");
 }
 
-void pstrcpy(char *buf, int buf_size, const char *str)
-{
-    int c;
-    char *q = buf;
-
-    if (buf_size <= 0)
-        return;
-
-    for(;;) {
-        c = *str++;
-        if (c == 0 || q >= buf + buf_size - 1)
-            break;
-        *q++ = c;
-    }
-    *q = '\0';
-}
-
-/* strcat and truncate. */
-char *pstrcat(char *buf, int buf_size, const char *s)
-{
-    int len;
-    len = strlen(buf);
-    if (len < buf_size)
-        pstrcpy(buf + len, buf_size - len, s);
-    return buf;
-}
-
-int server_socket(void)
+static int server_socket(void)
 {
     int val, fd;
     struct sockaddr_in sockaddr;
@@ -298,7 +270,7 @@ int server_socket(void)
 
 }
 
-int client_socket(void)
+static int client_socket(void)
 {
     int fd;
     struct sockaddr_in sockaddr;
@@ -312,9 +284,9 @@ int client_socket(void)
     return fd;
 }
 
-const char socket_msg[] = "hello socket\n";
+static const char socket_msg[] = "hello socket\n";
 
-void test_socket(void)
+static void test_socket(void)
 {
     int server_fd, client_fd, fd, pid, ret, val;
     struct sockaddr_in sockaddr;
@@ -348,9 +320,10 @@ void test_socket(void)
     chk_error(close(server_fd));
 }
 
+#if 0
 #define WCOUNT_MAX 512
 
-void test_pipe(void)
+static void test_pipe(void)
 {
     fd_set rfds, wfds;
     int fds[2], fd_max, ret;
@@ -391,10 +364,10 @@ void test_pipe(void)
     chk_error(close(fds[1]));
 }
 
-int thread1_res;
-int thread2_res;
+static int thread1_res;
+static int thread2_res;
 
-int thread1_func(void *arg)
+static int thread1_func(void *arg)
 {
     int i;
     for(i=0;i<5;i++) {
@@ -404,7 +377,7 @@ int thread1_func(void *arg)
     return 0;
 }
 
-int thread2_func(void *arg)
+static int thread2_func(void *arg)
 {
     int i;
     for(i=0;i<6;i++) {
@@ -435,27 +408,28 @@ void test_clone(void)
         thread2_res != 6)
         error("clone");
 }
+#endif
 
 /***********************************/
 
 volatile int alarm_count;
 jmp_buf jmp_env;
 
-void sig_alarm(int sig)
+static void sig_alarm(int sig)
 {
     if (sig != SIGALRM)
         error("signal");
     alarm_count++;
 }
 
-void sig_segv(int sig, siginfo_t *info, void *puc)
+static void sig_segv(int sig, siginfo_t *info, void *puc)
 {
     if (sig != SIGSEGV)
         error("signal");
     longjmp(jmp_env, 1);
 }
 
-void test_signal(void)
+static void test_signal(void)
 {
     struct sigaction act;
     struct itimerval it, oit;
@@ -510,7 +484,7 @@ void test_signal(void)
 
 #define SHM_SIZE 32768
 
-void test_shm(void)
+static void test_shm(void)
 {
     void *ptr;
     int shmid;
-- 
2.17.1


[Qemu-devel] [PULL 16/56] tests/tcg/i386: Build fix for hello-i386
Posted by Alex Bennée 5 years, 10 months ago
From: Fam Zheng <famz@redhat.com>

We have -Werror=missing-prototype, add a dummy prototype to avoid that
warning.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c
index fa00380de2..cfeb24b2f5 100644
--- a/tests/tcg/i386/hello-i386.c
+++ b/tests/tcg/i386/hello-i386.c
@@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len)
   return status;
 }
 
+void _start(void);
 void _start(void)
 {
     write(1, "Hello World\n", 12);
-- 
2.17.1


[Qemu-devel] [PULL 20/56] tests/tcg/i386/test-i386: use modern vector_size attributes
Posted by Alex Bennée 5 years, 10 months ago
The compiler complains about the old __mode__ style attributes.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index cae6a7773a..caef4da176 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -2106,8 +2106,8 @@ static void test_enter(void)
 
 #ifdef TEST_SSE
 
-typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
-typedef float __m128 __attribute__ ((__mode__(__V4SF__)));
+typedef int __m64 __attribute__ ((vector_size(8)));
+typedef float __m128 __attribute__ ((vector_size(16)));
 
 typedef union {
     double d[2];
-- 
2.17.1


[Qemu-devel] [PULL 21/56] tests/tcg/i386/test-i386: fix printf format
Posted by Alex Bennée 5 years, 10 months ago
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index caef4da176..a29b41e764 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -2258,7 +2258,7 @@ SSE_OP(a ## sd);
         "pop %0\n"\
         : "=rm" (eflags)\
         : "x" (a.dq), "x" (b.dq));\
-    printf("%-9s: a=%f b=%f cc=%04x\n",\
+    printf("%-9s: a=%f b=%f cc=%04lx\n",\
            #op, a1, b1,\
            eflags & (CC_C | CC_P | CC_Z | CC_S | CC_O | CC_A));\
 }
-- 
2.17.1


[Qemu-devel] [PULL 28/56] tests/tcg: enable building for MIPS
Posted by Alex Bennée 5 years, 10 months ago
This doesn't add any additional tests but enables building the
multiarch tests for MIPS using docker cross compilers. We don't have a
cross compiler for mips64 big endian though.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/tcg/mips/Makefile.include b/tests/tcg/mips/Makefile.include
new file mode 100644
index 0000000000..a9beceb623
--- /dev/null
+++ b/tests/tcg/mips/Makefile.include
@@ -0,0 +1,17 @@
+#
+# Makefile.include for all MIPs targets
+#
+# As Debian doesn't support mip64 in big endian mode the only way to
+# build BE is to pass a working cross compiler to ./configure
+#
+
+ifeq ($(TARGET_NAME),mips64el)
+DOCKER_IMAGE=debian-mips64el-cross
+DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
+else ifeq ($(TARGET_NAME),mipsel)
+DOCKER_IMAGE=debian-mipsel-cross
+DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
+else ifeq ($(TARGET_NAME),mips)
+DOCKER_IMAGE=debian-mips-cross
+DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
+endif
-- 
2.17.1


[Qemu-devel] [PULL 29/56] tests/docker/Makefile.include: fix mipsel-cross dependancy
Posted by Alex Bennée 5 years, 10 months ago
This got broken in commit 4319db7 but generally only shows up when you
try and do massive parallel builds on fresh machines.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 8afb383478..4a2b028a3b 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -57,6 +57,7 @@ docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mips-cross: docker-image-debian9
+docker-image-debian-mipsel-cross: docker-image-debian9
 docker-image-debian-mips64el-cross: docker-image-debian9
 docker-image-debian-powerpc-cross: docker-image-debian8
 docker-image-debian-ppc64el-cross: docker-image-debian9
-- 
2.17.1


[Qemu-devel] [PULL 30/56] tests/tcg/mips: include common mips hello-mips
Posted by Alex Bennée 5 years, 10 months ago
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/tcg/mips/Makefile.target b/tests/tcg/mips/Makefile.target
new file mode 100644
index 0000000000..71f0c2dd53
--- /dev/null
+++ b/tests/tcg/mips/Makefile.target
@@ -0,0 +1,19 @@
+# -*- Mode: makefile -*-
+#
+# MIPS - included from tests/tcg/Makefile.target
+#
+
+MIPS_SRC=$(SRC_PATH)/tests/tcg/mips
+
+# Set search path for all sources
+VPATH 		+= $(MIPS_SRC)
+
+MIPS_TESTS=hello-mips
+
+TESTS += $(MIPS_TESTS)
+
+hello-mips: CFLAGS+=-ffreestanding
+hello-mips: LDFLAGS+=-nostdlib
+
+# For MIPS32 and 64 we have a bunch of extra tests in sub-directories
+# however they are intended for system tests.
-- 
2.17.1


[Qemu-devel] [PULL 31/56] tests/tcg: enable building for s390x
Posted by Alex Bennée 5 years, 10 months ago
This doesn't add any additional tests but enables building the
multiarch tests for s390x.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: David Hildenbrand <david@redhat.com>

diff --git a/tests/tcg/s390x/Makefile.include b/tests/tcg/s390x/Makefile.include
new file mode 100644
index 0000000000..1f58115d96
--- /dev/null
+++ b/tests/tcg/s390x/Makefile.include
@@ -0,0 +1,2 @@
+DOCKER_IMAGE=debian-s390x-cross
+DOCKER_CROSS_COMPILER=s390x-linux-gnu-gcc
-- 
2.17.1


[Qemu-devel] [PULL 32/56] tests/tcg: enable building for ppc64
Posted by Alex Bennée 5 years, 10 months ago
Currently this just enables building the multiarch tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/tcg/ppc64le/Makefile.include b/tests/tcg/ppc64le/Makefile.include
new file mode 100644
index 0000000000..d71cfc9aa7
--- /dev/null
+++ b/tests/tcg/ppc64le/Makefile.include
@@ -0,0 +1,2 @@
+DOCKER_IMAGE=debian-ppc64el-cross
+DOCKER_CROSS_COMPILER=powerpc64le-linux-gnu-gcc
-- 
2.17.1


[Qemu-devel] [PULL 48/56] tests/tcg/i386: extend timeout for runcom test
Posted by Alex Bennée 5 years, 10 months ago
The Travis hardware can be a little slow and the runcom test is fairly
heavy in calculating pi. Lets double the timeout so we don't trip up
during CI by mistake.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
index 97b7c23cf1..c1997a1624 100644
--- a/tests/tcg/i386/Makefile.target
+++ b/tests/tcg/i386/Makefile.target
@@ -30,6 +30,7 @@ test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386
 	   $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
 
 # Specialist test runners
+run-runcom: TIMEOUT=30
 run-runcom: runcom pi_10.com
 	$(call run-test,$<,$(QEMU) ./runcom $(I386_SRC)/pi_10.com,"$< on $(TARGET_NAME)")
 
-- 
2.17.1


[Qemu-devel] [PULL 51/56] docker: docker.py don't conflate checksums for extra_files
Posted by Alex Bennée 5 years, 10 months ago
This just gets confusing especially as the helper function doesn't
even take into account any extra files (or the executable). Currently
the actual check just ignores them and also passes the result through
_dockerfile_preprocess so we fix that too.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index e6685f6d81..0a0155c941 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -203,8 +203,10 @@ class Docker(object):
 
         tmp_df.write("\n")
         tmp_df.write("LABEL com.qemu.dockerfile-checksum=%s" %
-                     _text_checksum("\n".join([dockerfile] +
-                                    extra_files_cksum)))
+                     _text_checksum(_dockerfile_preprocess(dockerfile)))
+        for f, c in extra_files_cksum:
+            tmp_df.write("LABEL com.qemu.%s-checksum=%s" % (f, c))
+
         tmp_df.flush()
 
         self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + \
@@ -319,7 +321,7 @@ class BuildCommand(SubCommand):
                 _copy_binary_with_libs(args.include_executable, docker_dir)
             for filename in args.extra_files or []:
                 _copy_with_mkdir(filename, docker_dir)
-                cksum += [_file_checksum(filename)]
+                cksum += [(filename, _file_checksum(filename))]
 
             argv += ["--build-arg=" + k.lower() + "=" + v
                         for k, v in os.environ.iteritems()
-- 
2.17.1


[Qemu-devel] [PULL 55/56] tests/docker/Makefile.include: only force SID to NOCACHE if old
Posted by Alex Bennée 5 years, 10 months ago
Now we can check the age of a docker image we can be a little more
intelligent about re-building Sid images and only force NOCACHE if
it is "old".

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index c0f09505bb..91d9665517 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -75,8 +75,14 @@ docker-image-debian-win64-cross: docker-image-debian8-mxe
 # force a re-build of the base image if we ever need to build one of
 # its children.
 ifndef SKIP_DOCKER_BUILD
+ifeq ($(HAVE_USER_DOCKER),y)
+SID_AGE=$(shell $(DOCKER_SCRIPT) check --checktype=age --olderthan=180 --quiet qemu:debian-sid)
+ifeq ($(SID_AGE),)
+else
 docker-image-debian-sid: NOCACHE=1
 endif
+endif
+endif
 
 docker-image-debian-alpha-cross: docker-image-debian-sid
 docker-image-debian-hppa-cross: docker-image-debian-sid
-- 
2.17.1