drivers/machines, discover the path and
run tests.
graph.h provides the public API to manage the graph nodes/edges
graph_extra.h provides a more private API used successively by the gtest
integration part
qos-test.c provides the main executable
Signed-off-by: Emanuele Giuseppe Esposito
nodes.
Also rename qvirtio_mmio_init_device in qvirtio_mmio_device_new, since the
function
actually allocates a new QVirtioMMIODevice and initialize it.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Laurent Vivier
---
tests/libqos/virtio-mmio.c | 66 ++
tests/libqo
This function is intended to group all the qvirtio_* functions that
start the qvirtio devices.
Applied in all tests using this combination of functions.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/libqos/virtio.c| 7 +++
tests/libqos/virtio.h| 1 +
tests/vhost-user-test.c
vhost-user-test has not converted to qgraph yet, and since
it uses virtio interface, it won't work, causing make check
to fail.
Commented out until it does not get converted to graph node.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 8
1 file chang
Add qgraph nodes for virtio-blk-pci and virtio-blk-device.
Both nodes produce virtio-blk, but virtio-blk-pci receives
a pci-bus and uses virtio-pci QOSGraphObject and functions,
while virtio-blk-device receives a virtio and implements
its own functions
Signed-off-by: Emanuele Giuseppe Esposito
Add qgraph nodes for virtio-rng-pci and virtio-rng-device.
Both nodes produce virtio-rng, but virtio-rng-pci receives
a pci-bus and uses virtio-pci QOSGraphObject and functions,
while virtio-rng-device receives a virtio and implements
its own functions
Signed-off-by: Emanuele Giuseppe Esposito
Add arm/virt machine to the graph. This machine contains virtio-mmio, so
its constructor must take care of setting it properly when called.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 1 +
tests/libqos/virt-machine.c | 90 +
2
file mode 100644
index 00..98d2548ffe
--- /dev/null
+++ b/tests/libqos/virtio-balloon.c
@@ -0,0 +1,111 @@
+/*
+ * libqos driver framework
+ *
+ * Copyright (c) 2018 Emanuele Giuseppe Esposito
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of
+ *
+ * Copyright (c) 2018 Emanuele Giuseppe Esposito
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that
anism
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 4 +---
tests/virtio-serial-test.c | 27 +--
2 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index a160059758..eafceefc12 100644
test does not allocate any virtio-blk structure,
it's all done by the qtest walking graph mechanism
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 4 +-
tests/virtio-blk-test.c | 468
2 files changed, 190 insertions(+), 282
anism
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 5 +++--
tests/libqos/virtio.c | 1 +
tests/virtio-console-test.c | 30 +++---
3 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/tests/Makefile.include b/
new file mode 100644
index 00..332d121486
--- /dev/null
+++ b/tests/libqos/virtio-net.c
@@ -0,0 +1,179 @@
+/*
+ * libqos driver framework
+ *
+ * Copyright (c) 2018 Emanuele Giuseppe Esposito
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms
this test does not allocate any virtio-scsi structure,
it's all done by the qtest walking graph mechanism
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +-
tests/virtio-scsi-test.c | 153 +++
2 files changed, 75 inserti
test does not allocate any virtio-rng structure,
it's all done by the qtest walking graph mechanism
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/virtio-rng-test.c | 25 +
2 files changed, 10 insertions(+), 18 deletions(-)
di
anism
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 4 +---
tests/virtio-balloon-test.c | 22 +++---
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 362d9ec4b2..b23597972d 100644
..df60db8f39
--- /dev/null
+++ b/tests/libqos/virtio-9p.c
@@ -0,0 +1,165 @@
+/*
+ * libqos driver framework
+ *
+ * Copyright (c) 2018 Emanuele Giuseppe Esposito
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License
/virtio-scsi.c
new file mode 100644
index 00..8f13c0bfaf
--- /dev/null
+++ b/tests/libqos/virtio-scsi.c
@@ -0,0 +1,117 @@
+/*
+ * libqos driver framework
+ *
+ * Copyright (c) 2018 Emanuele Giuseppe Esposito
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it
test does not allocate any virtio-net structure,
it's all done by the qtest walking graph mechanism
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +-
tests/virtio-net-test.c | 161
2 files changed, 49 insertions(+), 115
Add arm/smdkc210 machine machine to the graph. This machine contains
generic-sdhci, so
its constructor must take care of setting it properly when called.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 9 ++--
tests/libqos/smdkc210-machine.c | 82
-by: Emanuele Giuseppe Esposito
Emanuele Giuseppe Esposito (16):
test/qgraph: arm/smdkc210 machine node
test/qgraph: arm/sabrelite machine node
test/qgraph: arm/xlinx-zynq-a9 machine node
test/qgraph: aarch64/xlnx-zcu102 machine node
test/qgraph: ac97 test node
test/qgraph: tpci200 test
Add xlinx-zynq-a9 machine to the graph. This machine contains generic-sdhci, so
its constructor must take care of setting it properly when called.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include| 1 +
tests/libqos/xilinx-zynq-a9-machine.c | 84
Add xlnx-zcu102 machine to the graph. This machine contains generic-sdhci, so
its constructor must take care of setting it properly when called.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 1 +
tests/libqos/xlnx-zcu102-machine.c | 83
Convert tests/ipoctal232-test in qgraph test node,
ipoctal232-test. Since it's a nop test, node creation and
initialization is made in the same file.
This test creates a tpci200 node that produces an interface ipack
consumed by the ipoctal232 device.
Signed-off-by: Emanuele Giuseppe Esp
Convert tests/tpci200-test in qgraph test node,
tpci200-test. Since it's a nop test, node creation and
initialization is made in the same file.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 2 +-
tests/tpci200-test.c | 60 +++-
Convert tests/ne2000-test in qgraph test node,
ne2000-test. Since it's a nop test, node creation and
initialization is made in the same file.
The actual device consumed by the test is ne2k_pci.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/ne2000-t
Add arm/sabrelite machine to the graph. This machine contains generic-sdhci, so
its constructor must take care of setting it properly when called.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 1 +
tests/libqos/sabrelite-machine.c | 82
Convert tests/spapr-phb-test in qgraph test node,
spapr-phb-test. This test adds another
spapr-pci-host-bridge device in the
ppc64/pseries machine
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/spapr-phb-test.c | 28 +++-
2 files
Convert tests/vmxnet3-test in qgraph test node,
vmxnet3-test. Since it's a nop test, node creation and
initialization is made in the same file.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/vmxnet3-test.c | 39 ++---
Convert tests/ac97-test in qgraph test node,
ac97-test. Since it's a nop test, node creation and
initialization is made in the same file.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/ac97-test.c | 39 ++-
2
Convert tests/pcnet-test in qgraph test node,
pcnet-test. Since it's a nop test, node creation and
initialization is made in the same file.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/pcnet-test.c | 39 ++-
2
Convert tests/es1370-test in qgraph test node,
es1370-test. Since it's a nop test, node creation and
initialization is made in the same file.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/es1370-test.c| 39 ++---
Convert tests/eepro100-test in qgraph test nodes,
eepro100-test. Since it's a nop test, node creation and
initialization is made in the same file.
In addition, all nodes share the same constructor and
destructor.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include
Convert tests/nvme-test in qgraph test node,
nvme-test. Since it's a nop test, node creation and
initialization is made in the same file.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
tests/nvme-test.c | 43
Convert tests/usb-hcd-ohci-test in qgraph test node,
usb-hcd-ohci-test. Since it's a nop test, node creation and
initialization is made in the same file.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include| 4 +---
tests/usb-hcd-ohci-test.c
Convert tests/e1000-test in qgraph test nodes,
e1000-test. Since it's a nop test, node creation and
initialization is made in the same file.
In addition, all nodes share the same constructor and
destructor.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/Makefile.include | 3 +--
+--
tests/qemu-iotests/testrunner.py | 15 +-
4 files changed, 81 insertions(+), 49 deletions(-)
I can confirm that this helps a lot when debugging tests.
Tested-by: Emanuele Giuseppe Esposito
Extend the _post_launch function to include the timer as
parameter instead of defaulting to 15 sec.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py | 4 ++--
python/qemu/qtest.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/python/qemu
separately.
Emanuele Giuseppe Esposito (3):
python: qemu: add timer parameter for qmp.accept socket
qemu-iotests: add option to attach gdbserver
qemu-iotests: add gdbserver option to script tests too
python/qemu/machine.py| 8 +---
python/qemu/qtest.py | 8 +---
tests/qe
The only limitation here is that running a script with gdbserver
will make the test output mismatch with the expected
results, making the test fail.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/common.rc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
ript will ignore the
environmental variable.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py| 4 +++-
python/qemu/qtest.py | 4 +++-
tests/qemu-iotests/check | 5 -
tests/qemu-iotests/iotests.py | 7 ++-
tests/qemu-iotests/testenv.py | 15
series is tested on the previous serie
"qemu-iotests: quality of life improvements"
but independent from it, so it can be applied separately.
Signed-off-by: Emanuele Giuseppe Esposito
---
v2:
- add valgrind and print patches
- better splitup of patches, and clearer commit messages
Emanuel
Extend the _post_launch function to include the timer as
parameter instead of defaulting to 15 sec.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py | 4 ++--
python/qemu/qtest.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/python/qemu
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py | 2 +-
python/qemu/qtest.py | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index c721e07d63..18d32ebe45 100644
--- a/python/qemu/machine.py
+++ b
The only limitation here is that running a script with gdbserver
will make the test output mismatch with the expected
results, making the test fail.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/common.rc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout expires too soon.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py| 4 +++-
tests/qemu-iotests/iotests.py | 8
2 files changed, 7 insertions(+), 5 deletions(-)
diff
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 17f07710db..8f6bb20af5 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu
Add -gdb flag and GDB_QEMU environmental variable
to python tests to attach a gdbserver to each qemu instance.
if -gdb is not provided but $GDB_QEMU is set, ignore the
environmental variable.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 6 +-
tests/qemu
When using valgrind on the test scripts, it generates a log file
in $TEST_DIR that is either print (if valgrind finds problems) or
otherwise deleted. Provide the same exact behavior when using
-valgrind on the python tests.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests
Attaching a gdbserver implies that the qmp socket
should wait indefinitely for an answer from QEMU.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py| 4 +++-
tests/qemu-iotests/iotests.py | 21 +
2 files changed, 20 insertions(+), 5 deletions
Using the flag -p, allow the qemu binary to print to stdout.
This is helpful especially for print-debugging.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 3 ++-
tests/qemu-iotests/iotests.py | 9 +
tests/qemu-iotests/testenv.py | 9 +++--
3 files
The priority will be given to gdb command line, meaning if -gdb
and -valgrind parameters are given, only gdb will be wrapped around
the qemu binary.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
lgrind
PID to assign to the log file name, use the "%p" flag in valgrind
log file name that automatically puts the process PID at runtime.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 11 +++
tests/qemu-iotests/testenv.py | 1 +
2 files ch
On 08/04/2021 10:26, Markus Armbruster wrote:
Emanuele Giuseppe Esposito writes:
This series adds the option to attach gdbserver and valgrind
to the QEMU binary running in qemu_iotests.
It also allows to redirect QEMU binaries output of the python tests
to the stdout, instead of a log file
On 08/04/2021 14:39, Markus Armbruster wrote:
Emanuele Giuseppe Esposito writes:
On 08/04/2021 10:26, Markus Armbruster wrote:
Emanuele Giuseppe Esposito writes:
This series adds the option to attach gdbserver and valgrind
to the QEMU binary running in qemu_iotests.
It also allows to
lo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 28 +---
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 2c0b9b0ee8..8f19d991fa 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -79
handle the
yielding.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 31 ++-
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 8f19d991fa..e37f999254 100644
--- a
Add a counter for each action that a rule can trigger.
This is mainly used to keep track of how many coroutine_yeld()
we need to perform after processing all rules in the list.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 17
protect rules and suspended_reqs.
Signed-off-by: Emanuele Giuseppe Esposito
Emanuele Giuseppe Esposito (5):
blkdebug: refactor removal of a suspended request
blkdebug: move post-resume handling to resume_req_by_tag
blkdebug: track all actions
blkdebug: do not suspend in the middle of
Use actions_count to see how many yeld to issue.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 388b5ed615..dffd869b32 100644
--- a
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index dffd869b32..e92a35ccbb 100644
--- a/block/blkdebug.c
+++ b
On 08/04/2021 17:40, Paolo Bonzini wrote:
On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote:
+ self.gdb_qemu = os.getenv('GDB_QEMU')
+
+ if gdb and not self.gdb_qemu:
+ self.gdb_qemu = 'localhost:12345'
+ elif self.gdb_qemu and not g
On 08/04/2021 17:40, Paolo Bonzini wrote:
On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote:
def get_qmp_events_filtered(self, wait=60.0):
result = []
- for ev in self.get_qmp_events(wait=wait):
+ qmp_wait = wait
+ if qemu_gdb:
+ qmp_wait
--- a/python/qemu/qtest.py
+++ b/python/qemu/qtest.py
@@ -138,9 +138,9 @@ def _pre_launch(self) -> None:
super()._pre_launch()
self._qtest = QEMUQtestProtocol(self._qtest_path, server=True)
- def _post_launch(self) -> None:
+ def _post_launch(self, timer) -> None:
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index c721e07d63..18d32ebe45 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -109,7 +109,7 @@ def __init__(self,
self._binary = binary
self._args = list(args)
- self._wrapper = wrapper
+
On 08/04/2021 21:03, Paolo Bonzini wrote:
Il gio 8 apr 2021, 18:06 Emanuele Giuseppe Esposito <mailto:eespo...@redhat.com>> ha scritto:
On 08/04/2021 17:40, Paolo Bonzini wrote:
> On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote:
>> def get_q
uint64_t slice_ns)
{
+QEMU_LOCK_GUARD(&limit->lock);
limit->slice_ns = slice_ns;
limit->slice_quota = MAX(((double)speed * slice_ns) / 10ULL, 1);
}
Reviewed-by: Emanuele Giuseppe Esposito
series is tested on the previous serie
"qemu-iotests: quality of life improvements"
but independent from it, so it can be applied separately.
Signed-off-by: Emanuele Giuseppe Esposito
---
v3:
- Introduce the class field _qmp_timer instead of a function parameter
in the _post_launch() func
Add a new _qmp_timer field to the QEMUMachine class.
The default timer is 15 sec, as per the default in the
qmp accept() function.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/python/qemu/machine.py b
Add -gdb flag and GDB_QEMU environmental variable
to python tests to attach a gdbserver to each qemu instance.
if -gdb is not provided but $GDB_QEMU is set, ignore the
environmental variable.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 6 +-
tests/qemu
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/qtest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/qemu/qtest.py b/python/qemu/qtest.py
index 39a0cf62fe..c18eae96c6 100644
--- a/python/qemu/qtest.py
+++ b/python/qemu/qtest.py
@@ -111,6 +111,7
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 380527245e..4f3fb13915 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu
Introduce the "Debugging a test case" section, in preparation
to the additional flags that will be added in the next patches.
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 8
1 file changed, 8 insertions(+)
diff --git a/docs/devel/testing.rst b/
The only limitation here is that running a script with gdbserver
will make the test output mismatch with the expected
results, making the test fail.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/common.rc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
The priority will be given to gdb command line, meaning if the -gdb
parameter and -valgrind are given, gdb will be wrapped around
the qemu binary.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 7 +++
1 file changed, 7 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index b7e2370e7e..2ee77a057b 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -229,6 +229,13
ing
PID to assign to the log file name, use the "%p" flag in valgrind
log file name that automatically puts the process PID at runtime.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 7 ---
tests/qemu-iotests/iotests.py | 11 +++
tests/qemu-iot
When using -valgrind on the script tests, it generates a log file
in $TEST_DIR that is either read (if valgrind finds problems) or
otherwise deleted. Provide the same exact behavior when using
-valgrind on the python tests.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests
Attaching a gdbserver implies that the qmp socket
should wait indefinitely for an answer from QEMU.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py| 3 +++
tests/qemu-iotests/iotests.py | 10 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 4
1 file changed, 4 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 62902cfd2d..0c18fc4571 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -246,6 +246,10 @@ given as
Using the flag -p, allow the qemu binary to print to stdout.
This helps especially when doing print-debugging.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 3 ++-
tests/qemu-iotests/iotests.py | 9 +
tests/qemu-iotests/testenv.py | 9 +++--
3 files
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout timeout too soon.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py| 2 +-
tests/qemu-iotests/iotests.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 7 +++
1 file changed, 7 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 2ee77a057b..62902cfd2d 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -236,6 +236,13 @@ given
https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg01398.html
Signed-off-by: Emanuele Giuseppe Esposito
---
v1 (2017) -> v2 (2021):
- v1 Patch "block-backup: add reqs_lock" has been dropped, because now
is completely different from the old version and all functions
that were affect
Reviewed-by: Stefan Hajnoczi
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/write-threshold.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/block/write-threshold.c b/block/write-threshold.c
index
For simplicity, use bdrv_drained_begin/end to avoid concurrent
writes to the write threshold, or reading it while it is being set.
qmp_block_set_write_threshold is protected by the BQL.
Reviewed-by: Stefan Hajnoczi
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reads access the list in RCU style, so be careful to avoid use-after-free
scenarios in the backup block job. Apart from this, all that's needed
is protecting updates with a mutex.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
bl
aders complete, no matter how "readers" are defined. In the next patch,
for example, synchronize_rcu's role is taken by bdrv_drain (which is a
superset of synchronize_rcu, since it also blocks new incoming readers).
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Paolo Bonzini
Signed-off-b
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
include/block/block_int.h | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index a1aad5ad2d..67a0777e12 100644
Reopen needs to handle AioContext carefully due to calling
bdrv_drain_all_begin/end. By not taking AioContext around calls to
bdrv_reopen_multiple, we can drop the function's release/acquire
pair and the AioContext argument too.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giu
Replication functions are mostly called when the BDS is quiescent and
does not have any pending I/O. They do not need to synchronize on
anything since BDS and BB are now thread-safe.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/replication.c | 54
Make the (only) caller do it.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 22 +-
blockdev.c| 7 ++-
include/block/block.h | 1 +
3 files changed, 12 insertions(+), 18
This serie of patches continues Paolo's series on making the
block layer thread safe. Add a CoMutex lock for both tasks and
calls list present in block/block-copy.c
Signed-off-by: Emanuele Giuseppe Esposito
Emanuele Giuseppe Esposito (3):
block-copy: improve documentation for BlockCop
.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index 39ae481c8b..03df50a354 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -48,25 +48,32
Because the list of tasks is only modified by coroutine
functions, add a CoMutex in order to protect the list of tasks.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/block/block
Use the same tasks_lock, since the calls list is just used
for debug purposes.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index e785ac57e0..555f5fb747 100644
On 20/04/2021 14:03, Vladimir Sementsov-Ogievskiy wrote:
20.04.2021 13:04, Emanuele Giuseppe Esposito wrote:
As done in BlockCopyCallState, categorize BlockCopyTask
in IN, State and OUT fields. This is just to understand
which field has to be protected with a lock.
Also add coroutine_fn
On 22/04/2021 00:09, Vladimir Sementsov-Ogievskiy wrote:
write-notifiers are used only for write-threshold. New code for such
purpose should create filters.
Let's handle write-threshold simply in generic code and drop write
notifiers at all.
Also move part of write-threshold API that is used
On 30/04/2021 13:59, Max Reitz wrote:
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote:
Attaching a gdbserver implies that the qmp socket
should wait indefinitely for an answer from QEMU.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py | 3 +++
tests/qemu
On 30/04/2021 13:38, Max Reitz wrote:
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote:
Add -gdb flag and GDB_QEMU environmental variable
to python tests to attach a gdbserver to each qemu instance.
Well, this patch doesn’t do this, but OK.
Maybe "define" rather than &qu
401 - 500 of 1130 matches
Mail list logo