aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2020-11-18meson: Fix argument for makensis (build regression)Stefan Weil
`make installer` with a DLL directory was broken. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-Id: <20201117190640.390359-1-sw@weilnetz.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-11-15nomaintainer: Fix Lesser GPL version numberChetan Pant
There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section. This patch contains all the files, whose maintainer I could not get from ‘get_maintainer.pl’ script. Signed-off-by: Chetan Pant <chetan4windows@gmail.com> Message-Id: <20201023124424.20177-1-chetan4windows@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Adapted exec.c and qdev-monitor.c to new location] Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-11-15overall/alpha tcg cpus|hppa: Fix Lesser GPL version numberChetan Pant
There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section. Signed-off-by: Chetan Pant <chetan4windows@gmail.com> Message-Id: <20201023123353.19796-1-chetan4windows@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-11-11scripts/tracetool: silence SystemTap dtrace(1) long long warningsStefan Hajnoczi
SystemTap's dtrace(1) prints the following warning when it encounters long long arguments: Warning: /usr/bin/dtrace:trace/trace-dtrace-hw_virtio.dtrace:76: syntax error near: probe vhost_vdpa_dev_start Warning: Proceeding as if --no-pyparsing was given. Use the uint64_t and int64_t types, respectively. This works with all host CPU 32- and 64-bit data models (ILP32, LP64, and LLP64) that QEMU supports. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201020094043.159935-1-stefanha@redhat.com Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-11-10scripts/oss-fuzz: give all fuzzers -target namesAlexander Bulekov
We switched to hardlinks in a942f64cc4 ("scripts/oss-fuzz: use hardlinks instead of copying") The motivation was to conserve space (50 fuzzers built with ASAN, can weigh close to 9 GB). Unfortunately, OSS-Fuzz (partially) treated the underlying copy of the fuzzer as a standalone fuzzer. To attempt to fix, we tried: f8b8f37463 ("scripts/oss-fuzz: rename bin/qemu-fuzz-i386") This was also not a complete fix, because though OSS-Fuzz ignores the renamed fuzzer, the underlying ClusterFuzz, doesn't: https://storage.googleapis.com/clusterfuzz-builds/qemu/targets.list.address https://oss-fuzz-build-logs.storage.googleapis.com/log-9bfb55f9-1c20-4aa6-a49c-ede12864eeb2.txt (clusterfuzz still lists qemu-fuzz-i386.base as a fuzzer) This change keeps the hard-links, but makes them all point to a file with a qemu-fuzz-i386-target-.. name. If we have targets, A, B, C, the result will be: qemu-fuzz-i386-target-A (base file) qemu-fuzz-i386-target-B -> qemu-fuzz-i386-target-A qemu-fuzz-i386-target-C -> qemu-fuzz-i386-target-A The result should be that every file that looks like a fuzzer to OSS-Fuzz/ClusterFuzz, can run as a fuzzer (we don't have a separate base copy). Unfortunately, there is not simple way to test this locally. In the future, it might be worth it to link the majority of QEMU in as a shared-object (see https://github.com/google/oss-fuzz/issues/4575 ) Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20201108171136.160607-1-alxndr@bu.edu> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-11-09device-crash-test: Check if path is actually an executable fileEduardo Habkost
After the transition to Meson, the build directory now have subdirectories named "qemu-system-*.p", and device-crash-test will try to execute them as if they were binaries. This results in errors like: PermissionError: [Errno 13] Permission denied: './qemu-system-or1k.p' When generating the default list of binaries to test, check if the path is actually a file and if it's executable. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20201026125238.2752882-1-ehabkost@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-11-03scripts/oss-fuzz: rename bin/qemu-fuzz-i386Alexander Bulekov
OSS-Fuzz changed the way it scans for fuzzers in $DEST_DIR. The new code also scans subdirectories for fuzzers. This means that OSS-Fuzz is considering bin/qemu-fuzz-i386 as an independent fuzzer (it is not - it requires a --fuzz-target argument). This has led to coverage-build failures and false crash reports. To work around this, we take advantage of OSS-Fuzz' filename extension check - OSS-Fuzz will not run anything that has an extension that is not ".exe": https://github.com/google/oss-fuzz/blob/master/infra/utils.py#L115 Reported-by: OSS-Fuzz (Issue 26725) Reported-by: OSS-Fuzz (Issue 26679) Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20201101212245.185819-1-alxndr@bu.edu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-11-02scripts/kerneldoc: For Sphinx 3 use c:macro for macros with argumentsPeter Maydell
The kerneldoc script currently emits Sphinx markup for a macro with arguments that uses the c:function directive. This is correct for Sphinx versions earlier than Sphinx 3, where c:macro doesn't allow documentation of macros with arguments and c:function is not picky about the syntax of what it is passed. However, in Sphinx 3 the c:macro directive was enhanced to support macros with arguments, and c:function was made more picky about what syntax it accepted. When kerneldoc is told that it needs to produce output for Sphinx 3 or later, make it emit c:function only for functions and c:macro for macros with arguments. We assume that anything with a return type is a function and anything without is a macro. This fixes the Sphinx error: /home/petmay01/linaro/qemu-from-laptop/qemu/docs/../include/qom/object.h:155:Error in declarator If declarator-id with parameters (e.g., 'void f(int arg)'): Invalid C declaration: Expected identifier in nested name. [error at 25] DECLARE_INSTANCE_CHECKER ( InstanceType, OBJ_NAME, TYPENAME) -------------------------^ If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'): Error in declarator or parameters Invalid C declaration: Expecting "(" in parameters. [error at 39] DECLARE_INSTANCE_CHECKER ( InstanceType, OBJ_NAME, TYPENAME) ---------------------------------------^ Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20201030174700.7204-2-peter.maydell@linaro.org
2020-11-01update-linux-headers: Add vfio_zdev.hMatthew Rosato
vfio_zdev.h is used by s390x zPCI support to pass device-specific CLP information between host and userspace. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2020-10-29Merge remote-tracking branch 'remotes/armbru/tags/pull-qmp-2020-10-27' into ↵Peter Maydell
staging QMP patches patches for 2020-10-27 # gpg: Signature made Tue 27 Oct 2020 10:13:00 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qmp-2020-10-27: scripts/qmp: delete 'qmp' script qmp-shell: Sort by key when pretty-printing Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-10-28Merge remote-tracking branch ↵Peter Maydell
'remotes/stsquad/tags/pull-testing-and-misc-271020-1' into staging Testing and gitdm updates - add some more individual contributors - include SDL2 in centos images - skip checkpatch check when no commits found - use random port for gdb reverse debugging - make gitlab use it's own mirrors to clone - fix detection of make -nqp # gpg: Signature made Tue 27 Oct 2020 09:55:55 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-and-misc-271020-1: makefile: handle -n / -k / -q correctly gitlab-ci: Clone from GitLab itself tests/acceptance: pick a random gdb port for reverse debugging scripts: fix error from checkpatch.pl when no commits are found gitlab: skip checkpatch.pl checks if no commit delta on branch tests/docker/dockerfiles/centos: Use SDL2 instead of SDL1 contrib/gitdm: Add more individual contributors Adding ani's email as an individual contributor Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-10-28Merge remote-tracking branch ↵Peter Maydell
'remotes/vivier2/tags/linux-user-for-5.2-pull-request' into staging Update syscall numbers to 5.9-rc7 Fixes for prctl(), accept4() and xtensa # gpg: Signature made Mon 26 Oct 2020 22:02:56 GMT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-5.2-pull-request: target/xtensa: enable all coprocessors for linux-user linux-user: correct errno returned from accept4() syscall linux-user: remove _sysctl linux-user: update syscall.tbl to Linux 5.9-rc7 linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7 linux-user: update syscall_nr.h to Linux 5.9-rc7 linux-user: Support f_flags in statfs64 when available. Fix stack smashing when handling PR_GET_PDEATHSIG Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-10-27Merge remote-tracking branch ↵Peter Maydell
'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging Pull request v2: * Fix Anthony Perard's email address [Philippe] # gpg: Signature made Mon 26 Oct 2020 17:04:57 GMT # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha-gitlab/tags/tracing-pull-request: Add execute bit back to scripts/tracetool.py trace/simple: Enable tracing on startup only if the user specifies a trace option Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-10-27scripts/qmp: delete 'qmp' scriptJohn Snow
This script has not seen a patch that was specifically for this script since it was moved to this location in 2013, and I doubt it is used. It uses "man qmp" for its help message, which does not exist. It also presumes there is a manual page for qmp-XXX, for each defined qmp command XXX. I don't think that's true. The format it expects arguments in is something like: block-dirty-bitmap-add --node=foo --name=bar and has no capacity to support nested JSON arguments, either. Most developers use either qmp-shell or socat (or pasting JSON directly into qmp stdio), so this duplication and additional alternate syntax is not helpful. Remove it. Leave a breadcrumb script just in case, to be removed next release cycle. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20201019210430.1063390-1-jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-27qmp-shell: Sort by key when pretty-printingDavid Edmondson
If the user selects pretty-printing (-p) the contents of any dictionaries in the output are sorted by key. Signed-off-by: David Edmondson <david.edmondson@oracle.com> Message-Id: <20201013141414.18398-1-david.edmondson@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-27scripts: fix error from checkpatch.pl when no commits are foundDaniel P. Berrangé
The error message was supposed to mention the input revision list start point, not the branch flag. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201019143537.283094-3-berrange@redhat.com> Message-Id: <20201021163136.27324-6-alex.bennee@linaro.org>
2020-10-26Add execute bit back to scripts/tracetool.pyAnthony PERARD
Commit a81df1b68b65 ("libqemuutil, qapi, trace: convert to meson") removed it without explanation and it is useful to be able to run a script without having to figure out which interpreter to use. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200923103620.1980151-1-anthony.perard@citrix.com>
2020-10-26Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ↵Peter Maydell
staging * fix --disable-tcg builds (Claudio) * Fixes for macOS --enable-modules build and OpenBSD curses/iconv detection (myself) * Start preparing for meson 0.56 (myself) * Move directory configuration to meson (myself) * Start untangling qemu_init (myself) * Windows fixes (Sunil) * Remove -no-kbm (Thomas) # gpg: Signature made Mon 26 Oct 2020 11:12:17 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: machine: move SMP initialization from vl.c machine: move UP defaults to class_base_init machine: remove deprecated -machine enforce-config-section option win32: boot broken when bind & data dir are the same WHPX: Fix WHPX build break configure: move install_blobs from configure to meson configure: remove unused variable from config-host.mak configure: move directory options from config-host.mak to meson configure: allow configuring localedir Makefile: separate meson rerun from the rest of the ninja invocation Remove deprecated -no-kvm option replay: do not build if TCG is not available qtest: unbreak non-TCG builds in bios-tables-test hw/core/qdev-clock: add a reference on aliased clocks do not use colons in test names meson: rewrite curses/iconv test build: fix macOS --enable-modules build Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-10-26linux-user: update syscall_nr.h to Linux 5.9-rc7Laurent Vivier
Update gensyscalls.sh not to generate an empty line at the end of the file And then automatically update syscall_nr.h running scripts/gensyscalls.sh Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930003033.554124-2-laurent@vivier.eu> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-10-26scripts/oss-fuzz: ignore the generic-fuzz targetAlexander Bulekov
generic-fuzz is not a standalone fuzzer - it requires some env variables to be set. On oss-fuzz, we set these with some predefined generic-fuzz-{...} targets, that are thin wrappers around generic-fuzz. Do not make a link for the generic-fuzz from the oss-fuzz build, so oss-fuzz does not treat it as a standalone fuzzer. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20201023150746.107063-18-alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> [thuth: Reformatted one comment to stay within the 80 columns limit] Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-26scripts/oss-fuzz: use hardlinks instead of copyingAlexander Bulekov
Prior to this, fuzzers in the output oss-fuzz directory were exactly the same executable, with a different name to do argv[0]-based fuzz-target selection. This is a waste of space, especially since these binaries can weigh many MB. Instead of copying, use hard links, to cut down on wasted space. We need to place the primary copy of the executable into DEST_DIR, since this is a separate file-system on oss-fuzz. We should not place it directly into $DEST_DIR, since oss-fuzz will treat it as an independent fuzzer and try to run it for fuzzing. Instead, we create a DEST_DIR/bin directory to store the primary copy. Suggested-by: Darren Kenny <darren.kenny@oracle.com> Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20201023150746.107063-17-alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-26scripts/oss-fuzz: Add crash trace minimization scriptAlexander Bulekov
Once we find a crash, we can convert it into a QTest trace. Usually this trace will contain many operations that are unneeded to reproduce the crash. This script tries to minimize the crashing trace, by removing operations and trimming QTest bufwrite(write addr len data...) commands. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20201023150746.107063-12-alxndr@bu.edu> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-26scripts/oss-fuzz: Add script to reorder a generic-fuzzer traceAlexander Bulekov
The generic-fuzzer uses hooks to fulfill DMA requests just-in-time. This means that if we try to use QTEST_LOG=1 to build a reproducer, the DMA writes will be logged _after_ the in/out/read/write that triggered the DMA read. To work work around this, the generic-fuzzer annotates these just-in time DMA fulfilments with a tag that we can use to discern them. This script simply iterates over a raw qtest trace (including log messages, errors, timestamps etc), filters it and re-orders it so that DMA fulfillments are placed directly _before_ the qtest command that will cause the DMA access. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20201023150746.107063-11-alxndr@bu.edu> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-22build: fix macOS --enable-modules buildPaolo Bonzini
Apple's nm implementation includes empty lines in the output that are not found in GNU binutils. This confuses scripts/undefsym.py, though it did not confuse the scripts/undefsym.sh script that it replaced. To fix this, ignore lines that do not have two fields. Reported-by: Emmanuel Blot <eblot.ml@gmail.com> Tested-by: Emmanuel Blot <eblot.ml@gmail.com> Fixes: 604f3e4e90 ("meson: Convert undefsym.sh to undefsym.py", 2020-09-08) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-20decodetree: Fix codegen for non-overlapping group inside overlapping groupPeter Maydell
For nested groups like: { [ pattern 1 pattern 2 ] pattern 3 } the intended behaviour is that patterns 1 and 2 must not overlap with each other; if the insn matches neither then we fall through to pattern 3 as the next thing in the outer overlapping group. Currently we generate incorrect code for this situation, because in the code path for a failed match inside the inner non-overlapping group we generate a "return" statement, which causes decode to stop entirely rather than continuing to the next thing in the outer group. Generate a "break" instead, so that decode flow behaves as required for this nested group case. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20201019151301.2046-2-peter.maydell@linaro.org
2020-10-17build: replace ninjatool with ninjaPaolo Bonzini
Now that the build is done entirely by Meson, there is no need to keep the Makefile conversion. Instead, we can ask Ninja about the targets it exposes and forward them. The main advantages are, from smallest to largest: - reducing the possible namespace pollution within the Makefile - removal of a relatively large Python program - faster build because parsing Makefile.ninja is slower than parsing build.ninja; and faster build after Meson runs because we do not have to generate Makefile.ninja. - tracking of command lines, which provides more accurate rebuilds In addition the change removes the requirement for GNU make 3.82, which was annoying on Mac, and avoids bugs on Windows due to ninjatool not knowing how to convert Windows escapes to POSIX escapes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-13Merge remote-tracking branch ↵Peter Maydell
'remotes/huth-gitlab/tags/pull-request-2020-10-13' into staging * qtest improvements (test for crash found with the fuzzer, increase downtime in migration test, less verbose output when running w/o KVM) * Improve handling of acceptance tests in the Gitlab-CI * Run checkpatch.pl in the Gitlab-CI * Improve the gitlab-pipeline-status script * Misc patches (mark 'moxie' as deprecated, remove stale .gitignore files, ...) # gpg: Signature made Tue 13 Oct 2020 11:49:06 BST # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2020-10-13: (23 commits) scripts/ci/gitlab-pipeline-status: wait for pipeline creation scripts/ci/gitlab-pipeline-status: use more descriptive exceptions scripts/ci/gitlab-pipeline-status: handle keyboard interrupts scripts/ci/gitlab-pipeline-status: refactor parser creation scripts/ci/gitlab-pipeline-status: give early feedback on running pipelines scripts/ci/gitlab-pipeline-status: improve message regarding timeout scripts/ci/gitlab-pipeline-status: make branch name configurable gitlab: assign python helper files to GitLab maintainers section gitlab: add a CI job to validate the DCO sign off gitlab: add a CI job for running checkpatch.pl configure: fixes indent of $meson setup docs/system/deprecated: Mark the 'moxie' CPU as deprecated Remove superfluous .gitignore files MAINTAINERS: Ignore bios-tables-test in the qtest section Add a comment in bios-tables-test.c to clarify the reason behind approach softmmu/vl: Be less verbose about missing KVM when running the qtests tests/migration: Allow longer timeouts qtest: add fuzz test case Acceptance tests: show test report on GitLab CI Acceptance tests: do not show canceled test logs on GitLab CI ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-10-13scripts/ci/gitlab-pipeline-status: wait for pipeline creationCleber Rosa
When called in wait mode, this script will also wait for the pipeline to be get to a "running" state. Because many more status may be seen until a pipeline gets to "running", and those need to be handle too. Reference: https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-8-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: use more descriptive exceptionsCleber Rosa
For two very different error conditions. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-7-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: handle keyboard interruptsCleber Rosa
So that exits based on user requests are handled more gracefully. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-6-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: refactor parser creationCleber Rosa
Out of the main function. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-5-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: give early feedback on running pipelinesCleber Rosa
When waiting for a pipeline to run and finish, it's better to give early feedback, and then sleep and wait, than the other wait around. Specially for the first iteration, it's frustrating to see nothing while the script is sleeping. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-4-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: improve message regarding timeoutCleber Rosa
The script has its own timeout, which is about how long the script will wait (when called with --wait) for the pipeline to complete, and not necessarily for the pipeline to complete. Hopefully this new wording will be clearer. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-3-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: make branch name configurableCleber Rosa
With the utility function `get_local_staging_branch_commit()`, the name of the branch is hard coded (including in the function name). For extensibility reasons, let's make that configurable. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-2-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-12build-sys: fix git version from -versionMarc-André Lureau
Typo introduced with the script. Fixes: 2c273f32d3 ("meson: generate qemu-version.h") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reported-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200929143654.518157-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-12qom: fix objects with improper parent typePaolo Bonzini
Some objects accidentally inherit ObjectClass instead of Object. They compile silently but may crash after downcasting. In this patch, we introduce a coccinelle script to find broken declarations and fix them manually with proper base type. Signed-off-by: Sergey Nizovtsev <snizovtsev@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-10qapi/visit.py: add type hint annotationsJohn Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-37-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/visit.py: remove unused parameters from gen_visit_objectJohn Snow
And this fixes the pylint report for this file, so make sure we check this in the future, too. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201009161558.107041-36-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/visit.py: assert tag_member contains a QAPISchemaEnumTypeJohn Snow
This is true by design, but not presently able to be expressed in the type system. An assertion helps mypy understand our constraints. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-35-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/types.py: remove one-letter variablesJohn Snow
"John, if pylint told you to jump off a bridge, would you?" Hey, if it looked like fun, I might. Now that this file is clean, enable pylint checks on this file. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-34-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/types.py: add type hint annotationsJohn Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-33-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/gen.py: delint with pylintJohn Snow
'fp' and 'fd' are self-evident in context, add them to the list of OK names. _top and _bottom also need to stay standard methods because some users override the method and need to use `self`. Tell pylint to shush. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-32-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/gen.py: update write() to be more idiomaticJohn Snow
Make the file handling here just a tiny bit more idiomatic. (I realize this is heavily subjective.) Use exist_ok=True for os.makedirs and remove the exception, use fdopen() to wrap the file descriptor in a File-like object, and use a context manager for managing the file pointer. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201009161558.107041-31-jsnow@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/gen.py: Remove unused parameterJohn Snow
_module_dirname doesn't use the 'what' argument, so remove it. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-30-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/gen.py: add type hint annotationsJohn Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-28-jsnow@redhat.com> Message-Id: <20201009161558.107041-29-jsnow@redhat.com> [mypy.ini update squashed in] Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/gen: Make _is_user_module() return boolJohn Snow
_is_user_module() returns thruth values. The next commit wants it to return bool. Make it so. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201009161558.107041-27-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message rewritten] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/source.py: delint with pylintJohn Snow
Shush an error and leave a hint for future cleanups when we're allowed to use Python 3.7+. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-26-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/source.py: add type hint annotationsJohn Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. A note on typing of __init__: mypy requires init functions with no parameters to document a return type of None to be considered fully typed. In the case when there are input parameters, None may be omitted. Since __init__ may never return any value, it is preferred to omit the return annotation whenever possible. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-25-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/commands.py: add type hint annotationsJohn Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009161558.107041-23-jsnow@redhat.com> Message-Id: <20201009161558.107041-24-jsnow@redhat.com> [mypy.ini update squashed in] Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-10-10qapi/commands.py: Don't re-bind to variable of different typeJohn Snow
Mypy isn't a fan of rebinding a variable with a new data type. It's easy enough to avoid. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201009161558.107041-22-jsnow@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>