aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-09-26Merge remote-tracking branch ↵Peter Maydell
'remotes/dgilbert/tags/pull-migration-20190925a' into staging Migration pull 2019-09-25 me: test fixes from (should stop hangs in postcopy tests). me: An RDMA cleanup hang fix Wei: Tidy ups around postcopy Marc-Andre: mem leak fix # gpg: Signature made Wed 25 Sep 2019 15:59:41 BST # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20190925a: migration/postcopy: Recognise the recovery states as 'in_postcopy' tests/migration/postcopy: trim migration bandwidth tests/migration: Fail on unexpected migration states migration/rdma.c: Swap synchronize_rcu for call_rcu migration/rdma: Don't moan about disconnects at the end migration: remove sent parameter in get_queued_page_not_dirty migration/postcopy: unsentmap is not necessary for postcopy migration/postcopy: not necessary to do discard when canonicalizing bitmap migration: fix vmdesc leak on vmstate_save() error Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-26Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-09-24-v2' ↵Peter Maydell
into staging nbd patches for 2019-09-24 - Improved error message for plaintext client of encrypted server - Fix various assertions when -object iothread is in use - Silence a Coverity error for use-after-free on error path # gpg: Signature made Wed 25 Sep 2019 14:35:52 BST # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2019-09-24-v2: util/qemu-sockets: fix keep_alive handling in inet_connect_saddr tests: Use iothreads during iotest 223 nbd: Grab aio context lock in more places nbd/server: attach client channel to the export's AioContext nbd/client: Add hint when TLS is missing Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-25tests/migration/postcopy: trim migration bandwidthDr. David Alan Gilbert
On slow hosts with tcg we were sometimes finding that the migration would complete during precopy and never get into the postcopy test. Trim back the bandwidth a bit to make that much less likely. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190923131022.15498-3-dgilbert@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Cleber Rosa <crosa@redhat.com> Tested-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-09-25tests/migration: Fail on unexpected migration statesDr. David Alan Gilbert
We've got various places where we wait for a migration to enter a given state; but if we enter an unexpected state we tend to fail in odd ways; add a mechanism for explicitly testing for any state which we shouldn't be in. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190923131022.15498-2-dgilbert@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-09-25Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-09-24' into ↵Peter Maydell
staging QAPI patches for 2019-09-24 # gpg: Signature made Tue 24 Sep 2019 13:10:36 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-2019-09-24: (37 commits) qapi: Assert .visit() and .check_clash() run only after .check() qapi: Fix excessive QAPISchemaEntity.check() recursion qapi: Fix to .check() empty structs just once qapi: Delete useless check_exprs() code for simple union kind qapi: Clean up around check_known_keys() qapi: Simplify check_keys() qapi: Normalize 'if' in check_exprs(), like other sugar qapi: Fix missing 'if' checks in struct, union, alternate 'data' qapi: Reject blank 'if' conditions in addition to empty ones qapi: Fix broken discriminator error messages qapi: Remove null from schema language qapi: Improve reporting of lexical errors qapi: Use quotes more consistently in frontend error messages tests/qapi-schema: Demonstrate suboptimal lexical errors tests/qapi-schema: Demonstrate insufficient 'if' checking tests/qapi-schema: Demonstrate broken discriminator errors tests/qapi-schema: Demonstrate misleading optional tag error tests/qapi-schema: Delete two redundant tests tests/qapi-schema: Cover unknown pragma qapi: Tweak code to match docs/devel/qapi-code-gen.txt ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-24tests: Use iothreads during iotest 223Eric Blake
Doing so catches the bugs we just fixed with NBD not properly using correct contexts. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20190920220729.31801-1-eblake@redhat.com>
2019-09-24nbd/client: Add hint when TLS is missingEric Blake
I received an off-list report of failure to connect to an NBD server expecting an x509 certificate, when the client was attempting something similar to this command line: $ ./x86_64-softmmu/qemu-system-x86_64 -name 'blah' -machine q35 -nodefaults \ -object tls-creds-x509,id=tls0,endpoint=client,dir=$path_to_certs \ -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie.0,addr=0x6 \ -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=raw,file=nbd:localhost:9000,werror=stop,rerror=stop,tls-creds=tls0 \ -device scsi-hd,id=image1,drive=drive_image1,bootindex=0 qemu-system-x86_64: -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=raw,file=nbd:localhost:9000,werror=stop,rerror=stop,tls-creds=tls0: TLS negotiation required before option 7 (go) server reported: Option 0x7 not permitted before TLS The problem? As specified, -drive is trying to pass tls-creds to the raw format driver instead of the nbd protocol driver, but before we get to the point where we can detect that raw doesn't know what to do with tls-creds, the nbd driver has already failed because the server complained. The fix to the broken command line? Pass '...,file.tls-creds=tls0' to ensure the tls-creds option is handed to nbd, not raw. But since the error message was rather cryptic, I'm trying to improve the error message. With this patch, the error message adds a line: qemu-system-x86_64: -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=raw,file=nbd:localhost:9000,werror=stop,rerror=stop,tls-creds=tls0: TLS negotiation required before option 7 (go) Did you forget a valid tls-creds? server reported: Option 0x7 not permitted before TLS And with luck, someone grepping for that error message will find this commit message and figure out their command line mistake. Sadly, the only mention of file.tls-creds in our docs relates to an --image-opts use of PSK encryption with qemu-img as the client, rather than x509 certificate encryption with qemu-kvm as the client. CC: Tingting Mao <timao@redhat.com> CC: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20190907172055.26870-1-eblake@redhat.com> [eblake: squash in iotest 233 fix] Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-24qapi: Fix missing 'if' checks in struct, union, alternate 'data'Markus Armbruster
Commit 87adbbffd4..3e270dcacc "qapi: Add 'if' to (implicit struct|union|alternate) members" (v4.0.0) neglected test coverage, and promptly failed to check the conditions. Review fail. Recent commit "tests/qapi-schema: Demonstrate insufficient 'if' checking" added test coverage, demonstrating the bug. Fix it by add the missing check_if(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-13-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24qapi: Reject blank 'if' conditions in addition to empty onesMarkus Armbruster
"'if': 'COND'" generates "#if COND". We reject empty COND because it won't compile. Blank COND won't compile any better, so reject that, too. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-12-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24qapi: Fix broken discriminator error messagesMarkus Armbruster
check_union() checks the discriminator exists in base and makes sense. Two error messages mention the base. These are broken for anonymous bases, as demonstrated by tests flat-union-invalid-discriminator and flat-union-invalid-if-discriminator.err. The third one doesn't bother. First broken when commit ac4338f8eb "qapi: Allow anonymous base for flat union" (v2.6.0) neglected to adjust the "not a member of base" error message. Commit ccadd6bcba "qapi: Add 'if' to implicit struct members" (v4.0.0) then cloned the flawed error message. Dumb them down not to mention the base. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-11-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24qapi: Remove null from schema languageMarkus Armbruster
We represent the parse tree as OrderedDict. We fetch optional dict members with .get(). So far, so good. We represent null literals as None. .get() returns None both for "absent" and for "present, value is the null literal". Uh-oh. Test features-if-invalid exposes this bug: "'if': null" is misinterpreted as absent "if". We added null to the schema language to "allow [...] an explicit default value" (commit e53188ada5 "qapi: Allow true, false and null in schema json", v2.4.0). Hasn't happened; null is still unused except as generic invalid value in tests/. To fix, we'd have to replace .get() by something more careful, or represent null differently. Feasible, but we got more and bigger fish to fry right now. Remove the null literal from the schema language. Replace null in tests by another invalid value. Test features-if-invalid now behaves as it should. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-10-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24qapi: Improve reporting of lexical errorsMarkus Armbruster
Show text up to next structural character, whitespace, or quote character instead of just the first character. Forgotten quotes now get reported like "Stray 'command'" instead of "Stray 'c'". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-9-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24qapi: Use quotes more consistently in frontend error messagesMarkus Armbruster
Consistently enclose error messages in double quotes. Use single quotes within, except for one case of "'". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-8-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24tests/qapi-schema: Demonstrate suboptimal lexical errorsMarkus Armbruster
The error message for forgotten quotes around a name shows just the name's first character, which isn't as nice as it could be. Same for attempting to use a number. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-7-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24tests/qapi-schema: Demonstrate insufficient 'if' checkingMarkus Armbruster
Cover invalid 'if' in struct members, features, union and alternate branches. Four out of four are broken. Mark FIXME. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-6-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Comment typo fixed]
2019-09-24tests/qapi-schema: Demonstrate broken discriminator errorsMarkus Armbruster
When the union definition's base is an object, some error messages show it as an OrderedDict. Oops. Mark FIXME. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-5-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24tests/qapi-schema: Demonstrate misleading optional tag errorMarkus Armbruster
Test flat-union-optional-discriminator declares its union tag as '*switch': 'Enum', and points to it with 'discriminator': '*switch'. This gets rejected as "discriminator of flat union 'MyUnion' uses invalid name '*switch'". Correct; member 'discriminator' doesn't accept a '*' prefix. However, this merely tests name validity checking, which we already cover elsewhere. More interesting is testing the valid name 'switch'. This reports "discriminator 'switch' is not a member of base struct 'Base'", which is misleading. Copy the existing 'discriminator': '*switch' test to flat-union-discriminator-bad-name, and rewrite its comment. Change flat-union-optional-discriminator to test 'discriminator': 'switch', and mark it FIXME. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-4-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24tests/qapi-schema: Delete two redundant testsMarkus Armbruster
Tests duplicate-key and double-data test the same thing. The former predates the latter, and it has a better name. Delete the latter, and tweak the former's comment. Tests include-format-err and include-extra-junk test the same thing. The former predates the latter, but the latter has a better name and a comment. Delete the former. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-3-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24tests/qapi-schema: Cover unknown pragmaMarkus Armbruster
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24qapi: Tweak code to match docs/devel/qapi-code-gen.txtMarkus Armbruster
The previous commit made qapi-code-gen.txt define "(top-level) expression" as either "directive" or "definition". The code still uses "expression" when it really means "definition". Tidy up. The previous commit made qapi-code-gen.txt use "object" rather than "dictionary". The code still uses "dictionary". Tidy up. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-17-armbru@redhat.com>
2019-09-24qapi: Adjust frontend errors to say enum value, not memberMarkus Armbruster
For consistency with docs/devel/qapi-code-gen.txt. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-12-armbru@redhat.com>
2019-09-24qapi: Permit omitting all flat union branchesMarkus Armbruster
Absent flat union branches default to the empty struct (since commit 800877bb16 "qapi: allow empty branches in flat unions"). But an attempt to omit all of them is rejected with "Union 'FOO' has no branches". Harmless oddity, but it's easy to avoid, so do that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-11-armbru@redhat.com> [Commit message typo fixed]
2019-09-24qapi: Permit alternates with just one branchMarkus Armbruster
A union or alternate without branches makes no sense and doesn't work: it can't be instantiated. A union or alternate with just one branch works, but is degenerate. We accept the former, but reject the latter. Weird. docs/devel/qapi-code-gen.txt doesn't mention the difference. It claims an alternate definition is "is similar to a simple union type". Permit degenerate alternates to make them consistent with unions. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-10-armbru@redhat.com>
2019-09-24qapi: Permit 'boxed' with empty typeMarkus Armbruster
We reject empty types with 'boxed': true. We don't really need that to work, but making it work is actually simpler than rejecting it, so do that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-9-armbru@redhat.com>
2019-09-24qapi: Drop support for escape sequences other than \\Markus Armbruster
Since the previous commit restricted strings to printable ASCII, \uXXXX's only use is obfuscation. Drop it. This leaves \\, \/, \', and \". Since QAPI schema strings are all names, and names are restricted to ASCII letters, digits, hyphen, and underscore, none of them is useful. The latter three have no test coverage. Drop them. Keep \\ to avoid (more) gratuitous incompatibility with JSON. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-8-armbru@redhat.com>
2019-09-24qapi: Restrict strings to printable ASCIIMarkus Armbruster
RFC 8259 on string contents: All Unicode characters may be placed within the quotation marks, except for the characters that MUST be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F). The QAPI schema parser accepts both less and more than JSON: it accepts only ASCII with \u (less), and accepts control characters other than LF (new line) unescaped. How it treats unescaped non-ASCII input differs between Python 2 and Python 3. Make it accept strictly less: require printable ASCII. Drop support for \b, \f, \n, \r, \t. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-7-armbru@redhat.com>
2019-09-24tests/qapi-schema: Demonstrate bad reporting of funny charactersMarkus Armbruster
Invalid name 'not\\possible' is reported as 'not\possible'. Control characters (quoted or not) are even more confusing. Mark FIXME. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-6-armbru@redhat.com>
2019-09-24qapi: Drop support for boxed alternate argumentsMarkus Armbruster
Commands and events can define their argument type inline (default) or by referring to another type ('boxed': true, since commit c818408e44 "qapi: Implement boxed types for commands/events", v2.7.0). The unboxed inline definition is an (anonymous) struct type. The boxed type may be a struct, union, or alternate type. The latter is problematic: docs/interop/qemu-spec.txt requires the value of the 'data' key to be a json-object, but any non-degenerate alternate type has at least one branch that isn't. Fortunately, we haven't made use of alternates in this context outside tests/. Drop support for them. QAPISchemaAlternateType.is_empty() is now unused. Drop it, too. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-4-armbru@redhat.com>
2019-09-23Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' ↵Peter Maydell
into staging Improvements include: * Relaxed error code pattern on machine_m68k_nextcube.py * Better naming and separation of tests in x86_cpu_model_versions.py * New checks on guest side on linux_ssh_mips_malta.py * Use of avocado.utils.ssh, and thus "/usr/bin/ssh" for SSH interaction # gpg: Signature made Mon 23 Sep 2019 14:38:01 BST # gpg: using RSA key 7ABB96EB8B46B94D5E0FE9BB657E8D33A5F209F3 # gpg: Good signature from "Cleber Rosa <crosa@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 * remotes/cleber/tags/python-next-pull-request: Acceptance tests: use avocado.utils.ssh for SSH interaction tests/acceptance: Add new test cases in linux_ssh_mips_malta.py tests/acceptance: Refactor and improve reporting in linux_ssh_mips_malta.py Acceptance test x86_cpu_model_versions: split into smaller tests Acceptance test x86_cpu_model_versions: fix mismatches between test and messages Acceptance test x86_cpu_model_versions: shutdown VMs Acceptance test machine_m68k_nextcube.py: relax the error code pattern Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-23Merge remote-tracking branch ↵Peter Maydell
'remotes/davidhildenbrand/tags/s390x-tcg-2019-09-23' into staging Fix a bunch of BUGs in the mem-helpers (including the MVC instruction), especially, to make them behave correctly on faults. # gpg: Signature made Mon 23 Sep 2019 09:01:21 BST # gpg: using RSA key 1BD9CAAD735C4C3A460DFCCA4DDE10F700FF835A # gpg: issuer "david@redhat.com" # gpg: Good signature from "David Hildenbrand <david@redhat.com>" [unknown] # gpg: aka "David Hildenbrand <davidhildenbrand@gmail.com>" [full] # Primary key fingerprint: 1BD9 CAAD 735C 4C3A 460D FCCA 4DDE 10F7 00FF 835A * remotes/davidhildenbrand/tags/s390x-tcg-2019-09-23: (30 commits) tests/tcg: target/s390x: Test MVC tests/tcg: target/s390x: Test MVO s390x/tcg: MVO: Fault-safe handling s390x/tcg: MVST: Fault-safe handling s390x/tcg: MVZ: Fault-safe handling s390x/tcg: MVN: Fault-safe handling s390x/tcg: MVCIN: Fault-safe handling s390x/tcg: NC: Fault-safe handling s390x/tcg: XC: Fault-safe handling s390x/tcg: OC: Fault-safe handling s390x/tcg: MVCLU: Fault-safe handling s390x/tcg: MVC: Fault-safe handling on destructive overlaps s390x/tcg: MVCS/MVCP: Use access_memmove() s390x/tcg: Fault-safe memmove s390x/tcg: Fault-safe memset s390x/tcg: Always use MMU_USER_IDX for CONFIG_USER_ONLY s390x/tcg: MVST: Fix storing back the addresses to registers s390x/tcg: MVST: Check for specification exceptions s390x/tcg: MVCS/MVCP: Properly wrap the length s390x/tcg: MVCOS: Lengths are 32 bit in 24/31-bit mode ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-23Merge remote-tracking branch ↵Peter Maydell
'remotes/cminyard/tags/ipmi-for-release-2019-09-20' into staging ipmi: Some bug fixes and new interfaces Some bug fixes for the watchdog and hopeful the BT tests. Change the IPMI UUID handling to give the user the ability to set it or not have it. Add a PCI interface. Add an SMBus interfaces. -corey # gpg: Signature made Fri 20 Sep 2019 20:11:21 BST # gpg: using RSA key FD0D5CE67CE0F59A6688268661F38C90919BFF81 # gpg: Good signature from "Corey Minyard <cminyard@mvista.com>" [unknown] # gpg: aka "Corey Minyard <minyard@acm.org>" [unknown] # gpg: aka "Corey Minyard <corey@minyard.net>" [unknown] # gpg: aka "Corey Minyard <minyard@mvista.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: FD0D 5CE6 7CE0 F59A 6688 2686 61F3 8C90 919B FF81 * remotes/cminyard/tags/ipmi-for-release-2019-09-20: pc: Add an SMB0 ACPI device to q35 ipmi: Fix SSIF ACPI handling to use the right CRS acpi: Add i2c serial bus CRS handling ipmi: Add an SMBus IPMI interface ipmi: Add PCI IPMI interfaces smbios:ipmi: Ignore IPMI devices with no fwinfo function ipmi: Allow a size value to be passed for I/O space ipmi: Split out BT-specific code from ISA BT code ipmi: Split out KCS-specific code from ISA KCS code ipmi: Add a UUID device property qdev: Add a no default uuid property tests:ipmi: Fix IPMI BT tests ipmi: Generate an interrupt on watchdog pretimeout expiry ipmi: Fix the get watchdog command ipmi: Fix watchdog NMI handling Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-23tests/tcg: target/s390x: Test MVCDavid Hildenbrand
Let's add a test that especially verifies that no data will be touched in case we cross page boundaries and one page access triggers a fault. Before the fault-safe handling fixes, the test failes with: TEST mvc on s390x data modified during a fault make[2]: *** [../Makefile.target:116: run-mvc] Error 1 Acked-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com>
2019-09-23tests/tcg: target/s390x: Test MVODavid Hildenbrand
Let's add the simple test based on the example from the PoP. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com>
2019-09-20Acceptance tests: use avocado.utils.ssh for SSH interactionCleber Rosa
This replaces paramiko with avocado.utils.ssh module, which is based on a (open)ssh binary, supposedly more ubiquitous. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190919225905.10829-1-crosa@redhat.com> [Cleber: consolidated existing skipUnless from tests to setUp] Signed-off-by: Cleber Rosa <crosa@redhat.com>
2019-09-20tests/acceptance: Add new test cases in linux_ssh_mips_malta.pyAleksandar Markovic
Add 15 new tests cases. They all rely on simple commands used for detecting hardware configuration information. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1564760158-27536-3-git-send-email-aleksandar.markovic@rt-rk.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-09-20tests/acceptance: Refactor and improve reporting in linux_ssh_mips_malta.pyAleksandar Markovic
This patch restructures code organization around the test case executions. At the same time, rather than outputing a cryptic message: FAIL: True not found in [False], the following will be reported too, if the command output does not meet specified expectations: 'lspci -d 11ab:4620' output doesn't contain the word 'GT-64120' Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1564760158-27536-2-git-send-email-aleksandar.markovic@rt-rk.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-09-20Acceptance test x86_cpu_model_versions: split into smaller testsCleber Rosa
The justifications being automatic destruction of the vm instances when no longer needed and more compact test naming under a common class. Besides those, a smaller test makes the one and only assertion rather obvious, which suggests that we could even get rid of the more verbose (and manual) error messages (to be decided). Naming of the tests tries to follow the following pattern: test_($cpu_version)_($no_arch_capabitilies_set_or_unset)_($machine_version) The presence of each naming component is optional, depending on whether the test manually sets it or not. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20190828193628.7687-4-crosa@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-09-20Acceptance test x86_cpu_model_versions: fix mismatches between test and messagesCleber Rosa
This fixes a few mismatches between the test and the error messages produced in case of failures. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20190828193628.7687-3-crosa@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-09-20Acceptance test x86_cpu_model_versions: shutdown VMsCleber Rosa
This shuts down the VMs that won't be used any longer during the remainder of the test. It's debatable if the very last one should also be shutdown manually, and my opinion is that it shouldn't because that's taken care by the immediately following tearDown(). Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20190828193628.7687-2-crosa@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-09-20Acceptance test machine_m68k_nextcube.py: relax the error code patternCleber Rosa
Instead of looking for a specific error, let's relax the pattern because different errors have been seen (I'm consistenly getting 52) and the real goal of this test is to validate the framebuffer operation, and not to reproduce one specific error. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Thomas Huth <huth@tuxfamily.org> Message-Id: <20190919161400.26399-1-crosa@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
2019-09-20pc: Add an SMB0 ACPI device to q35Corey Minyard
This is so I2C devices can be found in the ACPI namespace. Currently that's only IPMI, but devices can be easily added now. Adding the devices required some PCI information, and the bus itself to be added to the PCMachineState structure. Note that this only works on Q35, the ACPI for PIIX4 is not capable of handling an SMBus device. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2019-09-20tests:ipmi: Fix IPMI BT testsCorey Minyard
The IPMI BT tests had a race condition, if it receive an IPMI command to enable interrupt, it would write the message to enable interrupts after it wrote the command response. So the test code could receive the command response and issue the next command before the device handled the interrupt enable command, and thus no interrupt. So send the message to enable interrupt before the command response. Also add some sleeps to give qemu time to handle responses, there was no delay before, and it could result in an invalid timeout. And re-enable the tests, as hopefully they are fixed now. Note that I was unable to reproduce this even with the instructions Peter gave me, but hopefully this fixes the issue. Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
2019-09-20Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' ↵Peter Maydell
into staging Python (acceptance tests) queue, 2019-09-19 # gpg: Signature made Thu 19 Sep 2019 17:24:04 BST # gpg: using RSA key 7ABB96EB8B46B94D5E0FE9BB657E8D33A5F209F3 # gpg: Good signature from "Cleber Rosa <crosa@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 * remotes/cleber/tags/python-next-pull-request: BootLinuxSshTest: Only run the tests when explicitly requested tests/acceptance: Specify arch for QueryCPUModelExpansion Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-19BootLinuxSshTest: Only run the tests when explicitly requestedPhilippe Mathieu-Daudé
Currently the Avocado framework does not distinct the time spent downloading assets vs. the time spent running a test. With big assets (like a full VM image) the tests likely fail. This is a limitation known by the Avocado team. Until this issue get fixed, do not run this tests automatically. Tests can still be run setting the AVOCADO_TIMEOUT_EXPECTED environment variable. Reported-by: Gerd Hoffmann <kraxel@redhat.com> Reported-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20190918122748.2144-1-philmd@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
2019-09-19Replace '-machine accel=xyz' with '-accel xyz'Thomas Huth
We've got a separate option to configure the accelerator nowadays, which is shorter to type and the preferred way of specifying an accelerator. Use it in the source and examples to show that it is the favored option. (However, do not touch the places yet which also specify other machine options or multiple accelerators - these are currently still better handled with one single "-machine" statement instead) Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20190904052739.22123-1-thuth@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-09-18tests/acceptance: Specify arch for QueryCPUModelExpansionDavid Gibson
At the moment this test runs on whatever the host arch is. But it looks for 'unavailable-features' which is an x86 specific cpu property. Tag it to always use qemu-system-x86_64. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20190918070654.19356-1-david@gibson.dropbear.id.au> Signed-off-by: Cleber Rosa <crosa@redhat.com>
2019-09-17Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* Fix Patchew CI failures (myself) * i386 fw_cfg refactoring (Philippe) * pmem bugfix (Stefan) * Support for accessing cstate MSRs (Wanpeng) * exec.c cleanups (Wei Yang) * Improved throttling (Yury) * elf-ops.h coverity fix (Stefano) # gpg: Signature made Mon 16 Sep 2019 16:13:12 BST # gpg: using RSA key BFFBD25F78C7AE83 # 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/tags/for-upstream: (29 commits) hw/i386/pc: Extract the x86 generic fw_cfg code hw/i386/pc: Rename pc_build_feature_control() as generic fw_cfg_build_* hw/i386/pc: Let pc_build_feature_control() take a MachineState argument hw/i386/pc: Let pc_build_feature_control() take a FWCfgState argument hw/i386/pc: Rename pc_build_smbios() as generic fw_cfg_build_smbios() hw/i386/pc: Let pc_build_smbios() take a generic MachineState argument hw/i386/pc: Let pc_build_smbios() take a FWCfgState argument hw/i386/pc: Replace PCMachineState argument with MachineState in fw_cfg_arch_create hw/i386/pc: Pass the CPUArchIdList array by argument hw/i386/pc: Pass the apic_id_limit value by argument hw/i386/pc: Pass the boot_cpus value by argument hw/i386/pc: Rename bochs_bios_init as more generic fw_cfg_arch_create hw/i386/pc: Use address_space_memory in place hw/i386/pc: Extract e820 memory layout code hw/i386/pc: Use e820_get_num_entries() to access e820_entries cpus: Fix throttling during vm_stop qemu-thread: Add qemu_cond_timedwait memory: inline and optimize devend_memop memory: fetch pmem size in get_file_size() elf-ops.h: fix int overflow in load_elf() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-16qemu-iotests: Add test for bz #1745922Maxim Levitsky
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190915203655.21638-4-mlevitsk@redhat.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-09-16tests/qemu-iotests: Fix qemu-io related output in 026.out.nocacheVladimir Sementsov-Ogievskiy
qemu-io now prefixes its error and warnings with "qemu-io:". 36b9986b08787019e fixed a lot of iotests output but forget about 026.out.nocache. Fix it too. Fixes: 99e98d7c9fc1a1639fad ("qemu-io: Use error_[gs]et_progname()") Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190816153015.447957-2-vsementsov@virtuozzo.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-09-16tests/Makefile: Do not print the name of the check-block.sh shell scriptThomas Huth
The check script is already printing out which iotest is currently running, so printing out the name of the check-block.sh shell script looks superfluous here. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20190906113534.10907-1-thuth@redhat.com Acked-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>