mbox series

[PULL,00/28] testing/next (system tests, docker, iotests)

Message ID 20190528094953.14898-1-alex.bennee@linaro.org
Headers show
Series testing/next (system tests, docker, iotests) | expand

Message

Alex Bennée May 28, 2019, 9:49 a.m. UTC
The following changes since commit a7b21f6762a2d6ec08106d8a7ccb11829914523f:

  Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging (2019-05-24 12:47:49 +0100)

are available in the Git repository at:

  https://github.com/stsquad/qemu.git tags/pull-testing-next-280519-1

for you to fetch changes up to 4a344d91083e351c1c5ac877c0ab215335a1e23d:

  tests: Run the iotests during "make check" again (2019-05-28 10:28:51 +0100)

----------------------------------------------------------------
Various testing updates

  - semihosting re-factor (used in system tests)
  - aarch64 and alpha system tests
  - editorconfig tweak for .S
  - some docker image updates
  - iotests clean-up and make check inclusion

----------------------------------------------------------------
Alex Bennée (23):
      semihosting: move semihosting configuration into its own directory
      semihosting: introduce CONFIG_SEMIHOSTING
      semihosting: implement a semihosting console
      semihosting: enable chardev backed output for console
      target/arm: fixup some of the commentary for arm-semi
      target/arm: use the common interface for WRITE0/WRITEC in arm-semi
      target/arm: add LOG_UNIMP messages to arm-semi
      target/arm: correct return values for WRITE/READ in arm-semi
      target/mips: only build mips-semi for softmmu
      target/mips: convert UHI_plog to use common semihosting code
      MAINTAINERS: update for semihostings new home
      tests/tcg/multiarch: add support for multiarch system tests
      tests/tcg/multiarch: add hello world system test
      editorconfig: add settings for .s/.S files
      tests/tcg/aarch64: add system boot.S
      tests/tcg/multiarch: move the system memory test
      tests/tcg/minilib: support %c format char
      tests/tcg/multiarch: expand system memory test to cover more
      .travis.yml: enable aarch64-softmmu and alpha-softmmu tcg tests
      Makefile: fix coverage-report reference to BUILD_DIR
      Makefile: include per-target build directories in coverage report
      Makefile.target: support per-target coverage reports
      tests/qemu-iotests: re-format output to for make check-block

Gerd Hoffmann (1):
      tests/docker: add ubuntu 18.04

Philippe Mathieu-Daudé (1):
      tests/docker: Test more components on the Fedora default image

Richard Henderson (1):
      tests/tcg/alpha: add system boot.S

