aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2019-06-21tests/tcg: target/mips: Amend tests for MSA pack instructionsAleksandar Markovic13-12/+708
Add tests for cases when destination register is the same as one of source registers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561031359-6727-3-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-21tests/tcg: target/mips: Include isa/ase and group name in test outputAleksandar Markovic260-736/+1492
For better appearance and usefullnes, include ISA/ASE name and instruction group name in the output of tests. For example, all this data will be displayed for FMAX_A.W test: | MSA | Float Max Min | FMAX_A.W | | PASS: 80 | FAIL: 0 | elapsed time: 0.16 ms | (the data will be displayed in one row; they are presented here in two rows not to exceed the width of the commit message) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561031359-6727-2-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-18iotests: Test failure to loosen restrictionsMax Reitz2-0/+27
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-18block: drop bs->jobVladimir Sementsov-Ogievskiy1-2/+3
Drop remaining users of bs->job: 1. assertions actually duplicated by assert(!bs->refcnt) 2. trace-point seems not enough reason to change stream_start to return BlockJob pointer 3. Restricting creation of two jobs based on same bs is bad idea, as 3.1 Some jobs creates filters to be their main node, so, this check don't actually prevent creating second job on same real node (which will create another filter node) (but I hope it is restricted by other mechanisms) 3.2 Even without bs->job we have two systems of permissions: op-blockers and BLK_PERM 3.3 We may want to run several jobs on one node one day And finally, drop bs->job pointer itself. Hurrah! Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-18iotests: Hide timestamps for skipped testsMax Reitz1-0/+1
Currently, the "thistime" variable is not reinitialized on every loop iteration. This leads to tests that do not yield a run time (because they failed or were skipped) printing the run time of the previous test that did. Fix that by reinitializing "thistime" for every test. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-18monitor: Replace monitor_init() with monitor_init_{hmp, qmp}()Kevin Wolf1-1/+2
Most callers know which monitor type they want to have. Instead of calling monitor_init() with flags that can describe both types of monitors, make monitor_init_{hmp,qmp}() public interfaces that take specific bools instead of flags and call these functions directly. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190613153405.24769-15-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2019-06-16tests/rebuild-expected-aml.sh: blow out difflistMichael S. Tsirkin1-0/+3
As expected files have been updated, make sure we do not forget to remove them from the allowed diff list. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-06-16q35: update DSDTMichael S. Tsirkin9-8/+0
update expected files and drop them from allowed diff list. Fixes: 4a4418369d6 ("q35: fix mmconfig and PCI0._CRS") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-06-16q35: fix mmconfig and PCI0._CRSGerd Hoffmann1-0/+8
This patch changes the handling of the mmconfig area. Thanks to the pci(e) expander devices we already have the logic to exclude address ranges from PCI0._CRS. We can simply add the mmconfig address range to the list get it excluded as well. With that in place we can go with a fixed pci hole which covers the whole area from the end of (low) ram to the ioapic. This will make the whole logic alot less fragile. No matter where the firmware places the mmconfig xbar, things should work correctly. The guest also gets a bit more PCI address space (seabios boot): # cat /proc/iomem [ ... ] 7ffdd000-7fffffff : reserved 80000000-afffffff : PCI Bus 0000:00 <<-- this is new b0000000-bfffffff : PCI MMCONFIG 0000 [bus 00-ff] b0000000-bfffffff : reserved c0000000-febfffff : PCI Bus 0000:00 f8000000-fbffffff : 0000:00:01.0 [ ... ] So this is a guest visible change. Cc: László Érsek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20190607073429.3436-1-kraxel@redhat.com>
2019-06-14iotests: Test qemu-img convert -C --salvageMax Reitz2-0/+4
We do not support this combination (yet), so this should yield an error message. Signed-off-by: Max Reitz <mreitz@redhat.com> Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190507203508.18026-8-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14iotests: Test qemu-img convert --salvageMax Reitz3-0/+214
This test converts a simple image to another, but blkdebug injects block_status and read faults at some offsets. The resulting image should be the same as the input image, except that sectors that could not be read have to be 0. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190507203508.18026-7-mreitz@redhat.com Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> [mreitz: Dropped superfluous printf from _filter_offsets, as suggested by Vladimir; disable test for VDI and IMGOPTSSYNTAX] Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14blockdev: Overlays are not snapshotsMax Reitz1-5/+5
There are error messages which refer to an overlay node as the snapshot. That is wrong, those are two different things. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20190603202236.1342-3-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14iotests: restrict 254 to support only qcow2Vladimir Sementsov-Ogievskiy1-0/+2
Test fails at least for qcow, because of different cluster sizes in base and top (and therefore different granularities of bitmaps we are trying to merge). The test aim is to check block-dirty-bitmap-merge between different nodes functionality, no needs to check all formats. So, let's just drop support for anything except qcow2. Reported-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190605155405.104384-1-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14iotests: Fix intermittent failure in 219Max Reitz1-3/+10
In 219, we wait for the job to make progress before we emit its status. This makes the output reliable. We do not wait for any more progress if the job's current-progress already matches its total-progress. Unfortunately, there is a bug: Right after the job has been started, it's possible that total-progress is still 0. In that case, we may skip the first progress-making step and keep ending up 64 kB short. To fix that bug, we can simply wait for total-progress to reach 4 MB (the image size) after starting the job. Reported-by: Karen Mezick <kmezick@redhat.com> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1686651 Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190516161114.27596-1-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> [mreitz: Adjusted commit message as per John's proposal] Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14iotests: Filter 175's allocation informationMax Reitz2-8/+26
It is possible for an empty file to take up blocks on a filesystem, for example: $ qemu-img create -f raw test.img 1G Formatting 'test.img', fmt=raw size=1073741824 $ mkfs.ext4 -I 128 -q test.img $ mkdir test-mount $ sudo mount -o loop test.img test-mount $ sudo touch test-mount/test-file $ stat -c 'blocks=%b' test-mount/test-file blocks=8 These extra blocks (one cluster) are apparently used for metadata, because they are always there, on top of blocks used for data: $ sudo dd if=/dev/zero of=test-mount/test-file bs=1M count=1 1+0 records in 1+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00135339 s, 775 MB/s $ stat -c 'blocks=%b' test-mount/test-file blocks=2056 Make iotest 175 take this into account. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Nir Soffer <nsoffer@redhat.com> Message-id: 20190516144319.12570-1-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14iotests: add iotest 256 for testing blockdev-backup across iothread contextsJohn Snow3-0/+242
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20190523170643.20794-6-jsnow@redhat.com Reviewed-by: Max Reitz <mreitz@redhat.com> [mreitz: Moved from 250 to 256] Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14iotests.py: rewrite run_job to be pickierJohn Snow1-19/+29
Don't pull events out of the queue that don't belong to us; be choosier so that we can use this method to drive jobs that were launched by transactions that may have more jobs. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20190523170643.20794-5-jsnow@redhat.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-14iotests.py: do not use infinite waitsJohn Snow1-7/+7
Cap waits to 60 seconds so that iotests can fail gracefully if something goes wrong. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20190523170643.20794-3-jsnow@redhat.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-06-13Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-06-13' into ↵Peter Maydell5-62/+52
staging nbd patches for 2019-06-13 - add 'qemu-nbd --pid-file' - NBD-related iotest improvements - NBD code refactoring in preparation for reconnect # gpg: Signature made Thu 13 Jun 2019 16:37:58 BST # gpg: using RSA key A7A16B4A2527436A # 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-06-13: block/nbd: merge NBDClientSession struct back to BDRVNBDState block/nbd: merge nbd-client.* to nbd.c block/nbd-client: drop stale logout nbd/server: Nicer spelling of max BLOCK_STATUS reply length iotests: Let 233 run concurrently iotests: Use qemu-nbd's --pid-file qemu-nbd: Do not close stderr iotests.py: Add qemu_nbd_early_pipe() qemu-nbd: Add --pid-file option Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-13target/arm: Fix output of PAuth AuthRichard Henderson2-1/+62
The ARM pseudocode installs the error_code into the original pointer, not the encrypted pointer. The difference applies within the 7 bits of pac data; the result should be the sign extension of bit 55. Add a testcase to that effect. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-13iotests: Let 233 run concurrentlyMax Reitz2-53/+42
common.nbd's nbd_server_set_tcp_port() tries to find a free port, and then uses it for the whole test run. However, this is racy because even if the port was free at the beginning, there is no guarantee it will continue to be available. Therefore, 233 currently cannot reliably be run concurrently with other NBD TCP tests. This patch addresses the problem by dropping nbd_server_set_tcp_port(), and instead finding a new port every time nbd_server_start_tcp_socket() is invoked. For this, we run qemu-nbd with --fork and on error evaluate the output to see whether it contains "Address already in use". If so, we try the next port. On success, we still want to continually redirect the output from qemu-nbd to stderr. To achieve both, we redirect qemu-nbd's stderr to a FIFO that we then open in bash. If the parent process exits with status 0 (which means that the server has started successfully), we launch a background cat process that copies the FIFO to stderr. On failure, we read the whole content into a variable and then evaluate it. While at it, use --fork in nbd_server_start_unix_socket(), too. Doing so allows us to drop nbd_server_wait_for_*_socket(). Note that the reason common.nbd did not use --fork before is that qemu-nbd did not have --pid-file. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190508211820.17851-6-mreitz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2019-06-13iotests: Use qemu-nbd's --pid-fileMax Reitz1-4/+2
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20190508211820.17851-5-mreitz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2019-06-13iotests.py: Add qemu_nbd_early_pipe()Max Reitz2-5/+8
qemu_nbd_pipe() currently unconditionally reads qemu-nbd's output. That is not ideal because qemu-nbd may keep stderr open after the parent process has exited. Currently, the only user of qemu_nbd_pipe() is 147, which discards the whole output if the parent process returned success and only evaluates it on error. Therefore, we can replace qemu_nbd_pipe() by qemu_nbd_early_pipe() that does the same: Discard the output on success, and return it on error. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190508211820.17851-3-mreitz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2019-06-13Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-06-12' into ↵Peter Maydell31-3/+135
staging QAPI patches for 2019-06-12 # gpg: Signature made Wed 12 Jun 2019 17:44:50 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-06-12: qapi: Simplify how QAPIDoc implements its state machine file-posix: Add dynamic-auto-read-only QAPI feature qapi: Allow documentation for features qapi: Disentangle QAPIDoc code tests/qapi-schema: Error case tests for features in structs tests/qapi-schema: Test for good feature lists in structs qapi: Add feature flags to struct types block/gluster: update .help of BLOCK_OPT_PREALLOC option block/file-posix: update .help of BLOCK_OPT_PREALLOC option qapi/block-core: update documentation of preallocation parameter qdev: Delete unused LostTickPolicy "merge" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-12tests/tcg/x86_64: add a PVH crt.o for x86_64 system testsAlex Bennée3-0/+311
Instead of doing the full real to 64 bit dance we are attempting to leverage Xen's PVH boot spec to go from 32 bit to 64 bit. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/tcg: clean-up VPATH/TESTS for i386Alex Bennée1-7/+2
Since we only run build the multiarch tests and we use a fully resolved path for the crt object we don't need the wildcard or VPATH messing about. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/tcg: better detect truncated readsAlex Bennée1-5/+31
If we've truncated a wider read we can detect the condition earlier by looking at the number of zeros we've read. So we don't trip up on cases where we have written zeros to the start of the buffer we also ensure we only start each offset read from the right address. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/vm: python3 fixesGerd Hoffmann1-5/+6
Add proper unicode handling when processing strings. Also need to explicitly say we want int not float. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190520124716.30472-3-kraxel@redhat.com> [AJB: fix conflicts with tests/vm: Port basevm to Python 3] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/vm: Add missing variables on helpWainer dos Santos Moschetta1-2/+6
Added description of variables missing on vm-test help. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20190329210804.22121-6-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-12tests/vm: Fix build-centos docker-based tests runWainer dos Santos Moschetta1-3/+3
`make vm-build-centos` run docker-based tests on CentOS. The created containers should have network otherwise some tests fail. Also fixed the BUILD_SCRIPT template to correctly evaluate "V=1" for verbose output. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20190329210804.22121-5-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/vm: Port basevm to Python 3Wainer dos Santos Moschetta1-4/+4
Fixed tests/vm/basevm.py to run with Python 3: - hashlib.sha1() requires an binary encoded object. - uses floor division ("//") (PEP 238). - decode bytes to unicode when needed. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190329210804.22121-3-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-12tests/vm: Use python configured on buildWainer dos Santos Moschetta1-2/+2
Changed the vm-test makefile to execute python scripts with the interpreter configured on build. This allows to run vm-test targets properly in Linux distros with Python 3 only support. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20190329210804.22121-2-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-12tests/docker: Update the Ubuntu image to 19.04Alex Bennée1-5/+14
This has aged a little and we have a separate LTS image for testing on the older distros. Update it to a more recent release like its Fedora cousin. Besides it is useful to have something with gcc-9 on it for squashing those stringop truncation errors. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-06-12tests/docker: Update the Fedora cross compile images to 30Alex Bennée2-2/+2
While at it remove the bogus :latest tag for cris cross compiler. It tends to break caching and cause confusion. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-12tests/docker: Update the Fedora image to Fedora 30Philippe Mathieu-Daudé1-1/+1
Fedora 30 got released: https://fedoramagazine.org/announcing-fedora-30/ Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20190528153304.27157-1-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/qapi-schema: Error case tests for features in structsKevin Wolf25-0/+37
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190606153803.5278-4-armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2019-06-12tests/qapi-schema: Test for good feature lists in structsKevin Wolf4-0/+94
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190606153803.5278-3-armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2019-06-12qapi: Add feature flags to struct typesKevin Wolf3-3/+4
Sometimes, the behaviour of QEMU changes without a change in the QMP syntax (usually by allowing values or operations that previously resulted in an error). QMP clients may still need to know whether they can rely on the changed behavior. Let's add feature flags to the QAPI schema language, so that we can make such changes visible with schema introspection. An example for a schema definition using feature flags looks like this: { 'struct': 'TestType', 'data': { 'number': 'int' }, 'features': [ 'allow-negative-numbers' ] } Introspection information then looks like this: { "name": "TestType", "meta-type": "object", "members": [ { "name": "number", "type": "int" } ], "features": [ "allow-negative-numbers" ] } This patch implements feature flags only for struct types. We'll implement them more widely as needed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190606153803.5278-2-armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2019-06-12Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-06-11-v3' ↵Peter Maydell84-20/+132
into staging Miscellaneous patches for 2019-06-11 # gpg: Signature made Wed 12 Jun 2019 12:20:41 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-misc-2019-06-11-v3: MAINTAINERS: Polish headline decorations MAINTAINERS: Improve section headlines MAINTAINERS: Remove duplicate entries of qemu-devel@nongnu.org Clean up a header guard symbols (again) Supply missing header guards Clean up a few header guard symbols scripts/clean-header-guards: Fix handling of trailing comments Normalize position of header guard Include qemu-common.h exactly where needed Include qemu/module.h where needed, drop it from qemu-common.h qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-12Supply missing header guardsMarkus Armbruster10-1/+50
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-5-armbru@redhat.com>
2019-06-12Clean up a few header guard symbolsMarkus Armbruster2-4/+4
Commit 58ea30f5145 "Clean up header guards that don't match their file name" messed up contrib/elf2dmp/qemu_elf.h and tests/migration/migration-test.h. It missed target/cris/opcode-cris.h and tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h due to the scripts/clean-header-guards.pl bug fixed in the previous commit. Commit a8b991b52dc "Clean up ill-advised or unusual header guards" missed include/hw/xen/io/ring.h for the same reason. Commit 3979fca4b69 "disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h" neglected to update the guard symbol for the rename. Commit a331c6d7741 "semihosting: implement a semihosting console" created include/hw/semihosting/console.h with an ill-advised guard symbol. Clean them up. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-4-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-12Normalize position of header guardMarkus Armbruster1-5/+4
This is the common header guard idiom: /* * File comment */ #ifndef GUARD_SYMBOL_H #define GUARD_SYMBOL_H ... actual contents ... #endif A few of our headers have some #include before the guard. target/tilegx/spr_def_64.h has #ifndef __DOXYGEN__ outside the guard. A few more have the #define elsewhere. Change them to match the common idiom. For spr_def_64.h, that means dropping #ifndef __DOXYGEN__. While there, rename guard symbols to make scripts/clean-header-guards.pl happy. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-2-armbru@redhat.com> [Rebased with conflicts resolved automatically]
2019-06-12Include qemu-common.h exactly where neededMarkus Armbruster6-2/+4
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
2019-06-12Include qemu/module.h where needed, drop it from qemu-common.hMarkus Armbruster67-7/+68
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-4-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for hw/usb/dev-hub.c hw/misc/exynos4210_rng.c hw/misc/bcm2835_rng.c hw/misc/aspeed_scu.c hw/display/virtio-vga.c hw/arm/stm32f205_soc.c; ui/cocoa.m fixed up]
2019-06-11qemu-common: Move qemu_isalnum() etc. to qemu/ctype.hMarkus Armbruster2-1/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-3-armbru@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-06-11BootLinuxConsoleTest: Run kerneltests BusyBox on MaltaPhilippe Mathieu-Daudé1-0/+49
This tests boots a Linux kernel on a Malta machine up to a busybox shell on the serial console. Few commands are executed before halting the machine (via reboot). We use the initrd cpio image from the kerneltests project: https://kerneltests.org/ If MIPS is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:mips" tags. Alternatively, this test can be run using: $ avocado --show=console run -t arch:mips tests/acceptance/boot_linux_console.py [...] console: Boot successful. [...] console: / # uname -a console: Linux buildroot 4.5.0-2-4kc-malta #1 Debian 4.5.5-1 (2016-05-29) mips GNU/Linux console: / # reboot console: / # reboot: Restarting system Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520231910.12184-4-f4bug@amsat.org> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-06-11BootLinuxConsoleTest: Test nanoMIPS kernels on the I7200 CPUPhilippe Mathieu-Daudé1-0/+58
Similar to the x86_64/pc test, it boots a Linux kernel on a Malta machine and verify the serial is working. Use the documentation added in commit f7d257cb4a17 to test nanoMIPS kernels and the I7200 CPU. This test can be run using: $ avocado --show=console run -t arch:mipsel tests/acceptance/boot_linux_console.py console: [ 0.000000] Linux version 4.15.18-00432-gb2eb9a8b (emubuild@mipscs563) (gcc version 6.3.0 (Codescape GNU Tools 2018.04-02 for nanoMIPS Linux)) #1 SMP Wed Jun 27 11:10:08 PDT 2018 console: [ 0.000000] GCRs appear to have been moved (expected them at 0x1fbf8000)! console: [ 0.000000] GCRs appear to have been moved (expected them at 0x1fbf8000)! console: [ 0.000000] CPU0 revision is: 00010000 (MIPS GENERIC QEMU) console: [ 0.000000] MIPS: machine is mti,malta console: [ 0.000000] Determined physical RAM map: console: [ 0.000000] memory: 08000000 @ 00000000 (usable) console: [ 0.000000] earlycon: ns16550a0 at I/O port 0x3f8 (options '38400n8') console: [ 0.000000] bootconsole [ns16550a0] enabled console: [ 0.000000] User-defined physical RAM map: console: [ 0.000000] memory: 10000000 @ 00000000 (usable) console: [ 0.000000] Initrd not found or empty - disabling initrd console: [ 0.000000] MIPS CPS SMP unable to proceed without a CM console: [ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. console: [ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes console: [ 0.000000] This processor doesn't support highmem. -262144k highmem ignored console: [ 0.000000] Zone ranges: console: [ 0.000000] Normal [mem 0x0000000000000000-0x000000000fffffff] console: [ 0.000000] HighMem empty console: [ 0.000000] Movable zone start for each node console: [ 0.000000] Early memory node ranges console: [ 0.000000] node 0: [mem 0x0000000000000000-0x000000000fffffff] console: [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff] console: [ 0.000000] random: get_random_bytes called from start_kernel+0x60/0x2f0 with crng_init=0 console: [ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s36620 r8192 d20724 u65536 console: [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960 console: [ 0.000000] Kernel command line: printk.time=0 mem=256m@@0x0 console=ttyS0 earlycon Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520231910.12184-3-f4bug@amsat.org> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-06-11BootLinuxConsoleTest: Test the SmartFusion2 boardPhilippe Mathieu-Daudé1-0/+27
Similar to the x86_64/pc test, it boots a Linux kernel on an Emcraft board and verify the serial is working. If ARM is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:arm" tags. Alternatively, this test can be run using: $ avocado run -t arch:arm tests/acceptance $ avocado run -t machine:emcraft_sf2 tests/acceptance Based on the recommended test setup from Subbaraya Sundeep: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg03810.html Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520220635.10961-3-f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-06-11BootLinuxConsoleTest: Do not log empty linesPhilippe Mathieu-Daudé1-2/+4
Avoid to log empty lines in console debug logs. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520220635.10961-2-f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-06-11tests/boot_linux_console: Let extract_from_deb handle various compressionsPhilippe Mathieu-Daudé1-2/+3
Debian binary package format supports various compressions. Per man deb(5): NAME deb - Debian binary package format FORMAT ... The third, last required member is named data.tar. It contains the filesystem as a tar archive, either not compressed (supported since dpkg 1.10.24), or compressed with gzip (with .gz extension), xz (with .xz extension, supported since dpkg 1.15.6), bzip2 (with .bz2 extension, supported since dpkg 1.10.24) or lzma (with .lzma extension, supported since dpkg 1.13.25). List the archive files to have the 3rd name with the correct extension. The function avocado.utils.archive.extract() will handle the different compression format for us. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190312234541.2887-2-philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>