[Qemu-devel] [PATCH RFC 0/7] Proof of concept to power up "make test" with docker

Fam Zheng posted 7 patches 6 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170908091700.14867-1-famz@redhat.com
Test checkpatch failed
Test docker passed
Test s390x passed
Makefile                                          | 21 ++++---
configure                                         |  2 +-
scripts/create_config                             |  2 +-
tests/Makefile.include                            |  3 +-
tests/docker/docker.py                            | 23 +++++++
tests/docker/dockerfiles/fedora-i386-cross.docker | 13 ++++
tests/tcg/Makefile                                | 60 ------------------
tests/tcg/Makefile.include                        | 75 +++++++++++++++++++++++
tests/tcg/hello-i386.c                            |  1 +
tests/tcg/linux-test.c                            | 67 +++++++-------------
10 files changed, 149 insertions(+), 118 deletions(-)
create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker
create mode 100644 tests/tcg/Makefile.include
[Qemu-devel] [PATCH RFC 0/7] Proof of concept to power up "make test" with docker
Posted by Fam Zheng 6 years, 7 months ago
Recently it was brought up that "make test" is in an orphaned state, and making
it work would be a good thing because it has valuable test coverage for tcg:

https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg04978.html

This RFC is an attempt to use docker to cross build the test binaries that will
be run by qemu-user and meanwhile rename it from "make test" to "make
check-tcg" to align with the naming convention of other test targets we have.

As the initial version only i386 is converted, not because it's easy, but
because it is a test set that covers the most types of rules we will need
(cross-build, run and compare result).

After these patches, "make check-tcg" will do the i386 tests with the new
rules first (which fails but that's out of the scope of this series), then
continue to do the old "make -C tests/tcg test" command. Once all tests are
moved into the new Makefile.include file, the old Makefile can be dropped.

Fam Zheng (7):
  Makefile: Rename TARGET_DIRS to TARGET_LIST
  docker: Add "cc" subcommand
  docker: Add fedora-i386-cross image
  tests: Build fix for hello-i386
  tests: Build fix for linux-test
  buildsys: Add "check-tcg" target
  tests: Move i386 tcg tests to check-tcg

 Makefile                                          | 21 ++++---
 configure                                         |  2 +-
 scripts/create_config                             |  2 +-
 tests/Makefile.include                            |  3 +-
 tests/docker/docker.py                            | 23 +++++++
 tests/docker/dockerfiles/fedora-i386-cross.docker | 13 ++++
 tests/tcg/Makefile                                | 60 ------------------
 tests/tcg/Makefile.include                        | 75 +++++++++++++++++++++++
 tests/tcg/hello-i386.c                            |  1 +
 tests/tcg/linux-test.c                            | 67 +++++++-------------
 10 files changed, 149 insertions(+), 118 deletions(-)
 create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker
 create mode 100644 tests/tcg/Makefile.include

-- 
2.13.5


Re: [Qemu-devel] [PATCH RFC 0/7] Proof of concept to power up "make test" with docker
Posted by no-reply@patchew.org 6 years, 7 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH RFC 0/7] Proof of concept to power up "make test" with docker
Message-id: 20170908091700.14867-1-famz@redhat.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20170908091700.14867-1-famz@redhat.com -> patchew/20170908091700.14867-1-famz@redhat.com
 t [tag update]            patchew/cover.1504228916.git.alistair.francis@xilinx.com -> patchew/cover.1504228916.git.alistair.francis@xilinx.com
Switched to a new branch 'test'
0c7a642a86 tests: Move i386 tcg tests to check-tcg
44226ca4fd buildsys: Add "check-tcg" target
e670c4e114 tests: Build fix for linux-test
09fbbd7842 tests: Build fix for hello-i386
0546399a8a docker: Add fedora-i386-cross image
5a8cd21a02 docker: Add "cc" subcommand
89d4346f6e Makefile: Rename TARGET_DIRS to TARGET_LIST

=== OUTPUT BEGIN ===
Checking PATCH 1/7: Makefile: Rename TARGET_DIRS to TARGET_LIST...
Checking PATCH 2/7: docker: Add "cc" subcommand...
Checking PATCH 3/7: docker: Add fedora-i386-cross image...
Checking PATCH 4/7: tests: Build fix for hello-i386...
ERROR: externs should be avoided in .c files
#20: FILE: tests/tcg/hello-i386.c:23:
+void _start(void);

total: 1 errors, 0 warnings, 7 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 5/7: tests: Build fix for linux-test...
ERROR: if this code is redundant consider removing it
#141: FILE: tests/tcg/linux-test.c:326:
+#if 0

total: 1 errors, 0 warnings, 179 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 6/7: buildsys: Add "check-tcg" target...
Checking PATCH 7/7: tests: Move i386 tcg tests to check-tcg...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org