aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2021-09-25qapi: Stop enforcing "type name should not end in 'Kind'Markus Armbruster1-3/+3
I'm about to convert simple unions to flat unions, then drop simple union support. The conversion involves making the implict enum types explicit. To reduce churn, I'd like to name them exactly like the implicit types they replace. However, these names are reserved for the generator's use. They won't be once simple unions are gone. Stop enforcing this naming rule now rather than then. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-3-armbru@redhat.com>
2021-09-15simplebench: add img_bench_templater.pyVladimir Sementsov-Ogievskiy2-0/+157
Add simple grammar-parsing template benchmark. New tool consume test template written in bash with some special grammar injections and produces multiple tests, run them and finally print a performance comparison table of different tests produced from one template. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210824101517.59802-2-vsementsov@virtuozzo.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
2021-09-08qapi: Fix bogus error for 'if': { 'not': '' }Markus Armbruster1-8/+13
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210908045428.2689093-6-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> [check_infix()'s type hint fixed]
2021-09-08qapi: Bury some unused code in class IndentationMarkus Armbruster1-6/+1
.__int__() has never been used. Drop it. .decrease() raises ArithmeticError when asked to decrease indentation level below zero. Nothing catches it. It's a programming error. Dumb down to assert. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210908045428.2689093-4-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-08qapi: Drop Indentation.__bool__()Markus Armbruster1-6/+3
Intentation.__bool__() is not worth its keep: it has just one user, which can just as well check .__str__() instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210908045428.2689093-3-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-08qapi: Fix a botched type annotationMarkus Armbruster1-1/+2
Mypy is unhappy: $ mypy --config-file=scripts/qapi/mypy.ini `git-ls-files scripts/qapi/\*py` scripts/qapi/common.py:208: error: Function is missing a return type annotation scripts/qapi/common.py:227: error: Returning Any from function declared to return "str" Messed up in commit ccea6a8637 "qapi: Factor common recursion out of cgen_ifcond(), docgen_ifcond()". Tidy up. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210908045428.2689093-2-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-06scripts: Remove the "show-fixed-bugs.sh" fileThomas Huth1-91/+0
Since we are not using Launchpad anymore, there is no more need for this script. Message-Id: <20210825142143.142037-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-09-03qapi: Tweak error messages for unknown / conflicting 'if' keysMarkus Armbruster1-4/+3
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-13-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Tweak error messages for missing / conflicting meta-typeMarkus Armbruster1-14/+9
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-12-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Use re.fullmatch() where appropriateMarkus Armbruster1-1/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-10-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Use "not COND" instead of "!COND" for generated documentationMarkus Armbruster1-1/+1
Generated documentation uses operators "and", "or", and "!". Change the latter to "not". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-9-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Avoid redundant parens in code generated for conditionalsMarkus Armbruster1-4/+6
Commit 6cc2e4817f "qapi: introduce QAPISchemaIfCond.cgen()" caused a minor regression: redundant parenthesis. Subsequent commits eliminated of many of them, but not all. Get rid of the rest now. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-8-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Factor common recursion out of cgen_ifcond(), docgen_ifcond()Markus Armbruster1-20/+25
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-7-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Fix C code generation for 'if'Markus Armbruster1-2/+2
When commit 5d83b9a130 "qapi: replace if condition list with dict {'all': [...]}" made cgen_ifcond() and docgen_ifcond() recursive, it messed up parenthesises in the former, and got them right in the latter, as the previous commit demonstrates. To fix, adopt the latter's working code for the former. This generates the correct code from the previous commit's commit message. Fixes: 5d83b9a130690f879d5f33e991beabe69cb88bc8 Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-6-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Simplify how QAPISchemaIfCond represents "no condition"Markus Armbruster2-3/+3
None works fine, there is no need to replace it by {} in .__init__(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-3-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-09-03qapi: Simplify QAPISchemaIfCond's interface for generating CMarkus Armbruster5-38/+31
QAPISchemaIfCond.cgen() is only ever used like gen_if(ifcond.cgen()) and gen_endif(ifcond.cgen()) Simplify to ifcond.gen_if() and ifcond.gen_endif() Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-2-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> [Import statements tidied up with isort]
2021-09-01fuzz: add an instrumentation filterAlexander Bulekov1-0/+15
By default, -fsanitize=fuzzer instruments all code with coverage information. However, this means that libfuzzer will track coverage over hundreds of source files that are unrelated to virtual-devices. This means that libfuzzer will optimize inputs for coverage observed in timer code, memory APIs etc. This slows down the fuzzer and stores many inputs that are not relevant to the actual virtual-devices. With this change, clang versions that support the "-fsanitize-coverage-allowlist" will only instrument a subset of the compiled code, that is directly related to virtual-devices. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
2021-08-26qapi: make 'if' condition strings simple identifiersMarc-André Lureau2-3/+3
Change the 'if' condition strings to be C-agnostic. It will accept '[A-Z][A-Z0-9_]*' identifiers. This allows to express configuration conditions in other languages (Rust or Python for ex) or other more suitable forms. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: John Snow <jsnow@redhat.com> Message-Id: <20210804083105.97531-11-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Rebased with semantic conflict in redefined-event.json] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapi: add 'not' condition operationMarc-André Lureau2-2/+9
For the sake of completeness, introduce the 'not' condition. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-10-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Long line broken in tests/qapi-schema/qapi-schema-test.json] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapi: add 'any' conditionMarc-André Lureau2-5/+5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-8-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapi: replace if condition list with dict {'all': [...]}Marc-André Lureau3-31/+54
Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Accidental code motion undone. Degenerate :forms: comment dropped. Helper _check_if() moved. Error messages tweaked. ui.json updated. Accidental changes to qapi-schema-test.json dropped.] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapidoc: introduce QAPISchemaIfCond.docgen()Marc-André Lureau2-1/+16
Instead of building the condition documentation from a list of string, use the result generated from QAPISchemaIfCond.docgen(). This changes the generated documentation from: - COND1, COND2... (where COND1, COND2 are Literal nodes, and ',' is Text) to: - COND1 and COND2 (the whole string as a Literal node) This will allow us to generate more complex conditions in the following patches, such as "(COND1 and COND2) or COND3". Adding back the differentiated formatting is left to the wish list. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-6-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [TODO comment added] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapi: introduce QAPISchemaIfCond.cgen()Marc-André Lureau6-34/+46
Instead of building prepocessor conditions from a list of string, use the result generated from QAPISchemaIfCond.cgen() and hide the implementation details. Note: this patch introduces a minor regression, generating a redundant pair of parenthesis. This is mostly fixed in a later patch in this series ("qapi: replace if condition list with dict [..]") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-5-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapi: add QAPISchemaIfCond.is_present()Marc-André Lureau2-4/+7
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210804083105.97531-4-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapi: wrap Sequence[str] in an objectMarc-André Lureau7-76/+93
Mechanical change, except for a new assertion in QAPISchemaEntity.ifcond(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-3-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Rebased with obvious conflicts, commit message adjusted] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-26qapi: Fix crash on redefinition with a different conditionMarkus Armbruster1-11/+11
QAPISchema._make_implicit_object_type() asserts that when an implicit object type is used multiple times, @ifcond is the same for all uses. It will be for legitimate uses, i.e. simple union branch wrapper types. A comment explains this. The assertion fails when a command or event is redefined with a different condition. The redefinition is an error, but it's flagged only later. Fixing the assertion would complicate matters further. Not worthwhile, drop it instead. We really need to get rid of simple unions. Tweak test case redefined-event to cover redefinition with a different condition. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210806120510.2367124-1-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2021-08-11fuzz: avoid building twice, when running on gitlabAlexander Bulekov1-11/+13
On oss-fuzz, we build twice, to put together a build that is portable to the runner containers. On gitlab ci, this is wasteful and contributes to timeouts on the build-oss-fuzz job. Avoid building twice on gitlab, at the remote cost of potentially missing some cases that break oss-fuzz builds. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20210809111621.54454-1-alxndr@bu.edu> Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-07-30coverity-model: write models fully for non-array allocation functionsPaolo Bonzini1-6/+51
Coverity seems to have issues figuring out the properties of g_malloc0 and other non *_n functions. While this was "fixed" by removing the custom second argument to __coverity_mark_as_afm_allocated__, inline the code from the array-based allocation functions to avoid future issues. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-30coverity-model: constrain g_malloc/g_malloc0/g_realloc as never returning NULLPaolo Bonzini1-0/+9
g_malloc/g_malloc0/g_realloc only return NULL if the size is 0; we do not need to cover that in the model, and so far have expected __coverity_alloc__ to model a non-NULL return value. But that apparently does not work anymore, so add some extra conditionals that invoke __coverity_panic__ for NULL pointers. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-30coverity-model: clean up the models for array allocation functionsPaolo Bonzini1-10/+3
sz is only used in one place, so replace it with nmemb * size in that one place. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-30coverity-model: remove model for more allocation functionsPaolo Bonzini1-104/+1
These models are not needed anymore now that Coverity does not check anymore that the result is used with "g_free". Coverity understands GCC attributes and uses them to detect leaks. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-30coverity-model: make g_free a synonym of freePaolo Bonzini1-9/+8
Recently, Coverity has started complaining about using g_free() to free memory areas allocated by GLib functions not included in model.c, such as g_strfreev. This unfortunately goes against the GLib documentation, which suggests that g_malloc() should be matched with g_free() and plain malloc() with free(); since GLib 2.46 however g_malloc() is hardcoded to always use the system malloc implementation, and g_free is just "free" plus a tracepoint. Therefore, this should not cause any problem in practice. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-30coverity-model: update address_space_read/write modelsPaolo Bonzini1-3/+45
Use void * for consistency with the actual function; provide a model for MemoryRegionCache functions and for address_space_rw. These let Coverity understand the bounds of the data that various functions read and write even at very high levels of inlining (e.g. pci_dma_read). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-16Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-07-15' into ↵Peter Maydell1-1/+1
staging QAPI patches patches for 2021-07-15 # gpg: Signature made Thu 15 Jul 2021 13:30:14 BST # 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-qapi-2021-07-15: qapi: Fix crash on missing enum member name Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-07-15qapi: Fix crash on missing enum member nameMarkus Armbruster1-1/+1
New test case enum-dict-no-name.json crashes: $ python3 scripts/qapi-gen.py tests/qapi-schema/enum-dict-no-name.json Traceback (most recent call last): [...] File "/work/armbru/qemu/scripts/qapi/expr.py", line 458, in check_enum member_name = member['name'] KeyError: 'name' Root cause: we try to retrieve member 'name' before we check for missing members. With that fixed, we get the expected error "'data' member misses key 'name'". Fixes: 0825f62c842f2c07c5471391c6d7fd3f4fe83732 Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210616072121.626431-1-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
2021-07-14hw/usb/ccid: remove references to NSSDaniel P. Berrangé1-1/+0
The NSS package was previously pre-requisite for building CCID related features, however, this became obsolete when the libcacard library was spun off to a separate project: commit 7b02f5447c64d1854468f758398c9f6fe9e5721f Author: Marc-André Lureau <marcandre.lureau@redhat.com> Date: Sun Aug 30 11:48:40 2015 +0200 libcacard: use the standalone project Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210623142245.307776-2-berrange@redhat.com> Message-Id: <20210709143005.1554-10-alex.bennee@linaro.org>
2021-07-14Jobs based on custom runners: docs and gitlab-runner setup playbookCleber Rosa3-1/+84
To have the jobs dispatched to custom runners, gitlab-runner must be installed, active as a service and properly configured. The variables file and playbook introduced here should help with those steps. The playbook introduced here covers the Linux distributions and has been primarily tested on OS/machines that the QEMU project has available to act as runners, namely: * Ubuntu 20.04 on aarch64 * Ubuntu 18.04 on s390x But, it should work on all other Linux distributions. Earlier versions were tested on FreeBSD too, so chances of success are high. Signed-off-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Willian Rampazzo <willianr@redhat.com> Tested-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210630012619.115262-4-crosa@redhat.com> Message-Id: <20210709143005.1554-4-alex.bennee@linaro.org>
2021-07-14Jobs based on custom runners: build environment docs and playbookCleber Rosa3-0/+119
To run basic jobs on custom runners, the environment needs to be properly set up. The most common requirement is having the right packages installed. The playbook introduced here covers the QEMU's project s390x and aarch64 machines. At the time this is being proposed, those machines have already had this playbook applied to them. Signed-off-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210630012619.115262-3-crosa@redhat.com> Message-Id: <20210709143005.1554-3-alex.bennee@linaro.org>
2021-07-13Merge remote-tracking branch ↵Peter Maydell1-6/+7
'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging Linux-user pull request 20210713 Update headers to linux v5.13 cleanup errno target headers Fix race condition on fd translation table # gpg: Signature made Tue 13 Jul 2021 14:41:25 BST # 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-6.1-pull-request: linux-user: update syscall.tbl to Linux v5.13 linux-user, mips: update syscall-args-o32.c.inc to Linux v5.13 linux-user: update syscall_nr.h to Linux v5.13 fd-trans: Fix race condition on reallocation of the translation table. linux-user/syscall: Remove ERRNO_TABLE_SIZE check linux-user: Simplify host <-> target errno conversion using macros linux-user/mips: Move errno definitions to 'target_errno_defs.h' linux-user/hppa: Move errno definitions to 'target_errno_defs.h' linux-user/alpha: Move errno definitions to 'target_errno_defs.h' linux-user: Extract target errno to 'target_errno_defs.h' linux-user/sparc: Rename target_errno.h -> target_errno_defs.h linux-user/syscall: Fix RF-kill errno (typo in ERFKILL) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-07-13linux-user, mips: update syscall-args-o32.c.inc to Linux v5.13Laurent Vivier1-6/+7
Updated running scripts/update-mips-syscall-args.sh scripts/update-mips-syscall-args.sh has been updated to reflect file directory changes in strace repository. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20210708215756.268805-3-laurent@vivier.eu> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-07-12qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful.Gerd Hoffmann1-10/+4
Setting SYSTEMTAP_TAPSET to some value other than /usr/share/systemtap/tapsets results in systemtap not finding the standard tapset library any more, which in turn breaks tracing because pid() and other standard systemtap functions are not available any more. So using SYSTEMTAP_TAPSET to point systemtap to the qemu probes will only work for the prefix=/usr installs because both qemu and system tapsets in the same directory then. All other prefixes are broken. Fix that by using the "-I $tapsetdir" command line switch instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20210601132414.432430-2-kraxel@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2021-07-09meson: Use input/output for entitlements targetAkihiko Odaki1-5/+5
input/output parameters respect dependencies. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210709012533.58262-1-akihiko.odaki@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-09modules: check if all dependencies can be satisfiedJose R. Ziviani1-1/+14
Verifies if all dependencies are correctly listed in the modinfo.c too and stop the builds if they're not. Signed-off-by: Jose R. Ziviani <jziviani@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-5-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-09modules: generate modinfo.cGerd Hoffmann1-0/+84
Add script to generate C source with a small database containing the module meta-data. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-4-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-09modules: collect module meta-dataGerd Hoffmann1-0/+67
Add script to collect the module meta-data from the source code, store the results in *.modinfo files. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-3-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-06Set icon for QEMU binary on Mac OSJohn Arbuckle1-1/+9
Before switching the build system over to Meson, an icon was added to the QEMU binary on Mac OS. This patch adds back that feature; it piggybacks on the existing scripts/entitlement.sh, which already does in-place changes to the executable on Darwin. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-Id: <20210705195328.36442-1-programmingkidx@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-06coverity-scan: switch to vpath buildPaolo Bonzini1-3/+5
This is the patch that has been running on the coverity cronjob for a few weeks now. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-06coverity-scan: Remove lm32 / unicore32 targetsPhilippe Mathieu-Daudé1-6/+0
lm32 has been removed in commit 9d49bcf6992 ("Drop the deprecated lm32 target"), and unicore32 in 4369223902a ("Drop the deprecated unicore32 target"). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210619091342.3660495-2-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-25scripts/checkpatch: roll diff tweaking into checkpatch itselfAlex Bennée1-1/+6
Rather than relying on external tweaks lets just do it inside checkpatch's direct commitish handling which is QEMU specific code anyway. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210623102749.25686-4-alex.bennee@linaro.org>
2021-06-21Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' ↵Peter Maydell7-1136/+25
into staging Python Pull request Moves QMP-related tools not used for build or automatic testing from scripts/ to python/qemu/qmp/ where they will be protected from bitrot by the check-python-* CI jobs. stub forwarders are left in the old locations for now. # gpg: Signature made Sat 19 Jun 2021 00:02:40 BST # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full] # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jsnow-gitlab/tags/python-pull-request: (72 commits) scripts/qmp-shell: add redirection shim python: add qmp-shell entry point scripts/qmp-shell: move to python/qemu/qmp/qmp_shell.py scripts/qmp-shell: add docstrings scripts/qmp-shell: make QMPShellError inherit QMPError scripts/qmp-shell: remove double-underscores scripts/qmp-shell: convert usage comment to docstring scripts/qmp-shell: Remove too-broad-exception scripts/qmp-shell: Fix empty-transaction invocation scripts/qmp-shell: remove TODO scripts/qmp-shell: use logging to show warnings scripts/qmp-shell: Use context manager instead of atexit python/qmp: return generic type from context manager scripts/qmp-shell: unprivatize 'pretty' property scripts/qmp-shell: Accept SocketAddrT instead of string scripts/qmp-shell: add mypy types python/qmp: add QMPObject type alias scripts/qmp-shell: initialize completer early scripts/qmp-shell: refactor QMPCompleter scripts/qmp-shell: Fix "FuzzyJSON" parser ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>