Some tests are not executables. This patch sets the executable
permission for those tests lacking that.
Signed-off-by: Amador Pahim
---
tests/qemu-iotests/096 | 0
tests/qemu-iotests/124 | 0
tests/qemu-iotests/129 | 0
tests/qemu-iotests/132 | 0
tests/qemu-iotests/136 | 0
tests/qemu-iotests
- Skipping test 205 for unsupported formats.
- Setting execution permission on test files.
Amador Pahim (2):
qemu-iotests: skip test 205 for unsupported formats
qemu-iotests: set exec permission for tests lacking it
tests/qemu-iotests/096 | 0
tests/qemu-iotests/124 | 0
tests/qemu-iotests
Using bochs or cloop, qemu-img will fail with:
Format driver 'bochs' does not support image creation
Signed-off-by: Amador Pahim
---
tests/qemu-iotests/205 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205
index e7b2eae51d..
Now that shutdown() is guaranteed to always execute self._load_io_log()
and self._post_shutdown(), their calls in 'except' became redundant and
we can safely replace it by a call to shutdown().
Reviewed-by: Fam Zheng
Reviewed-by: Eduardo Habkost
Signed-off-by: Amador Pahim
---
scrip
shutdown() is not called after the previous launch().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 8
1 file changed, 8 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 42a3fa5251..6c80edfd04 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -91,6 +91,7 @@ class
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 0c690499be..d6661870ab 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -164,8 +164,9 @@ class QEMUMachine(object):
return
if it already exists, we are currently removing
it, even if it's not created by us.
This patch moves to _pre_launch() the responsibility to create a
temporary directory to host the files so we can remove the whole
directory on _post_shutdown().
Signed-off-by: Amador Pahim
---
scripts/qe
ll() to check whether the process is running and to get
the updated process exit code, when the process is finished.
Reviewed-by: Fam Zheng
eviewed-by: Eduardo Habkost
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/
This is just an refactor to separate the exception handler from the
actual launch procedure, improving the readability and making future
maintenances in this piece of code easier.
Reviewed-by: Fam Zheng
Reviewed-by: Eduardo Habkost
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 29
irst commits since they are co-dependant.
- Cleanup launch() and shutdown().
- Reorder the commits, putting the rename of self._args first.
- Rebased.
Changes v2->v3:
- Fix typo in patch 3 ("qemu.py: make 'args' public") commit message.
Changes v1->v2:
- Style fixes to m
On Thu, Jan 18, 2018 at 1:47 AM, Cleber Rosa wrote:
>
>
> On 01/17/2018 06:41 PM, Alistair Francis wrote:
>> On Wed, Jan 17, 2018 at 12:05 AM, Cleber Rosa wrote:
>>> TL;DR
>>> =
>>>
>>> This is about how QEMU developers can get started with functional
>>> tests that are built on top of the Av
If we allow launching VM again we will loose track of the first launched
VM.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 305d7bd098..0b0b61be39 100644
--- a/scripts/qemu.py
Currently we only cleanup on shutdown() if the VM is running.
To make sure we will always cleanup, this patch makes the
self._load_io_log() and the self._post_shutdown() to
always be called on shutdown(), regardless the VM running state.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
ll() to check whether the process is running and to get
the updated process exit code, when the process is finished.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
ind
This is just an refactor to separate the exception handler from the
actual launch procedure, improving the readability and making future
maintenances in this piece of code easier.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 29 ++---
1 file
if it already exists, we are currently removing
it, even if it's not created by us.
This patch moves to _pre_launch() the responsibility to create a
temporary directory to host the files so we can remove the whole
directory on _post_shutdown().
Signed-off-by: Amador Pahim
---
scripts/qe
shutdown() is not called after the previous launch().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 0b0b61be39..862920099c 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -89,6 +89,7 @@ class
dependant.
- Cleanup launch() and shutdown().
- Reorder the commits, putting the rename of self._args first.
- Rebased.
Changes v2->v3:
- Fix typo in patch 3 ("qemu.py: make 'args' public") commit message.
Changes v1->v2:
- Style fixes to make checkpatch.pl happ
Now that shutdown() is guaranteed to always execute self._load_io_log()
and self._post_shutdown(), their calls in 'except' became redundant and
we can safely replace it by a call to shutdown().
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 6 +-
1 file
Removing 'import sys' as it's not used anywhere.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 9bfdf6d37d..65d9ad688c 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -15,7 +15,6 @
On Tue, Nov 14, 2017 at 1:08 AM, Murilo Opsfelder Araújo
wrote:
> On 11/13/2017 07:39 PM, Amador Pahim wrote:
>> To launch a VM, we need to create basically two files: the monitor
>> socket (if it's a UNIX socket) and the qemu log file.
>>
>> For the qemu log file,
On 13 Nov 2017 11:24 pm, "Amador Pahim" wrote:
To launch a VM, we need to create basically two files: the monitor
socket (if it's a UNIX socket) and the qemu log file.
For the qemu log file, we currently just open the path, which will
create the file if it does not exist or ove
shutdown() is not called after the previous launch().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index ab172c3670..c1b0895e94 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -89,6 +89,7 @@ class
ll() to check whether the process is running and to get
the updated process exit code, when the process is finished.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
ind
If we allow launching VM again we will loose track of the first launched
VM.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index df2fca9e71..ab172c3670 100644
--- a/scripts/qemu.py
Now that shutdown() is guaranteed to always execute self._load_io_log()
and self._post_shutdown(), their calls in 'except' became redundant and
we can safely replace it by a call to shutdown().
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 6 +-
1 file
Currently we only cleanup on shutdown() if the VM is running.
To make sure we will always cleanup, this patch makes the
self._load_io_log() and the self._post_shutdown() to
always be called on shutdown(), regardless the VM running state.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
if it already exists, we are currently removing
it, even if it's not created by us.
This patch moves to pre_launch() the responsibility to create a
temporary directory to host the files so we can remove the whole
directory on post_shutdown().
Signed-off-by: Amador Pahim
---
scripts/qe
se a temporary directory.
- Better naming for variable controlling the need of a shutdown before
next launch.
Changes v9->v10:
- Keep method _remove_if_exists().
Amador Pahim (8):
qemu.py: remove unused import
qemu.py: better control of created files
qemu.py: refactor launch()
qem
This is just an refactor to separate the exception handler from the
actual launch procedure, improving the readability and making future
maintenances in this piece of code easier.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 29 ++---
1 file
Removing 'import sys' as it's not used anywhere.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 9bfdf6d37d..65d9ad688c 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -15,7 +15,6 @
If we allow launching VM again we will loose track of the first launched
VM.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index ed9fed58ed..7303952328 100644
--- a/scripts/qemu.py
shutdown() is not called after the previous launch().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 7303952328..c615f3075d 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -89,6 +89,7 @@ class
Currently we only cleanup on shutdown() if the VM is running.
To make sure we will always cleanup, this patch makes the
self._load_io_log() and the self._post_shutdown() to
always be called on shutdown(), regardless the VM running state.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
ll() to check whether the process is running and to get
the updated process exit code, when the process is finished.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
ind
se a temporary directory.
- Better naming for variable controlling the need of a shutdown before
next launch.
Amador Pahim (8):
qemu.py: remove unused import
qemu.py: better control of created files
qemu.py: refactor launch()
qemu.py: always cleanup on shutdown()
qemu.py: use pol
This is just an refactor to separate the exception handler from the
actual launch procedure, improving the readability and making future
maintenances in this piece of code easier.
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 29 ++---
1 file
Removing 'import sys' as it's not used anywhere.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 9bfdf6d37d..65d9ad688c 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -15,7 +15,6 @
Now that shutdown() is guaranteed to always execute self._load_io_log()
and self._post_shutdown(), their calls in 'except' became redundant and
we can safely replace it by a call to shutdown().
Reviewed-by: Fam Zheng
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 6 +-
1 file
if it already exists, we are currently removing
it, even if it's not created by us.
This patch moves to pre_launch() the responsibility to create a
temporary directory to host the files so we can remove the whole
directory on post_shutdown().
Signed-off-by: Amador Pahim
---
scripts/qe
On Thu, Sep 14, 2017 at 10:18 PM, Eduardo Habkost wrote:
> On Thu, Sep 14, 2017 at 10:05:50PM +0200, Amador Pahim wrote:
>> On Thu, Sep 14, 2017 at 9:46 PM, Eduardo Habkost wrote:
>> > On Thu, Sep 14, 2017 at 09:38:13PM +0200, Amador Pahim wrote:
>> >> On Tue, Sep
On Thu, Sep 14, 2017 at 9:46 PM, Eduardo Habkost wrote:
> On Thu, Sep 14, 2017 at 09:38:13PM +0200, Amador Pahim wrote:
>> On Tue, Sep 5, 2017 at 5:18 AM, Fam Zheng wrote:
>> > On Fri, 09/01 13:28, Amador Pahim wrote:
>> >> To launch a VM, we need to create ba
On Tue, Sep 5, 2017 at 5:18 AM, Fam Zheng wrote:
> On Fri, 09/01 13:28, Amador Pahim wrote:
>> To launch a VM, we need to create basically two files: the monitor
>> socket (if it's a UNIX socket) and the qemu log file.
>>
>> For the qemu log file, we currentl
shutdown() is not called after the previous launch().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 363f649a7e..05fca4d268 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -52,6 +52,7 @@ class
A new call to launch() with a running VM will fall in exception and
consequently call shutdown().
This patch makes launch() to raise an exception when it's called with VM
already running.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 3 +++
1 file changed, 3 insertions(+)
diff --
ll() to check whether the process is running and to get
the updated process exit code, when the process is finished.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index ede734328b..87a2212b77 100
th. So, to avoid errors with _load_io_log(),
this patch makes sure we will only read the _qemu_log_path if it was
previously created by us.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qem
Currently we only cleanup on shutdown() if the VM is running.
To make sure we will always cleanup, this patch makes the cleanup to
always happen in shutdown, regardless the VM running state.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
This is just an refactor to separate the exception handler from the
actual launch procedure, improving the readability and making future
maintenances in this piece of code easier.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 29 ++---
1 file changed, 18 insertions
lock to make sure it will
be logged if the VM finishes before the call to shutdown().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index a6e06291ea..670c048569 100644
-
the qemu log from a previous launch if the current one fails.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 670c048569..3ebe5ee0a4 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -141,6
We are opening the _qemu_log_path during the launch() but we are
forgetting to close it.
This patch makes sure we will close the self._qemu_log_path during the
cleanup (post_shutdown()).
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a
tence, this patch removes the parenthesis from the
second clause as it's not really needed.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 880e3e8219..0ae5d39414 100644
--- a/scripts/qe
to remove during the cleanup (post_shutdown()).
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 30 +++---
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 3ebe5ee0a4..c26e1412f9 100644
--- a/scripts/qemu.py
+++ b/scrip
commits "launch vm only if it's not
running" and "don't launch again before shutdown()".
- Minor style fixes.
Amador Pahim (13):
qemu.py: fix is_running() return before first launch()
qemu.py: avoid writing to stdout/stderr
qemu.py: use os.path.null instead of /d
the Popen.communicate() is now used (in order to get the stdout), the
further call to wait() became redundant and was replaced by
Popen.returncode.
The shutdown() message on negative exit code will now be logged
to logging.warn instead of written to system stderr.
Signed-off-by: Amador Pahim
For increased portability, let's use os.path.devnull.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index aca6fa4d82..a6e06291ea 100644
--- a/scripts/qemu.py
+++ b/scripts/qe
v8?
Now I am. Sending asap.
>
> On Fri, Aug 18, 2017 at 07:05:15PM +0200, Amador Pahim wrote:
>> Changes v1->v2:
>> - Style fixes to make checkpatch.pl happy.
>> - Rebased.
>> Changes v2->v3:
>> - Fix typo in patch 3 ("qemu.py: make 'args
On Tue, Aug 22, 2017 at 1:56 PM, Fam Zheng wrote:
> On Tue, 08/22 13:11, Amador Pahim wrote:
>> I don't think that the 'keep the behavior' principle should overcome
>> what the messages actually are. The question is: are they warning
>> messages? The way I
On Tue, Aug 22, 2017 at 12:24 PM, Fam Zheng wrote:
> On Fri, 08/18 19:05, Amador Pahim wrote:
>> This module should not write directly to stdout/stderr. Instead, it
>> should either raise exceptions or just log the messages and let the
>> callers handle them and decide wh
For increased portability, let's use os.path.devnull.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index ef531bb23b..51545f7f97 100644
--- a/scripts/qemu.py
+++ b/scripts/qe
tence, this patch removes the parenthesis from the
second clause as it's not really needed.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 880e3e8219..0ae5d39414 100644
--- a/scripts/qe
A new call to launch() with a running VM will fall in exception and
consequently call shutdown().
This patch makes launch() to raise an exception when it's called with VM
already running.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 3 +++
1 file changed, 3 insertions(+)
diff --
is called.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 51545f7f97..774f971f69 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -98,12 +98,12 @@ class QEMUMachine(ob
the Popen.communicate() is now used (in order to get the stdout), the
further call to wait() became redundant and was replaced by
Popen.returncode.
The shutdown() message on negative exit code will now be logged
to logging.debug instead of written to system stderr.
Signed-off-by: Amador Pahim
to remove during the cleanup (post_shutdown()).
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 33 ++---
1 file changed, 26 insertions(+), 7 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 29fd2469f9..9ae65e454e 100644
--- a/scripts/qemu.py
+++
hanges.
- Addressed the comments from previous version, basically improving the
logging messages and the control over created files. See individual
commit messages for details.
Amador Pahim (11):
qemu.py: fix is_running() return before first launch()
qemu.py: avoid writing to stdout/stderr
lock to make sure it will
be logged if the VM finishes before the call to shutdown().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 902d4c6c78..0bcec4b3b1 100644
-
This is just an refactor to separate the exception handler from the
actual launch procedure, improving the readability and making future
maintenances in this piece of code easier.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 33 -
1 file changed, 20
shutdown() is not called after the previous launch().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 6 ++
1 file changed, 6 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 46e8ff3232..2bd81afcf2 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -52,6 +52,7 @@ class
the qemu log from a previous launch if the current one fails.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 8
1 file changed, 8 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 0bcec4b3b1..29fd2469f9 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -147,6
Now that shutdown() is guaranteed to always execute self._load_io_log()
and self._post_shutdown(), their calls in 'except' became redundant and
we can safely replace it by a call to shutdown().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 6 +-
1 file changed, 1 inser
On Fri, Aug 18, 2017 at 4:01 PM, Markus Armbruster wrote:
> Amador Pahim writes:
>
>> On Tue, Aug 15, 2017 at 10:57 AM, Markus Armbruster
>> wrote:
>>> Amador Pahim writes:
>>>
>>>> When launching a VM, if an exception happens and the VM is
On Fri, Aug 18, 2017 at 3:57 PM, Markus Armbruster wrote:
> Amador Pahim writes:
>
>> On Tue, Aug 15, 2017 at 10:26 AM, Markus Armbruster
>> wrote:
>>> Amador Pahim writes:
>>>
>>>> The current message shows 'self._args', which conta
On Tue, Aug 15, 2017 at 10:57 AM, Markus Armbruster wrote:
> Amador Pahim writes:
>
>> When launching a VM, if an exception happens and the VM is not
>> initiated, it is useful to see the qemu command line that was executed
>> and the output of that command.
On Wed, Aug 16, 2017 at 8:17 AM, Markus Armbruster wrote:
> Eduardo Habkost writes:
>
>> On Tue, Aug 15, 2017 at 10:10:12AM +0200, Markus Armbruster wrote:
>>> Please spell "Python" with a capital "P" (it's a proper name).
>>>
>>>
On Tue, Aug 15, 2017 at 10:26 AM, Markus Armbruster wrote:
> Amador Pahim writes:
>
>> The current message shows 'self._args', which contains only part of the
>> options used in the qemu command line.
>>
>> This patch makes the qemu full args list an inst
On Tue, Aug 1, 2017 at 12:50 PM, Eduardo Habkost wrote:
> On Tue, Aug 01, 2017 at 11:09:25AM +0100, Stefan Hajnoczi wrote:
>> On Mon, Jul 31, 2017 at 10:51:05AM +0200, Amador Pahim wrote:
>> > is_running() returns None when called before the first time w
On Mon, Jul 31, 2017 at 4:50 PM, Eduardo Habkost wrote:
> On Mon, Jul 31, 2017 at 10:51:06AM +0200, Amador Pahim wrote:
>> Let's provide extra control and flexibility by using python logging
>> system instead of print and/or sys.std*.write().
>>
>> Signed-off-by:
return before first call to maunch().
- Use python logging system.
- Include the full command line on negative exit code error message.
- Use os.path.null instead of /dev/null.
- Improve the control over the created/deleted files.
Amador Pahim (7):
qemu.py: use poll() instead of 'return
n
File "qemu.py", line 175, in launch
self._launch()
File "qemu.py", line 189, in _launch
self._post_launch()
File "qemu.py", line 154, in _post_launch
self._qmp.accept()
File "qmp/qmp.py", line 145, in accept
The current message shows 'self._args', which contains only part of the
options used in the qemu command line.
This patch makes the qemu full args list an instance variable and then
uses it in the negative exit code message.
Signed-off-by: Amador Pahim
---
scripts/qe
For increased portability, let's use os.path.devnull.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 9434ccc30b..d313c6d4db 100644
--- a/scripts/qemu.py
+++ b/scripts/qe
_launch(), making sure VM will be terminated and cleaned up.
Also, the pre_launch() was changed to make sure the files that will
be created are not present in the system before creating them and the
post_shutdown() will now only remove files that were created by this
instance.
Signed-off-by: Amador
ll() to check whether the process is running and also
to get the updated process exit code, when the process is finished.
Signed-off-by: Amador Pahim
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/
Let's provide extra control and flexibility by using python logging
system instead of print and/or sys.std*.write().
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
is_running() returns None when called before the first time we
call launch():
>>> import qemu
>>> vm = qemu.QEMUMachine('qemu-system-x86_64')
>>> vm.is_running()
>>>
It should retunt False instead. This patch fixes that.
Signed-
On Thu, Jul 27, 2017 at 9:39 AM, Amador Pahim wrote:
> On Wed, Jul 26, 2017 at 7:35 PM, Stefan Hajnoczi wrote:
>> On Tue, Jul 25, 2017 at 11:30:16AM -0400, Cleber Rosa wrote:
>>> On 07/25/2017 09:37 AM, Stefan Hajnoczi wrote:
>>> > On Mon, Jul 24, 2017 at 02:44:
On Thu, Jul 27, 2017 at 4:18 PM, Stefan Hajnoczi wrote:
> On Tue, Jul 25, 2017 at 07:10:09PM +0200, Amador Pahim wrote:
>> Let's make args public so users can extend it in instances
>> without feeling like abusing the internal API.
>>
>> Signed-off-by: Amador P
On Tue, Jul 25, 2017 at 9:51 PM, Eduardo Habkost wrote:
> On Tue, Jul 25, 2017 at 07:10:11PM +0200, Amador Pahim wrote:
>> The message contains the self._args, which has only part of the
>> options used in the qemu command line and is not representative
>> enough to figure
On Tue, Jul 25, 2017 at 11:17 PM, Eduardo Habkost wrote:
> On Tue, Jul 25, 2017 at 07:10:14PM +0200, Amador Pahim wrote:
>> When launching a VM, if an exception happens and the VM is not
>> initiated, it is useful to see the qemu command line that was executed
>> and the o
On Tue, Jul 25, 2017 at 10:42 PM, Eduardo Habkost wrote:
> On Tue, Jul 25, 2017 at 07:10:12PM +0200, Amador Pahim wrote:
>> launch() is currently taking care of a number of flows, each one if its
>> own exception treatment, depending on the VM state and the files
>> creat
On Wed, Jul 26, 2017 at 7:35 PM, Stefan Hajnoczi wrote:
> On Tue, Jul 25, 2017 at 11:30:16AM -0400, Cleber Rosa wrote:
>> On 07/25/2017 09:37 AM, Stefan Hajnoczi wrote:
>> > On Mon, Jul 24, 2017 at 02:44:37PM +0200, Amador Pahim wrote:
>> >> Signed-off-by: Amador
The message contains the self._args, which has only part of the
options used in the qemu command line and is not representative
enough to figure out what happened to the process.
This patch drops the self._args part of the message.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 3 ++-
1
When launching a VM, if an exception happens and the VM is not
initiated, it is useful to see the qemu command line that was executed
and the output of that command.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff
_launch(), making sure VM will be terminated and cleaned up.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 42 +-
1 file changed, 25 insertions(+), 17 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 56142ed59b..45a63e8e9d 100644
--- a
(), calling it when applies.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 8
1 file changed, 8 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 45a63e8e9d..e18e8ec657 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -39,6 +39,7 @@ class QEMUMachine(object
ll() to check whether the process is running and also
to get the updated process exit code, if any.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 59ed5270f8..f37e2fe58e 100644
--- a/scri
o logical changes and include in the
commit messages the rationale for making them.
Amador Pahim (6):
qemu.py: make 'args' public
qemu.py: use poll() instead of 'returncode'
qemu.py: cleanup message on negative exit code
qemu.py: cleanup launch()
qemu.py: make sure s
Let's make args public so users can extend it in instances
without feeling like abusing the internal API.
Signed-off-by: Amador Pahim
---
scripts/qemu.py | 14 +++---
tests/qemu-iotests/iotests.py | 18 +-
2 files changed, 16 insertions(+), 16 dele
1 - 100 of 126 matches
Mail list logo