mbox series

[v8,00/13] tests: Add VM based build tests (for non-x86_64 and/or non-Linux)

Message ID 20170918024402.3265-1-famz@redhat.com
Headers show
Series tests: Add VM based build tests (for non-x86_64 and/or non-Linux) | expand

Message

Fam Zheng Sept. 18, 2017, 2:43 a.m. UTC
v8: Fix typo in code "od" => "os".
    QEMU to listen on 127.0.0.1 to be more secure.
    Update README.

v7: Add Alex's rev-by to patch 2.
    GPLv2 => GPLv2+ for all new files. [Peter]
    Add more description in file header to archive-source.sh for the intended
    usage.  [Peter]
    "output tarball" in usage. [Alex]
    Add quotes to "$1". [Peter]
    Put generated keys in separate files. [Alex]
    Use os.devnull. [Alex]
    More error info when launching QEMU fails. [Alex]

v6: Add license to new file. [Philippe]
    Change tests/.gitignore. [Philippe]

v5: Generate source tar file with a script.
    Fix tmpdir, use pwd.
    Reduce default -j to half cores.

v4: Drop unused imports and parameters. [Cleber]
    Use --exclude-vcs (still no --exclude-vcs-ignores because it's too new). [Philippe]
    Use gtar if available. [Philippe, Kamil]
    /dev/ld1a -> /dev/rld1a for netbsd. [Kamil]
    Only use '-enable-kvm' if /dev/kvm is there. [Kamil]
    Grammar fixes of README. [Stefan]
    Rename image on the server to include version and arch. [Kamil]
    Just ignore *.tmp. [Philippe]

v3: Drop RFC.
    Add Stefan's and Kamil's reviewed-bys.
    Use optparse. [Stefan]
    Drop the VGA patch. [Paolo, Stefan]
    Improve exit/exit code/doc. [Stefan]
    Drop unused line from basevm.py. [Stefan]
    Drop "--target-list" form Makefile.
    More intelligent '-j'.
    Add README. [Stefan]

v2: - Add docstring. [Stefan]
    - Call self._load_io_lod. [Stefan]
    - Use "info usernet" and dynamic ssh_port forwarding. [Stefan]
    - Add image checksum.
    - Use os.rename() and os.makedirs(). [Stefan]
    - Fix NetBSD URL. [Kamil]

Build tests in one 32 bit Linux guest and three BSD images are defined in this
series. This is a more managable way than the manually maintained virtual
machines in patchew. Also, one big advantage of ephemeral VMs over long running
guests is the reduced RAM usage of host, which makes it possible to have one
host test all these BSD variants and probably more.

The BSD guest templates are manually prepared following

https://wiki.qemu.org/Hosts/BSD

as it is not easy to automate. (The ideal approach is like the ubuntu.i386
script, which configures the guest on top of an official released image, fully
automatically.)

Need for help: "gmake check" in the added OpenBSD image fails with -ENOMEM
errors, even if I change "-m 2G" to "-m 8G" when starting VM. Ideas? And there
is a warning from ./configure about OpenBSD going to be unsupported in coming
releases, is it still the case?

Fam

Fam Zheng (13):
  gitignore: Ignore vm test images
  qemu.py: Add "wait()" method
  scripts: Add archive-source.sh
  tests: Add a test key pair
  tests: Add vm test lib
  tests: Add ubuntu.i386 image
  tests: Add FreeBSD image
  tests: Add NetBSD image
  tests: Add OpenBSD image
  Makefile: Add rules to run vm tests
  MAINTAINERS: Add tests/vm entry
  tests: Add README for vm tests
  docker: Use archive-source.py

 .gitignore                    |   1 +
 MAINTAINERS                   |   1 +
 Makefile                      |   2 +
 configure                     |   2 +-
 scripts/archive-source.sh     |  33 ++++++
 scripts/qemu.py               |   7 ++
 tests/.gitignore              |   1 +
 tests/docker/Makefile.include |  15 +--
 tests/docker/run              |   8 +-
 tests/keys/id_rsa             |  27 +++++
 tests/keys/id_rsa.pub         |   1 +
 tests/vm/Makefile.include     |  42 +++++++
 tests/vm/README               |  85 ++++++++++++++
 tests/vm/basevm.py            | 256 ++++++++++++++++++++++++++++++++++++++++++
 tests/vm/freebsd              |  42 +++++++
 tests/vm/netbsd               |  42 +++++++
 tests/vm/openbsd              |  43 +++++++
 tests/vm/ubuntu.i386          |  88 +++++++++++++++
 18 files changed, 675 insertions(+), 21 deletions(-)
 create mode 100755 scripts/archive-source.sh
 create mode 100644 tests/keys/id_rsa
 create mode 100644 tests/keys/id_rsa.pub
 create mode 100644 tests/vm/Makefile.include
 create mode 100644 tests/vm/README
 create mode 100755 tests/vm/basevm.py
 create mode 100755 tests/vm/freebsd
 create mode 100755 tests/vm/netbsd
 create mode 100755 tests/vm/openbsd
 create mode 100755 tests/vm/ubuntu.i386

Comments

no-reply@patchew.org Sept. 18, 2017, 3:09 a.m. UTC | #1
Hi,

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

Subject: [Qemu-devel] [PATCH v8 00/13] tests: Add VM based build tests (for non-x86_64 and/or non-Linux)
Message-id: 20170918024402.3265-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
Switched to a new branch 'test'
eada89cb49 docker: Use archive-source.py
edb516101b tests: Add README for vm tests
29ab56eed6 MAINTAINERS: Add tests/vm entry
91bbe52a91 Makefile: Add rules to run vm tests
850be050ce tests: Add OpenBSD image
793d0cde6b tests: Add NetBSD image
4fcfdb2879 tests: Add FreeBSD image
0186cba9b3 tests: Add ubuntu.i386 image
2cc2c41291 tests: Add vm test lib
c6a859d5de tests: Add a test key pair
ffc8ca2de4 scripts: Add archive-source.sh
0df34534b9 qemu.py: Add "wait()" method
7ed9b96668 gitignore: Ignore vm test images

=== OUTPUT BEGIN ===
Checking PATCH 1/13: gitignore: Ignore vm test images...
Checking PATCH 2/13: qemu.py: Add "wait()" method...
Checking PATCH 3/13: scripts: Add archive-source.sh...
Checking PATCH 4/13: tests: Add a test key pair...
Checking PATCH 5/13: tests: Add vm test lib...
WARNING: line over 80 characters
#71: FILE: tests/vm/basevm.py:46:
+        self._tmpdir = tempfile.mkdtemp(prefix="vm-test-", suffix=".tmp", dir=".")

WARNING: line over 80 characters
#162: FILE: tests/vm/basevm.py:137:
+        logging.debug("Creating archive %s for src_dir dir: %s", tarfile, src_dir)

WARNING: line over 80 characters
#167: FILE: tests/vm/basevm.py:142:
+                            "file=%s,if=none,id=%s,cache=writeback,format=raw" % \

WARNING: line over 80 characters
#170: FILE: tests/vm/basevm.py:145:
+                            "virtio-blk,drive=%s,serial=%s,bootindex=1" % (name, name)]

ERROR: line over 90 characters
#225: FILE: tests/vm/basevm.py:200:
+    VM test utility.  Exit codes: 0 = success, 1 = command line error, 2 = environment initialization failed, 3 = test command failed""")

WARNING: line over 80 characters
#232: FILE: tests/vm/basevm.py:207:
+    parser.add_option("--jobs", type=int, default=multiprocessing.cpu_count() / 2,

total: 1 errors, 5 warnings, 256 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/13: tests: Add ubuntu.i386 image...
Checking PATCH 7/13: tests: Add FreeBSD image...
Checking PATCH 8/13: tests: Add NetBSD image...
Checking PATCH 9/13: tests: Add OpenBSD image...
Checking PATCH 10/13: Makefile: Add rules to run vm tests...
Checking PATCH 11/13: MAINTAINERS: Add tests/vm entry...
Checking PATCH 12/13: tests: Add README for vm tests...
Checking PATCH 13/13: docker: Use archive-source.py...
=== 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