Thomas Huth (2):
      tests/qemu-iotests/group: Re-use the "auto" group for tests that can always run
      tests: Run the iotests during "make check" again

 .editorconfig                                      |   5 +
 .travis.yml                                        |   2 +-
 MAINTAINERS                                        |   8 +
 Makefile                                           |   4 +-
 Makefile.target                                    |  16 +
 default-configs/arm-softmmu.mak                    |   1 +
 default-configs/lm32-softmmu.mak                   |   2 +
 default-configs/m68k-softmmu.mak                   |   2 +
 default-configs/mips-softmmu-common.mak            |   1 +
 default-configs/nios2-softmmu.mak                  |   2 +
 default-configs/xtensa-softmmu.mak                 |   2 +
 gdbstub.c                                          |   2 +-
 hw/Kconfig                                         |   1 +
 hw/Makefile.objs                                   |   1 +
 hw/mips/mips_malta.c                               |   2 +-
 hw/semihosting/Kconfig                             |   3 +
 hw/semihosting/Makefile.objs                       |   2 +
 hw/semihosting/config.c                            | 186 ++++++++
 hw/semihosting/console.c                           |  84 ++++
 include/hw/semihosting/console.h                   |  38 ++
 include/{exec => hw/semihosting}/semihost.h        |  17 +-
 include/sysemu/sysemu.h                            |   1 +
 linux-user/Makefile.objs                           |   2 +
 linux-user/arm/semihost.c                          |  24 +
 qemu-options.hx                                    |   6 +-
 stubs/Makefile.objs                                |   1 +
 stubs/semihost.c                                   |  70 +++
 target/arm/arm-semi.c                              |  96 ++--
 target/arm/helper.c                                |   2 +-
 target/arm/translate-a64.c                         |   2 +-
 target/arm/translate.c                             |   2 +-
 target/lm32/helper.c                               |   2 +-
 target/m68k/op_helper.c                            |   2 +-
 target/mips/Makefile.objs                          |   3 +-
 target/mips/helper.h                               |   2 +
 target/mips/mips-semi.c                            |  14 +-
 target/mips/translate.c                            |  10 +-
 target/nios2/helper.c                              |   2 +-
 target/xtensa/translate.c                          |   2 +-
 target/xtensa/xtensa-semi.c                        |   2 +-
 tests/Makefile.include                             |   8 +-
 tests/check-block.sh                               |  44 +-
 tests/docker/dockerfiles/fedora.docker             |   7 +
 tests/docker/dockerfiles/ubuntu1804.docker         |  57 +++
 tests/qemu-iotests-quick.sh                        |   8 -
 tests/qemu-iotests/check                           | 177 ++++---
 tests/qemu-iotests/group                           | 177 +++----
 tests/tcg/Makefile                                 |   1 +
 tests/tcg/aarch64/Makefile.softmmu-target          |  34 ++
 tests/tcg/aarch64/system/boot.S                    | 239 ++++++++++
 tests/tcg/aarch64/system/kernel.ld                 |  24 +
 tests/tcg/alpha/Makefile.softmmu-target            |  34 ++
 tests/tcg/alpha/system/boot.S                      | 511 +++++++++++++++++++++
 tests/tcg/alpha/system/kernel.ld                   |  30 ++
 tests/tcg/i386/Makefile.softmmu-target             |   4 +-
 tests/tcg/i386/system/memory.c                     | 243 ----------
 tests/tcg/minilib/printf.c                         |   3 +
 tests/tcg/multiarch/system/Makefile.softmmu-target |  14 +
 tests/tcg/{i386 => multiarch}/system/hello.c       |   0
 tests/tcg/multiarch/system/memory.c                | 449 ++++++++++++++++++
 vl.c                                               | 128 +-----
 61 files changed, 2216 insertions(+), 602 deletions(-)
 create mode 100644 hw/semihosting/Kconfig
 create mode 100644 hw/semihosting/Makefile.objs
 create mode 100644 hw/semihosting/config.c
 create mode 100644 hw/semihosting/console.c
 create mode 100644 include/hw/semihosting/console.h
 rename include/{exec => hw/semihosting}/semihost.h (78%)
 create mode 100644 linux-user/arm/semihost.c
 create mode 100644 stubs/semihost.c
 create mode 100644 tests/docker/dockerfiles/ubuntu1804.docker
 delete mode 100755 tests/qemu-iotests-quick.sh
 create mode 100644 tests/tcg/aarch64/Makefile.softmmu-target
 create mode 100644 tests/tcg/aarch64/system/boot.S
 create mode 100644 tests/tcg/aarch64/system/kernel.ld
 create mode 100644 tests/tcg/alpha/Makefile.softmmu-target
 create mode 100644 tests/tcg/alpha/system/boot.S
 create mode 100644 tests/tcg/alpha/system/kernel.ld
 delete mode 100644 tests/tcg/i386/system/memory.c
 create mode 100644 tests/tcg/multiarch/system/Makefile.softmmu-target
 rename tests/tcg/{i386 => multiarch}/system/hello.c (100%)
 create mode 100644 tests/tcg/multiarch/system/memory.c

-- 
2.20.1

Comments

Peter Maydell May 28, 2019, 1:24 p.m. UTC | #1
On Tue, 28 May 2019 at 10:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>

> The following changes since commit a7b21f6762a2d6ec08106d8a7ccb11829914523f:

>

>   Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging (2019-05-24 12:47:49 +0100)

>

> are available in the Git repository at:

>

>   https://github.com/stsquad/qemu.git tags/pull-testing-next-280519-1

>

> for you to fetch changes up to 4a344d91083e351c1c5ac877c0ab215335a1e23d:

>

>   tests: Run the iotests during "make check" again (2019-05-28 10:28:51 +0100)

>

> ----------------------------------------------------------------

> Various testing updates

>

>   - semihosting re-factor (used in system tests)

>   - aarch64 and alpha system tests

>   - editorconfig tweak for .S

>   - some docker image updates

>   - iotests clean-up and make check inclusion

>


Hi; this fails 'make check' on the clang sanitiser build for Linux x86-64.
It looks like the code in qemu-imo-cmds.c is incorrectly doing
a division-by-zero if the operation it is reporting on took
less than a second...

