aboutsummaryrefslogtreecommitdiff
path: root/tests/ptimer-test-stubs.c
AgeCommit message (Collapse)AuthorFilesLines
2019-08-20util/qemu-timer: refactor deadline calculation for external timersPavel Dovgalyuk1-2/+2
icount-based record/replay uses qemu_clock_deadline_ns_all to measure the period until vCPU may be interrupted. This function takes in account the virtual timers, because they belong to the virtual devices that may generate interrupt request or affect the virtual machine state. However, there are a subset of virtual timers, that are marked with 'external' flag. These do not change the virtual machine state and only based on virtual clock. Calculating the deadling using the external timers breaks the determinism, because they do not belong to the replayed part of the virtual machine. This patch fixes the deadline calculation for this case by adding new parameter for skipping the external timers when it is needed. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> -- v2 changes: - added new parameter for timer attribute mask Message-Id: <156404426682.18669.17014100602930969222.stgit@pasha-Precision-3630-Tower> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-10-19qemu-timer: introduce timer attributesArtem Pisarenko1-4/+9
Attributes are simple flags, associated with individual timers for their whole lifetime. They intended to be used to mark individual timers for special handling when they fire. New/init functions family in timer interface updated and refactored (new 'attribute' argument added, timer_list replaced with timer_list_group+type combinations, comments improved to avoid info duplication). Also existing aio interface extended with attribute-enabled variants of functions, which create/initialize timers. Signed-off-by: Artem Pisarenko <artem.k.pisarenko@gmail.com> Message-Id: <f47b81dbce734e9806f9516eba8ca588e6321c2f.1539764043.git.artem.k.pisarenko@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-09-19ptimer-test: do not link to libqemustub.a/libqemuutil.aPaolo Bonzini1-0/+4
This test provides its own mocks, so do not use the "standard" stubs in libqemustub.a or the event loop implementation in libqemuutil.a. This is required on OS X, which otherwise brings in qemu-timer.o, async.o and main-loop.o from libqemuutil.a. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-01tests: fix ptimer leaksMarc-André Lureau1-0/+5
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2016-10-24tests: ptimer: Change the copyright commentDmitry Osipenko1-1/+1
Eric Blake suggested that use of "Author:" in the copyright text of the files created by individuals is incorrect, replace it with "Copyright". Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Message-id: 9d8b626f462d4a5094b1945fbd763b8a2e28dd86.1475421224.git.digetx@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-17tests: cleanup ptimer-testPaolo Bonzini1-0/+7
1) ptimer-test is not a qtest---it runs the ptimer.c code directly in the ptimer-test process 2) ptimer-test has its own stubs file, so there is no need to add more stubs to stubs/vmstate.c Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-09-22tests: Add ptimer testsDmitry Osipenko1-0/+107
Ptimer is a generic countdown timer helper that is used by many timer device models as well as by the QEMU core. Add QTests for the ptimer. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Message-id: 1de89fe6e1ccaf6c8071ee3469e1a844df948359.1473252818.git.digetx@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>