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
Reviewed-by: Vladimir
to handle the
yielding.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/blkdebug.c | 31 ++-
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
Add a counter for each action that a rule can trigger.
This is mainly used to keep track of how many coroutine_yield()
we need to perform after processing all rules in the list.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
smaller granularity locks to allow multiple
iothread execution in the same block device.
Signed-off-by: Emanuele Giuseppe Esposito
---
v4:
* Patch 5 (new): get rid of new_state and instead use a local variable
* Patch 6: move the state update inside the same guard lock where the new
one
On 03/06/2021 21:02, John Snow wrote:
On 6/3/21 4:06 AM, Emanuele Giuseppe Esposito wrote:
On 03/06/2021 01:23, John Snow wrote:
On 5/20/21 3:52 AM, Emanuele Giuseppe Esposito wrote:
Alsp add a new _qmp_timer field to the QEMUMachine class.
Let's change the default socket timeout
From: John Snow
Pylint prior to 2.8.3 (We pin at >= 2.8.0) includes function and method
signatures as part of its duplicate checking algorithm. This check does
not listen to pragmas, so the only way to disable it is to turn it off
completely or increase the minimum duplicate lines so that it
-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/check | 6 +-
tests/qemu-iotests/iotests.py | 5 +
tests/qemu-iotests/testenv.py | 17 +++--
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/tests/qemu
181659.365531-1-vsement...@virtuozzo.com>
Signed-off-by: Emanuele Giuseppe Esposito
---
v5:
* base this serie on the double dash options, so define --gdb instead of -gdb
* return error if -gdb and -valgrind are used together [Vladimir]
* style changes (do not use subprocess_check_valgrind() but
to the QMP monitor test command execution.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/machine/machine.py | 7 +--
python/qemu/machine/qtest.py | 5 +++--
tests/qemu-iotests/iotests.py | 3 ++-
3 files changed, 10 insertions(+), 5
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
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 8
1 file changed, 8 insertions(+)
There seems to be no benefit in using a field. Replace it with a local
variable.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index dffd869b32..d597753139
Attaching gdbserver implies that the qmp socket
should wait indefinitely for an answer from QEMU.
For Timeout class, create a @contextmanager that
switches Timeout with NoTimeout (empty context manager)
so that if --gdb is set, no timeout will be triggered.
Signed-off-by: Emanuele Giuseppe
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
Reviewed-by: Max Reitz
---
python/qemu/machine/qtest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 11 +++
1 file changed, 11 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 9d6a8f8636..11a0359218 100644
--- a/docs/devel/testing.rst
+++ b
Giuseppe Esposito
---
block/blkdebug.c | 46 +++---
1 file changed, 35 insertions(+), 11 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index d597753139..ac3799f739 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -38,24 +38,27 @@
#include
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 7 +++
1 file changed, 7 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 11a0359218..9cac707ee5 100644
--- a/docs/devel
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
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 d4bfd8f1d6..c547e8c07b 100644
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
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/common.rc | 8 +++-
1 file changed
Using the flag -p, allow the qemu binary to print to stdout.
Also create the common function _close_qemu_log_file() to
avoid accessing machine.py private fields directly and have
duplicate code.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
python
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout and the generic class
Timeout in iotests.py timeouts too soon.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 4 ++--
1 file changed
If --gdb and --valgrind are both defined, return an error.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 4
1 file changed, 4 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 9cac707ee5..c038ca93d4 100644
--- a/docs/devel/testing.rst
+++ b/docs
affect the existing testcases.
Use actions_count to see how many yield to issue.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/blkdebug.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block
lo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
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
-
On 03/06/2021 14:25, Vladimir Sementsov-Ogievskiy wrote:
03.06.2021 14:03, Emanuele Giuseppe Esposito wrote:
So, you just make the class do nothing.. I'd prefer something like this:
@contextmanager
def NoTimeout:
yield
if qemu_gdb:
Timeout = NoTimeout
I am not sure I understand
Attaching gdbserver implies that the qmp socket
should wait indefinitely for an answer from QEMU.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout and the generic class
Timeout in iotests.py timeouts too soon.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 6 +++---
1 file
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
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 e176a84620..e7e3d92d3e 100644
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
Reviewed-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/check | 7
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 8b24e6fb47..719accdb1e 100644
--- a/docs/devel
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 4
1 file changed, 4 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 719accdb1e..e5311cb167 100644
--- a/docs/devel/testing.rst
+++ b/docs
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
Reviewed-by: Vladimir
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 11 +++
1 file changed, 11 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 9d6a8f8636..8b24e6fb47 100644
--- a/docs/devel/testing.rst
+++ b
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
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 8
1 file changed, 8 insertions(+)
-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/check | 6 +-
tests/qemu-iotests/iotests.py | 5 +
tests/qemu-iotests/testenv.py | 17 +++--
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/tests/qemu
.
Signed-off-by: Emanuele Giuseppe Esposito
---
v7:
* Adjust documentation and error message when -gdb and -valgrind are set
at the same time [Eric]
* Add missing Acked-by [John]
Emanuele Giuseppe Esposito (15):
python: qemu: add timer parameter for qmp.accept socket
python: qemu: pass the wrapper
From: John Snow
Pylint prior to 2.8.3 (We pin at >= 2.8.0) includes function and method
signatures as part of its duplicate checking algorithm. This check does
not listen to pragmas, so the only way to disable it is to turn it off
completely or increase the minimum duplicate lines so that it
to the QMP monitor test command execution.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
Acked-by: John Snow
---
python/qemu/machine/machine.py | 7 +--
python/qemu/machine/qtest.py | 5 +++--
tests/qemu-iotests/iotests.py | 3
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
Reviewed-by: Max Reitz
Acked-by: John Snow
---
python/qemu/machine/qtest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/qemu/machine/qtest.py b/python
If -gdb and -valgrind are both defined, return an error.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu
Using the flag -p, allow the qemu binary to print to stdout.
Also create the common function _close_qemu_log_file() to
avoid accessing machine.py private fields directly and have
duplicate code.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
python
Remove read timer in test script when GDB_OPTIONS are set,
so that the bash tests won't timeout while running gdb.
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
it with aiocontext_acquire/release pairs.
These sections will also be removed in future, when the underlaying bdrv_*
API will also be free of context locks.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/mirror.c | 6 ++
block/monitor/block-hmp-cmds.c | 6 --
blockdev.c
patches.
No functional change intended.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/job.h | 33 +++
block.c | 2 +-
block/commit.c | 4 +--
block/mirror.c | 17 +-
block/replication.c | 3 +-
blockdev.c | 2 +-
blockjob.c
Create _locked functions, to make next patch a little bit smaller.
Also set the locking functions as public, so that they can be used
also from structures using the Job struct.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/job.h | 23 +
job.c | 85
unt of changes in patch 5, any suggestion on
how to improve the patch layout is also very much appreciated.
Emanuele Giuseppe Esposito (6):
job: use getter/setters instead of accessing the Job fields directly
job: _locked functions and public job_lock/unlock for next patch
job: minor changes to simpl
This lock is going to replace most of the AioContext locks
in the job and blockjob, so that a Job can run in an arbitrary
AioContext.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/block/blockjob_int.h | 1 +
include/qemu/job.h | 2 +
block/backup.c | 4
Check for NULL id to job_get, so that in the next patch we can
move job_get inside a single critical section of job_create.
Also add missing notifier_list_init for the on_idle NotifierList,
which seems to have been forgot.
Signed-off-by: Emanuele Giuseppe Esposito
---
job.c | 16
This makes it easier to understand what needs to be protected
by a lock and what doesn't.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/job.h | 101 -
1 file changed, 82 insertions(+), 19 deletions(-)
diff --git a/include/qemu/job.h b
-by: Emanuele Giuseppe Esposito
Signed-off-by: Paolo Bonzini
---
block/block-copy.c | 176 +++--
1 file changed, 90 insertions(+), 86 deletions(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index f0dbb4912b..bbcc53ff70 100644
--- a/block/block-copy.c
so outside
coroutines.
- .skip_unallocated is atomic. Including it under the mutex would
increase the critical sections and make them also much more complex.
We can have it as atomic since it is only written from outside and
read by block-copy coroutines.
Signed-off-by: Emanuele Giuseppe Esposito
Moving this function in task_end ensures to update the progress
anyways, even if there is an error.
It also helps in next patch, allowing task_end to have only
one critical section.
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 6
-on: <20210518094058.25952-1-eespo...@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito
---
v5:
* Squash patch 3 (improve comments) with patch 5 (add CoMutex).
* Better comments in block-copy, drop IN/OUT/State categories
* Remove some load_acquire in patch 6, replace them with atomic
Use a local variable instead of referencing BlockCopyState through a
BlockCopyCallState or BlockCopyTask every time.
This is in preparation for next patches.
No functional change intended.
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block
, and read outside.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/block/block-copy.h | 2 ++
block/block-copy.c | 37 ++---
2 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/block-copy.h
index
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 4
1 file changed, 4 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index fa85592a38..28a0b37b84 100644
--- a/docs/devel/testing.rst
+++ b/docs
Using the flag -p, allow the qemu binary to print to stdout.
Also create the common function _close_qemu_log_file() to
avoid accessing machine.py private fields directly and have
duplicate code.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
python
to the QMP monitor test command execution.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
---
python/qemu/machine/machine.py | 7 +--
python/qemu/machine/qtest.py | 5 +++--
tests/qemu-iotests/iotests.py | 3 ++-
3 files changed, 10
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 7 +++
1 file changed, 7 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 8b24e6fb47..fa85592a38 100644
--- a/docs/devel
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
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 e176a84620..e7e3d92d3e 100644
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout and the generic class
Timeout in iotests.py timeouts too soon.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 6 +++---
1 file
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
Reviewed-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/check | 7
Attaching gdbserver implies that the qmp socket
should wait indefinitely for an answer from QEMU.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
Reviewed-by: Max Reitz
---
python/qemu/machine/qtest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py
-off-by: Emanuele Giuseppe Esposito
---
v7:
* While using debugging tests with gdb, I found out that there is a
timer also in bash scripts (common.qemu). Modify patch 8 to remove
the timer when gdb is used.
Emanuele Giuseppe Esposito (15):
python: qemu: add timer parameter for qmp.accept
From: John Snow
Pylint prior to 2.8.3 (We pin at >= 2.8.0) includes function and method
signatures as part of its duplicate checking algorithm. This check does
not listen to pragmas, so the only way to disable it is to turn it off
completely or increase the minimum duplicate lines so that it
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
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 8
1 file changed, 8 insertions(+)
-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/check | 6 +-
tests/qemu-iotests/iotests.py | 5 +
tests/qemu-iotests/testenv.py | 17 +++--
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/tests/qemu
Remove read timer in test script when GDB_OPTIONS are set,
so that the bash tests won't timeout while running gdb.
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
If -gdb and -valgrind are both defined, return an error.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 11 +++
1 file changed, 11 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 9d6a8f8636..8b24e6fb47 100644
--- a/docs/devel/testing.rst
+++ b
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
Reviewed-by: Vladimir
On 28/06/2021 23:00, Eric Blake wrote:
On Mon, Jun 28, 2021 at 02:31:48PM +0200, Emanuele Giuseppe Esposito wrote:
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 7 +++
1 file changed, 7
On 28/06/2021 18:48, John Snow wrote:
On Mon, Jun 28, 2021 at 8:32 AM Emanuele Giuseppe Esposito
mailto:eespo...@redhat.com>> wrote:
This series adds the option to attach gdbserver and valgrind
to the QEMU binary running in qemu_iotests.
It also allows to redirec
On 08/07/2021 12:55, Stefan Hajnoczi wrote:
On Wed, Jul 07, 2021 at 06:58:10PM +0200, Emanuele Giuseppe Esposito wrote:
@@ -406,15 +410,18 @@ void *job_create(const char *job_id, const JobDriver
*driver, JobTxn *txn,
error_setg(errp, "Invalid job ID '%s'&quo
On 08/07/2021 14:56, Stefan Hajnoczi wrote:
On Wed, Jul 07, 2021 at 06:58:12PM +0200, Emanuele Giuseppe Esposito wrote:
This lock is going to replace most of the AioContext locks
in the job and blockjob, so that a Job can run in an arbitrary
AioContext.
Signed-off-by: Emanuele Giuseppe
On 08/07/2021 13:02, Stefan Hajnoczi wrote:
On Wed, Jul 07, 2021 at 06:58:11PM +0200, Emanuele Giuseppe Esposito wrote:
-/** AioContext to run the job coroutine in */
+/**
+ * AioContext to run the job coroutine in.
+ * Atomic.
+ */
AioContext *aio_context
On 08/07/2021 12:50, Stefan Hajnoczi wrote:
On Wed, Jul 07, 2021 at 06:58:09PM +0200, Emanuele Giuseppe Esposito wrote:
diff --git a/job.c b/job.c
index 872bbebb01..96fb8e9730 100644
--- a/job.c
+++ b/job.c
@@ -32,6 +32,10 @@
#include "trace/trace-root.h"
#include "qapi/qa
On 08/07/2021 15:04, Stefan Hajnoczi wrote:
On Thu, Jul 08, 2021 at 01:32:12PM +0200, Paolo Bonzini wrote:
On 08/07/21 12:36, Stefan Hajnoczi wrote:
What is very clear from this patch is that it
is strictly related to the brdv_* and lower level calls, because
they also internally check or
On 08/07/2021 15:09, Stefan Hajnoczi wrote:
On Wed, Jul 07, 2021 at 06:58:07PM +0200, Emanuele Giuseppe Esposito wrote:
This is a continuation on the work to reduce (and possibly get rid of) the
usage of AioContext lock, by introducing smaller granularity locks to keep the
thread safety
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 15:50, Max Reitz wrote:
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote:
Using the flag -p, allow the qemu binary to print to stdout.
This helps especially when doing print-debugging.
I think this shouldn’t refer to prints but to qemu’s stdout/stderr in
general, i.e
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
On 30/04/2021 15:02, Max Reitz wrote:
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote:
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout timeout too soon.
I’m curious: The default timeouts should be long enough for slow
systems, too, though (e.g
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
--
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
e script 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
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
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
---
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
.
This 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
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 -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
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
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
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
201 - 300 of 1403 matches
Mail list logo