make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/clang'
/home/petmay01/linaro/qemu-for-merges/tests/check-block.sh
  TEST    iotest-qcow2: 001
  TEST    iotest-qcow2: 002
  TEST    iotest-qcow2: 003
  TEST    iotest-qcow2: 004
  TEST    iotest-qcow2: 005
  TEST    iotest-qcow2: 007
  TEST    iotest-qcow2: 008
  TEST    iotest-qcow2: 009
  TEST    iotest-qcow2: 010
  TEST    iotest-qcow2: 011
  TEST    iotest-qcow2: 012
--- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/013.out
 2014-12-15 11:11:04.234972929 +0000
+++ /home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/013.out.bad
   2019-05-28 14:06:57.827692927 +010
0
@@ -17596,6 +17596,7 @@

 With offset 0:
 === IO: pattern 0
+/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime
error: division by zero
 read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 4096/4096 bytes at offset 4096
@@ -21994,6 +21995,7 @@
 No errors were found on the image.
 With offset 4294967296:
 === IO: pattern 0
+/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime
error: division by zero
 read 4096/4096 bytes at offset 4294967296
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 4096/4096 bytes at offset 4294971392
  TEST    iotest-qcow2: 013 [fail]
QEMU          --
"/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x8
6_64" -nodefaults -machine accel=qtest
QEMU_IMG      --
"/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../qemu-io"
 --cache writeback -
f qcow2
QEMU_NBD      --
"/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 e104462 4.15.0-48-generic
TEST_DIR      --
/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/scratch
SOCKET_SCM_HELPER --
/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/socket_scm_helper

--- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/013.out
 2014-12-15 11:11:04.234972929 +0000
+++ /home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/013.out.bad
   2019-05-28 14:06:57.827692927 +0100
@@ -17596,6 +17596,7 @@

 With offset 0:
 === IO: pattern 0
+/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime
error: division by zero
 read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 4096/4096 bytes at offset 4096
@@ -21994,6 +21995,7 @@
 No errors were found on the image.
 With offset 4294967296:
 === IO: pattern 0
+/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime
error: division by zero
 read 4096/4096 bytes at offset 4294967296
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 4096/4096 bytes at offset 4294971392

thanks
-- PMM
Alex Bennée May 28, 2019, 1:47 p.m. UTC | #2
Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 28 May 2019 at 10:49, Alex Bennée <alex.bennee@linaro.org> wrote:

>>

>> The following changes since commit a7b21f6762a2d6ec08106d8a7ccb11829914523f:

>>

>>   Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging (2019-05-24 12:47:49 +0100)

>>

>> are available in the Git repository at:

>>

>>   https://github.com/stsquad/qemu.git tags/pull-testing-next-280519-1

>>

>> for you to fetch changes up to 4a344d91083e351c1c5ac877c0ab215335a1e23d:

>>

>>   tests: Run the iotests during "make check" again (2019-05-28 10:28:51 +0100)

>>

>> ----------------------------------------------------------------

>> Various testing updates

>>

>>   - semihosting re-factor (used in system tests)

>>   - aarch64 and alpha system tests

>>   - editorconfig tweak for .S

>>   - some docker image updates

>>   - iotests clean-up and make check inclusion

>>

>

> Hi; this fails 'make check' on the clang sanitiser build for Linux x86-64.

> It looks like the code in qemu-imo-cmds.c is incorrectly doing

> a division-by-zero if the operation it is reporting on took

> less than a second...


Sounds like we should include the sanitizer build in our normal setup.
We currently only do:

  ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread
  -fuse-ld=gold"

with gcc-7. What are the clang configure runes you are using?

>

> make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/clang'

> /home/petmay01/linaro/qemu-for-merges/tests/check-block.sh

>   TEST    iotest-qcow2: 001

>   TEST    iotest-qcow2: 002

>   TEST    iotest-qcow2: 003

>   TEST    iotest-qcow2: 004

>   TEST    iotest-qcow2: 005

>   TEST    iotest-qcow2: 007

>   TEST    iotest-qcow2: 008

>   TEST    iotest-qcow2: 009

>   TEST    iotest-qcow2: 010

>   TEST    iotest-qcow2: 011

>   TEST    iotest-qcow2: 012

> --- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/013.out

>  2014-12-15 11:11:04.234972929 +0000

> +++ /home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/013.out.bad

>    2019-05-28 14:06:57.827692927 +010

> 0

> @@ -17596,6 +17596,7 @@

>

>  With offset 0:

>  === IO: pattern 0

> +/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime

> error: division by zero

>  read 4096/4096 bytes at offset 0

>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

>  read 4096/4096 bytes at offset 4096

