aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-01-31qtest: add ivshmem-test for ppc64Laurent Vivier
The test has been converted to use libqos, we can now use it on ppc64. We also make the test fail on all other architectures. As libqos on ppc64 is not able to manage hotplug and IRQ/MSI, we disable this part in the test on ppc64. Signed-off-by: Laurent Vivier <lvivier@redhat.com> [dwg: Make test conditional on CONFIG_EVENTFD] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-01-31qtest: convert ivshmem-test to use libqosLaurent Vivier
This will allow to use it with ppc64. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-01-31libqos: fix spapr qpci_map()Laurent Vivier
Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-01-31qtest: add display-vga-test to ppc64Laurent Vivier
Only enable for ppc64 in the Makefile, but added code in the file to check cirrus card only on architectures supporting it (alpha, mips, i386, x86_64). Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Tested-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-01-31qtest: add netfilter tests for ppc64Laurent Vivier
Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Tested-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-01-27char: rename CharDriverState ChardevMarc-André Lureau
Pick a uniform chardev type name. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-27tests: fix linking test-char on win32Marc-André Lureau
test.char.exe fails to link: qemu-char.o: In function `win_chr_free': /home/elmarco/src/qemu/qemu-char.c:2149: undefined reference to `qemu_del_polling_cb' /home/elmarco/src/qemu/qemu-char.c:2151: undefined reference to `qemu_del_polling_cb' qemu-char.o: In function `win_stdio_thread': /home/elmarco/src/qemu/qemu-char.c:2568: undefined reference to `qemu_del_wait_object' qemu-char.o: In function `qemu_chr_open_stdio': /home/elmarco/src/qemu/qemu-char.c:2661: undefined reference to `qemu_add_wait_object' /home/elmarco/src/qemu/qemu-char.c:2646: undefined reference to `qemu_add_wait_object' ... It needs main-loop.o symbols, among others. Linking with $(test-block-obj-y) brings what's necessary. We could try to eventually strip to the minimum if needed. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-27Merge remote-tracking branch 'remotes/berrange/tags/pull-qio-2017-01-26-1' ↵Peter Maydell
into staging Merge io/ 2017/01/26 # gpg: Signature made Thu 26 Jan 2017 10:26:48 GMT # gpg: using RSA key 0xBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/pull-qio-2017-01-26-1: io: fix possible double free of task error object Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-26io: fix possible double free of task error objectDaniel P. Berrange
If a QIOTask has an error set and the calling code uses qio_task_propagate_error() to steal the reference to that Error object, the task would not clear its own reference. This would lead to a double-free when qio_task_free runs, if the caller had (correctly) freed the Error object they now owned. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-01-26test-hbitmap: Add hbitmap_is_serializable() callsMax Reitz
Add calls to hbitmap_is_serializable() (asserting that it returns true) where necessary (i.e. before every series of (de-)serialization function invocations). Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20161115225746.3590-3-mreitz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-01-25Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into stagingPeter Maydell
This pull request fixes a 2.9 regression and a long standing bug that can cause 9p clients to hang. Other patches are minor enhancements. # gpg: Signature made Wed 25 Jan 2017 10:12:27 GMT # gpg: using DSA key 0x02FC3AEB0101DBC2 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" # gpg: aka "Greg Kurz <groug@free.fr>" # gpg: aka "Greg Kurz <gkurz@fr.ibm.com>" # gpg: aka "Greg Kurz <gkurz@linux.vnet.ibm.com>" # gpg: aka "Gregory Kurz (Groug) <groug@free.fr>" # gpg: aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>" # gpg: aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.com>" # 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: 2BD4 3B44 535E C0A7 9894 DBA2 02FC 3AEB 0101 DBC2 * remotes/gkurz/tags/for-upstream: 9pfs: fix offset error in v9fs_xattr_read() 9pfs: local: trivial cosmetic fix in pwritev op 9pfs: fix off-by-one error in PDU free list tests: virtio-9p: improve error reporting 9pfs: add missing coroutine_fn annotations Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-25Merge remote-tracking branch 'remotes/xtensa/tags/20170124-xtensa' into stagingPeter Maydell
target/xtensa updates: - refactor CCOUNT/CCOMPARE (use QEMU timers instead of instruction counting); - support icount; run target/xtensa TCG tests with icount; - implement SMP prerequisites: static vector selection, RUNSTALL and RER/WER. # gpg: Signature made Wed 25 Jan 2017 00:27:51 GMT # gpg: using RSA key 0x51F9CC91F83FA044 # gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>" # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" # Primary key fingerprint: 2B67 854B 98E5 327D CDEB 17D8 51F9 CC91 F83F A044 * remotes/xtensa/tags/20170124-xtensa: target-xtensa: implement RER/WER instructions target/xtensa: tests: clean up interrupt tests target/xtensa: tests: add memctl test target/xtensa: implement MEMCTL SR target/xtensa: fix ICACHE/DCACHE options detection target/xtensa: tests: add ccount write tests target/xtensa: tests: replace hardcoded interrupt masks target/xtensa: tests: fix timer tests target/xtensa: tests: run tests with icount target/xtensa: don't continue translation after exception target/xtensa: support icount target/xtensa: refactor CCOUNT/CCOMPARE target/xtensa: implement RUNSTALL target/xtensa: add static vectors selection Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-25tests: virtio-9p: improve error reportingGreg Kurz
Signed-off-by: Greg Kurz <groug@kaod.org>
2017-01-24tests/migration: Add test for QTAILQ migrationJianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-4-git-send-email-duanj@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2017-01-23io: remove Error parameter from QIOTask thread workerDaniel P. Berrange
Now that task objects have a directly associated error, there's no need for an an Error **errp parameter to the QIOTask thread worker function. It already has a QIOTask object, so can directly set the error on it. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-01-23io: change the QIOTask callback signatureDaniel P. Berrange
Currently the QIOTaskFunc signature takes an Object * for the source, and an Error * for any error. We also need to be able to provide a result pointer. Rather than continue to add parameters to QIOTaskFunc, remove the existing ones and simply pass the QIOTask object instead. This has methods to access all the other data items required in the callback impl. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-01-23io: stop incrementing reference in qio_task_get_sourceDaniel P. Berrange
Incrementing the reference in qio_task_get_source is not necessary, since we're not running concurrently with any other code touching the QIOTask. This minimizes chances of further memory leaks. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-01-20Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* QOM interface fix (Eduardo) * RTC fixes (Gaohuai, Igor) * Memory leak fixes (Li Qiang, me) * Ctrl-a b regression (Marc-André) * Stubs cleanups and fixes (Leif, me) * hxtool tweak (me) * HAX support (Vincent) * QemuThread, exec.c and SCSI fixes (Roman, Xinhua, me) * PC_COMPAT_2_8 fix (Marcelo) * stronger bitmap assertions (Peter) # gpg: Signature made Fri 20 Jan 2017 12:49:01 GMT # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # 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: (35 commits) pc.h: move x-mach-use-reliable-get-clock compat entry to PC_COMPAT_2_8 bitmap: assert that start and nr are non negative Revert "win32: don't run subprocess tests on Mingw32 platform" hax: add Darwin support Plumb the HAXM-based hardware acceleration support target/i386: Add Intel HAX files kvm: move cpu synchronization code KVM: PPC: eliminate unnecessary duplicate constants ramblock-notifier: new char: fix ctrl-a b not working exec: Add missing rcu_read_unlock x86: ioapic: fix fail migration when irqchip=split x86: ioapic: dump version for "info ioapic" x86: ioapic: add traces for ioapic hxtool: emit Texinfo headings as @subsection qemu-thread: fix qemu_thread_set_name() race in qemu_thread_create() serial: fix memory leak in serial exit scsi-block: fix direction of BYTCHK test for VERIFY commands pc: fix crash in rtc_set_memory() if initial cpu is marked as hotplugged acpi: filter based on CONFIG_ACPI_X86 rather than TARGET ... # Conflicts: # include/hw/i386/pc.h
2017-01-20aspeed/smc: extend tests for Command modeCédric Le Goater
The Aspeed SMC controllers have a mode (Command mode) in which accesses to the flash content are no different than doing MMIOs. The controller generates all the necessary commands to load (or store) data in memory. So add a couple of tests doing direct reads and writes on the AHB bus. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Message-id: 1483979087-32663-10-git-send-email-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-20aspeed/smc: reset flash after each testCédric Le Goater
Let's make sure when each test is run that the flash object is in an initial state and did not keep configuration from the previous tests. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-id: 1483979087-32663-9-git-send-email-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-16hw: move reset handlers from vl.c to hw/corePaolo Bonzini
They are small, it is not worth stubbing them. Just include them in user-mode emulators and unit tests as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16qom: Make all interface types abstractEduardo Habkost
"qom-list-types abstract=false" currently returns all interface types, as if they were not abstract. Fix this by making sure all interface types are abstract. All interface types have instance_size == 0, so we can use it to set abstract=true on type_initialize(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1481567461-2341-1-git-send-email-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16qapi: add qapi2texi scriptMarc-André Lureau
As the name suggests, the qapi2texi script converts JSON QAPI description into a texi file suitable for different target formats (info/man/txt/pdf/html...). It parses the following kind of blocks: Free-form: ## # = Section # == Subsection # # Some text foo with *emphasis* # 1. with a list # 2. like that # # And some code: # | $ echo foo # | -> do this # | <- get that # ## Symbol description: ## # @symbol: # # Symbol body ditto ergo sum. Foo bar # baz ding. # # @param1: the frob to frobnicate # @param2: #optional how hard to frobnicate # # Returns: the frobnicated frob. # If frob isn't frobnicatable, GenericError. # # Since: version # Notes: notes, comments can have # - itemized list # - like this # # Example: # # -> { "execute": "quit" } # <- { "return": {} } # ## That's roughly following the following EBNF grammar: api_comment = "##\n" comment "##\n" comment = freeform_comment | symbol_comment freeform_comment = { "# " text "\n" | "#\n" } symbol_comment = "# @" name ":\n" { member | tag_section | freeform_comment } member = "# @" name ':' [ text ] "\n" freeform_comment tag_section = "# " ( "Returns:", "Since:", "Note:", "Notes:", "Example:", "Examples:" ) [ text ] "\n" freeform_comment text = free text with markup Note that the grammar is ambiguous: a line "# @foo:\n" can be parsed both as freeform_comment and as symbol_comment. The actual parser recognizes symbol_comment. See docs/qapi-code-gen.txt for more details. Deficiencies and limitations: - the generated QMP documentation includes internal types - union type support is lacking - type information is lacking in generated documentation - doc comment error message positions are imprecise, they point to the beginning of the comment. - a few minor issues, all marked TODO/FIXME in the code Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170113144135.5150-16-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [test-qapi.py tweaked to avoid trailing empty lines in .out] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2017-01-15target/xtensa: tests: clean up interrupt testsMax Filippov
Don't use hardcoded software interrupt masks, use XCHAL macros. Mask off timer interrupt bits that are not checked for. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-01-15target/xtensa: tests: add memctl testMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-01-15target/xtensa: tests: add ccount write testsMax Filippov
Check that CCOUNT SR is writable and that CCOMPARE timers are updated when CCOUNT is written to. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-01-15target/xtensa: tests: replace hardcoded interrupt masksMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-01-15target/xtensa: tests: fix timer testsMax Filippov
Don't expect that CCOUNT increments are equal to the number of executed instructions. Verify that timer interrupt does not fire before the programmed CCOMPARE value and does fire after. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-01-15target/xtensa: tests: run tests with icountMax Filippov
Timer tests expect certain determinism in CCOUNT updates and timer interrupts firing. Run QEMU with -icount to get deterministic results. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-01-12Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170110' into stagingPeter Maydell
TCG opcodes for extract, clz, ctz, ctpop # gpg: Signature made Wed 11 Jan 2017 02:12:41 GMT # gpg: using RSA key 0xAD1270CC4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC 16A4 AD12 70CC 4DD0 279B * remotes/rth/tags/pull-tcg-20170110: (65 commits) tcg/i386: Handle ctpop opcode tcg/ppc: Handle ctpop opcode tcg: Use ctpop to generate ctz if needed tests: New test-bitcnt qemu/host-utils.h: Reduce the operation count in the fallback ctpop target-i386: Use ctpop helper target-tilegx: Use ctpop helper target-sparc: Use ctpop helper target-s390x: Avoid a loop for popcnt target-ppc: Use ctpop helper target-alpha: Use ctpop helper tcg: Add opcode for ctpop target-xtensa: Use clrsb helper target-tricore: Use clrsb helper target-arm: Use clrsb helper tcg: Add helpers for clrsb tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR tcg/i386: Handle ctz and clz opcodes tcg/i386: Allow bmi2 shiftx to have non-matching operands tcg/i386: Hoist common arguments in tcg_out_op ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-12libqtest: handle zero length memwrite/memreadGreg Kurz
Some recently added tests pass a zero length to qtest_memwrite(). Unfortunately, the qtest protocol doesn't implement an on-the-wire syntax for zero-length writes and the current code happily sends garbage to QEMU. This causes intermittent failures. It isn't worth the pain to enhance the protocol, so this patch simply fixes the issue by "just return, doing nothing". The same fix is applied to qtest_memread() since the issue also exists in the QEMU part of the "memread" command. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 148412457273.22750.983275587432075569.stgit@bahia Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-10tests: New test-bitcntAlex Bennée
Add some unit tests for bit count functions (currently only ctpop). As the routines are based on the Hackers Delight optimisations I based the test patterns on their tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2017-01-10acpi-test: update expected filesMichael S. Tsirkin
clean up warnings after latest hotplug changes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-01-10tests: pc: add memory hotplug acpi tables testsIgor Mammedov
This also adds SRAT and DSDT blobs for memory hotplug variant Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
2017-01-09Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell
virtio, vhost, pc: fixes Here are some bugfixes that didn't make 2.8. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri 16 Dec 2016 21:13:43 GMT # gpg: using RSA key 0x281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: virtio: avoid using guest_notifier_mask in vhost-user mode pci: fix error message for express slots i386: amd_iommu: fix MMIO register count and access tests/vhost-user-bridge: use contrib/libvhost-user contrib: add libvhost-user tests/vhost-user-bridge: do not accept more than one connection tests/vhost-user-bridge: indicate peer disconnected tests/vhost-user-bridge: remove unnecessary dispatcher_remove tests/vhost-user-bridge: remove false comment Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-09blkverify: Implement bdrv_co_preadv/pwritev/flushKevin Wolf
This enables byte granularity requests for blkverify, and at the same time gets us rid of another user of the BDS-level AIO emulation. The reference output of a test case must be changed because the verification failure message reports byte offsets instead of sectors now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-01-05Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell
staging # gpg: Signature made Wed 04 Jan 2017 13:29:09 GMT # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: iothread: add poll-grow and poll-shrink parameters aio: self-tune polling time virtio: disable virtqueue notifications during polling aio: add .io_poll_begin/end() callbacks virtio: turn vq->notification into a nested counter virtio-scsi: suppress virtqueue kick during processing virtio-blk: suppress virtqueue kick during processing iothread: add polling parameters linux-aio: poll ring for completions virtio: poll virtqueues for new buffers aio: add polling mode to AioContext aio: add AioPollFn and io_poll() interface aio: add flag to skip fds to aio_dispatch() HACKING: document #include order Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-03aio: add AioPollFn and io_poll() interfaceStefan Hajnoczi
The new AioPollFn io_poll() argument to aio_set_fd_handler() and aio_set_event_handler() is used in the next patch. Keep this code change separate due to the number of files it touches. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-3-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-01-03tests: virtio-9p: ".." cannot be used to walk out of the shared directoryGreg Kurz
According to the 9P spec at http://man.cat-v.org/plan_9/5/intro, the parent directory of the root directory of a server's tree is itself. This test hence checks that the qid of the root directory as returned by attach is the same as the qid of ".." when walking from the root directory. Signed-off-by: Greg Kurz <groug@kaod.org>
2017-01-03tests: virtio-9p: no slash in path elements during walkGreg Kurz
The walk operation is expected to fail and to return ENOENT. Signed-off-by: Greg Kurz <groug@kaod.org>
2017-01-03tests: virtio-9p: add walk operation testGreg Kurz
The walk operation is used to traverse the directory tree and to associate paths to fids. A single walk can be used to traverse up to P9_MAXWELEM path elements at the same time. The test creates a path with P9_MAXWELEM elements on the backend (à la 'mkdir -p') and issues a walk operation. The walk is expected to succeed without error. Reference: http://man.cat-v.org/plan_9/5/walk Signed-off-by: Greg Kurz <groug@kaod.org>
2017-01-03tests: virtio-9p: add attach operation testGreg Kurz
The attach operation is used to establish a connection between the client and the server. After this, the client is able to access the underlying filesystem and do I/O. This test simply ensures the operation succeeds without error. Reference: http://man.cat-v.org/plan_9/5/attach Signed-off-by: Greg Kurz <groug@kaod.org>
2017-01-03tests: virtio-9p: add version operation testGreg Kurz
This patch lays the foundations to be able to test 9P operations and provides a test for the version operation as a first example. A 9P request is composed of a T-message sent by the client (guest) to the server (QEMU), and a R-message sent by the server back to the client. The following general calls are available to implement requests for any 9P operations: v9fs_req_init(): allocates the request structure and the guest memory for the T-message v9fs_req_send(): allocates the guest memory for the R-message and sends the T-message to QEMU v9fs_req_recv(): waits for QEMU to answer and does some sanity checks on the returned R-message header v9fs_req_free(): releases the guest memory and the request structure Helpers are provided, to be used by each specific 9P operation to copy data to/from the guest memory. The version operation is used to negotiate the 9P protocol version to be used and the maximum buffer size for exchanged data. It is necessarily the first message of a 9P session. For simplicity, the maximum buffer size is hardcoded to 4k, which should be enough for functional tests. The test simply advertises the "9P2000.L" version to QEMU and expects QEMU to answer it is supported. References: http://man.cat-v.org/plan_9/5/intro http://man.cat-v.org/plan_9/5/version Signed-off-by: Greg Kurz <groug@kaod.org>
2017-01-03tests: virtio-9p: code refactoringGreg Kurz
This moves the test_share static and the QOSState into the QVirtIO9P structure, and put PCI related code in functions with a _pci_ name. This will avoid code duplication in future tests, and allow to add support for non-PCI platforms. Signed-off-by: Greg Kurz <groug@kaod.org>
2017-01-03tests: virtio-9p: rename PCI configuration testGreg Kurz
Signed-off-by: Greg Kurz <groug@kaod.org>
2016-12-22Merge remote-tracking branch ↵Peter Maydell
'remotes/berrange/tags/pull-qcrypto-2016-12-21-2' into staging Merge qcrypto 2016/12/21 v2 # gpg: Signature made Thu 22 Dec 2016 10:46:17 GMT # gpg: using RSA key 0xBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/pull-qcrypto-2016-12-21-2: crypto: add HMAC algorithms testcases crypto: support HMAC algorithms based on nettle crypto: support HMAC algorithms based on glib crypto: support HMAC algorithms based on libgcrypt crypto: add HMAC algorithms framework configure: add CONFIG_GCRYPT_HMAC item crypto: add 3des-ede support when using libgcrypt/nettle cipher: fix leak on initialization error Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-12-22crypto: add HMAC algorithms testcasesLongpeng(Mike)
This patch add HMAC algorithms testcases Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-21crypto: add 3des-ede support when using libgcrypt/nettleLongpeng(Mike)
Libgcrypt and nettle support 3des-ede, so this patch add 3des-ede support when using libgcrypt or nettle. Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-20Move target-* CPU file into a target/ folderThomas Huth
We've currently got 18 architectures in QEMU, and thus 18 target-xxx folders in the root folder of the QEMU source tree. More architectures (e.g. RISC-V, AVR) are likely to be included soon, too, so the main folder of the QEMU sources slowly gets quite overcrowded with the target-xxx folders. To disburden the main folder a little bit, let's move the target-xxx folders into a dedicated target/ folder, so that target-xxx/ simply becomes target/xxx/ instead. Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part] Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part] Acked-by: Michael Walle <michael@walle.cc> [lm32 part] Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part] Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part] Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part] Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part] Acked-by: Richard Henderson <rth@twiddle.net> [alpha part] Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part] Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part] Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [cris&microblaze part] Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part] Signed-off-by: Thomas Huth <thuth@redhat.com>
2016-12-16tests/vhost-user-bridge: use contrib/libvhost-userMarc-André Lureau
Use the libvhost-user library. This ended up being a rather large patch that cannot be easily splitted, due to massive code move and API changes. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>