> @@ -21994,6 +21995,7 @@

>  No errors were found on the image.

>  With offset 4294967296:

>  === IO: pattern 0

> +/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime

> error: division by zero

>  read 4096/4096 bytes at offset 4294967296

>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

>  read 4096/4096 bytes at offset 4294971392

>   TEST    iotest-qcow2: 013 [fail]

> QEMU          --

> "/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x8

> 6_64" -nodefaults -machine accel=qtest

> QEMU_IMG      --

> "/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../qemu-img"

> QEMU_IO       --

> "/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../qemu-io"

>  --cache writeback -

> f qcow2

> QEMU_NBD      --

> "/home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/../../qemu-nbd"

> IMGFMT        -- qcow2 (compat=1.1)

> IMGPROTO      -- file

> PLATFORM      -- Linux/x86_64 e104462 4.15.0-48-generic

> TEST_DIR      --

> /home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/scratch

> SOCKET_SCM_HELPER --

> /home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/socket_scm_helper

>

> --- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/013.out

>  2014-12-15 11:11:04.234972929 +0000

> +++ /home/petmay01/linaro/qemu-for-merges/build/clang/tests/qemu-iotests/013.out.bad

>    2019-05-28 14:06:57.827692927 +0100

> @@ -17596,6 +17596,7 @@

>

>  With offset 0:

>  === IO: pattern 0

> +/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime

> error: division by zero

>  read 4096/4096 bytes at offset 0

>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

>  read 4096/4096 bytes at offset 4096

> @@ -21994,6 +21995,7 @@

>  No errors were found on the image.

>  With offset 4294967296:

>  === IO: pattern 0

> +/home/petmay01/linaro/qemu-for-merges/qemu-io-cmds.c:264:18: runtime

> error: division by zero

>  read 4096/4096 bytes at offset 4294967296

>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

>  read 4096/4096 bytes at offset 4294971392

>

> thanks

> -- PMM



--
Alex Bennée
Peter Maydell May 28, 2019, 2:02 p.m. UTC | #3
On Tue, 28 May 2019 at 14:47, Alex Bennée <alex.bennee@linaro.org> wrote:
> Sounds like we should include the sanitizer build in our normal setup.

> We currently only do:

>

>   ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread

>   -fuse-ld=gold"

>

> with gcc-7. What are the clang configure runes you are using?


I use
'../../configure' '--cc=clang' '--cxx=clang++' '--enable-gtk'
'--extra-cflags=-fsanitize=undefined  -fno-sanitize=shift-base
-Werror'

(which we document at https://wiki.qemu.org/Testing#clang_UBSan)

thanks
-- PMM
Alex Bennée May 28, 2019, 3:09 p.m. UTC | #4
Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 28 May 2019 at 14:47, Alex Bennée <alex.bennee@linaro.org> wrote:

>> Sounds like we should include the sanitizer build in our normal setup.

>> We currently only do:

>>

>>   ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread

>>   -fuse-ld=gold"

>>

>> with gcc-7. What are the clang configure runes you are using?

>

> I use

> '../../configure' '--cc=clang' '--cxx=clang++' '--enable-gtk'

> '--extra-cflags=-fsanitize=undefined  -fno-sanitize=shift-base

> -Werror'


OK - I'll drop the final patch for now and respin and include it the next testing/next

>

> (which we document at https://wiki.qemu.org/Testing#clang_UBSan)

>

> thanks

> -- PMM



--
Alex Bennée
Paolo Bonzini May 30, 2019, 3:14 p.m. UTC | #5
On 28/05/19 16:02, Peter Maydell wrote:
> On Tue, 28 May 2019 at 14:47, Alex Bennée <alex.bennee@linaro.org> wrote:

>> Sounds like we should include the sanitizer build in our normal setup.

>> We currently only do:

>>

>>   ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread

>>   -fuse-ld=gold"

>>

>> with gcc-7. What are the clang configure runes you are using?

> 

> I use

> '../../configure' '--cc=clang' '--cxx=clang++' '--enable-gtk'

> '--extra-cflags=-fsanitize=undefined  -fno-sanitize=shift-base

> -Werror'

> 

> (which we document at https://wiki.qemu.org/Testing#clang_UBSan)


Oh, so this is ubsan!  It is not covered by Patchew, which however found
some issues in the Address Sanitizer build that were uncovered by
check-block.

Logs are available at
https://patchew.org/logs/20190530101603.22254-1-alex.bennee@linaro.org/testing.asan/?type=message.

Paolo