Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 19 ++-
tests/qemu-iotests/058.out | 12
2 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058
index cf50857..14584cd
to let caller know the errno, and errno will be used later.
Also fix a typo in comments of bdrv_snapshot_delete().
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c| 10 ++-
block/qcow2.h |5 +++-
block/snapshot.c | 59
Now qemu-img convert have similar options as qemu-nbd for internal
snapshot.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qemu-img-cmds.hx |4 ++--
qemu-img.c | 44 +++-
qemu-img.texi| 12
3 files changed, 45
1/method 2 in echo message, to tip better.
Wenchao Xia (6):
1 snapshot: distinguish id and name in load_tmp
2 qemu-nbd: support internal snapshot export
3 qemu-iotests: add 058 internal snapshot export with qemu-nbd case
4 qemu-img: add -l for snapshot in convert
5 qemu-iotests: add test
Now it is possible to directly export an internal snapshot, which
can be used to probe the snapshot's contents without qemu-img
convert.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/snapshot.c | 18 ++
include/block/snapshot.h |8
qemu
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qemu-nbd.c|1 +
qemu-nbd.texi |2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index fe6053c..136e8c9 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -79,6 +79,7 @@ static void usage
于 2013/12/5 4:42, Eric Blake 写道:
On 12/04/2013 02:10 AM, Wenchao Xia wrote:
Now qemu-img convert have similar options as qemu-nbd for internal
snapshot.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
@@ -1183,6 +1189,18 @@ static int img_convert(int argc, char **argv
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
于 2013/12/3 19:02, Stefan Hajnoczi 写道:
On Fri, Nov 22, 2013 at 12:27:10PM +0800, Wenchao Xia wrote:
diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
index da1d965..9a8153b 100644
--- a/qemu-img-cmds.hx
+++ b/qemu-img-cmds.hx
@@ -34,7 +34,7 @@ STEXI
ETEXI
DEF(convert, img_convert
于 2013/12/3 21:45, Stefan Hajnoczi 写道:
On Fri, Nov 22, 2013 at 12:27:09PM +0800, Wenchao Xia wrote:
+nbd_snapshot_port=10850
+nbd_snapshot_img=nbd:127.0.0.1:$nbd_snapshot_port
+
+_export_nbd_snapshot()
+{
+$QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port $TEST_IMG -l $1
Please use
于 2013/12/3 4:17, Eric Blake 写道:
On 11/12/2013 03:25 PM, Wenchao Xia wrote:
One function one rule, so the enum string generating have same
behavior for different caller. If multiple caller exist for one
enum define in schema, it is for sure the generated string is
identical.
Note before
于 2013/11/29 16:54, Wenchao Xia 写道:
v6:
Address Kevin's comments:
1: typo fix, remove device and snapshot info in error message.
2: use strstart().
3: use _require_command(), limit proto to file, since when proto=nbd
it can't work. also changed _require_command() to tip
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
This patch override only when default is specified, I am +1 with it.
I think we had discuss before, just want a double check, stefan, do you
agree with this?
This replaces _unsupported_qemu_io_options and check for support of
current cache mode, and allow to provide a default if user didn't
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
xpand=true
@@ -147,6 +155,7 @@ check options
-o options -o options to pass to qemu-img create/convert
-Toutput timestamps
-r randomize test order
+-c cache mode
+-c mode
于 2013/11/30 4:56, Max Reitz 写道:
On 11.11.2013 00:56, Wenchao Xia wrote:
This test will focus on the low level procedure of qcow2 snapshot
operations, now it covers only the create operation. Overlap error
paths are not checked since no good way to trigger those errors.
Signed-off-by: Wenchao
于 2013/11/30 4:41, Max Reitz 写道:
Leaving the backing file open although it is not needed anymore can
cause problems if it is opened through a block driver which allows
exclusive access only and if the create function of the block driver
used for the top image (the one being created) tries to
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
+
+if (!qapi_event_functions.emit) {
Better to return an error here instead of silently failing.
The purpose is allowing emit=NULL and skip event code in that case.
But the code will do nothing and the caller won't know that.
Now the caller also won't know that useless code
code, if discriminator is an enum field.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
docs/qapi-code-gen.txt |8 ++--
scripts/qapi-types.py | 18 ++
scripts/qapi-visit.py | 23 ---
scripts/qapi.py|4 +++-
4 files changed, 39
at compile time.
8/8: correspond test case change.
v3:
General:
move enum name generation patch to last in the series, add convert patch
8/9.
Address Luiz and Kevin's comments:
Better introduction.
6/9: renamed this patch, add docs/qapi-code-gen.txt part.
Wenchao Xia (9):
1 qapi script
Later both qapi-types.py and qapi-visit.py need a common function
for enum name generation.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
scripts/qapi-types.py | 10 --
scripts/qapi.py | 10 ++
2 files changed, 10
It will check whether the values specified are written correctly,
and whether all enum values are covered, when discriminator is a
pre-defined enum type
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-visit.py | 17 +
scripts/qapi.py | 31
Later other scripts will need to check the enum values.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
scripts/qapi.py| 18 ++
tests/qapi-schema/comments.out |2 +-
tests/qapi-schema/qapi
Now enum AIOContext will generate AIO_CONTEXT instead of A_I_O_CONTEXT,
X86CPU will generate X86_CPU instead of X86_C_P_U.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/qapi/qmp/qerror.h |2 +-
scripts/qapi.py | 26 +++---
target-i386/cpu.c
It is bad that same key was specified twice, especially when a union have
two branches with same condition. This patch can prevent it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi.py |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/scripts
Test for inherit and complex union.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qapi-schema/qapi-schema-test.json | 27 ++
tests/qapi-schema/qapi-schema-test.out | 11 +++
tests/test-qmp-input-visitor.c | 120 +
tests/test-qmp-output
After this patch, hidden enum type BlockdevOptionsKind will not
be generated, and other API can use enum BlockdevDriver.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qapi-schema.json | 14 +-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/qapi
v6:
Address Kevin's comments:
1: typo fix, remove device and snapshot info in error message.
2: use strstart().
3: use _require_command(), limit proto to file, since when proto=nbd
it can't work. also changed _require_command() to tip better.
4: use strstart().
6: new
于 2013/11/28 22:24, Luiz Capitulino 写道:
On Thu, 28 Nov 2013 14:19:48 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013/11/26 0:47, Luiz Capitulino 写道:
On Wed, 13 Nov 2013 06:25:00 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
This series is respined from RFC series at:
http
Hi, Any comments for it? respin?
于 2013/11/26 0:47, Luiz Capitulino 写道:
On Wed, 13 Nov 2013 06:25:00 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
This series is respined from RFC series at:
http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg00363.html
Patch 1-6 add support for enum as discriminator.
Patch 7
于 2013/11/28 8:48, Luiz Capitulino 写道:
On Wed, 13 Nov 2013 09:44:52 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
Nested structure is not supported now, so following define is not valid:
{ 'event': 'EVENT_C',
'data': { 'a': { 'a_a', 'str', 'a_b', 'str' }, 'b': 'int' }
I think your
Now it is possible to directly export an internal snapshot, which
can be used to probe the snapshot's contents without qemu-img
convert.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/snapshot.c | 18 ++
include/block/snapshot.h |8
qemu
a blank.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 103 ++
tests/qemu-iotests/058.out | 32 +
tests/qemu-iotests/check |1 +
tests/qemu-iotests/common.rc |3 +-
tests/qemu-iotests
to let caller know the errno, and errno will be used later.
Also fix a typo in comments of bdrv_snapshot_delete().
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c| 10 ++-
block/qcow2.h |5 +++-
block/snapshot.c | 59
work. also changed _require_command() to tip better.
4: use strstart().
6: new patch, since I found the doc missing in debugging.
Wenchao Xia (6):
1 snapshot: distinguish id and name in load_tmp
2 qemu-nbd: support internal snapshot export
3 qemu-iotests: add 058 internal snapshot export
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qemu-nbd.c|1 +
qemu-nbd.texi |2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index fe6053c..136e8c9 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -79,6 +79,7 @@ static void usage
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 19 ++-
tests/qemu-iotests/058.out | 12
2 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058
index 0b48386..19d8a8c
Now qemu-img convert have similar options as qemu-nbd for internal
snapshot.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qemu-img-cmds.hx |2 +-
qemu-img.c | 44 +++-
qemu-img.texi| 12
3 files changed, 44
于 2013/11/21 19:02, Zhanghailiang 写道:
Hi,
Now qemu ram live snapshot feature has some problems, it is based on
‘ram live migration’.
The time of snapshot depends on completion time of migration, which is
not measurable. Also It may can’t achieve migrate in some situation.
I have seen
于 2013/11/19 19:20, Kevin Wolf 写道:
Am 10.11.2013 um 23:03 hat Wenchao Xia geschrieben:
Since later this function will be used so improve it. The only caller of it
now is qemu-img, and it is not impacted by introduce function
bdrv_snapshot_load_tmp_by_id_or_name() that call
于 2013/11/19 19:26, Kevin Wolf 写道:
Am 10.11.2013 um 23:03 hat Wenchao Xia geschrieben:
Now it is possible to directly export an internal snapshot, which
can be used to probe the snapshot's contents without qemu-img
convert.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block
于 2013/11/13 9:44, Wenchao Xia 写道:
This series add support for tag/keyword 'event' in qapi-schema.
The implemention doesn't generate a struture and visit function
in the background for every event, so it doesn't support nested
structure in the define to avoid trouble.
It is on top of series
于 2013/11/19 19:29, Kevin Wolf 写道:
Am 10.11.2013 um 23:03 hat Wenchao Xia geschrieben:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 102
tests/qemu-iotests/058.out | 32 ++
tests/qemu
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/Makefile | 14 ++-
tests/qapi-schema/qapi-schema-test.json | 12 ++
tests/qapi-schema/qapi-schema-test.out | 10 +-
tests/test-qmp-event.c | 250 +++
4
Since gettimeofday() is used in this header file as a macro define,
include the function's define header file, to avoid compile warning
when other file include os-posix.h.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/sysemu/os-posix.h |2 ++
1 files changed, 2 insertions
Nested structure is not supported now, so following define is not valid:
{ 'event': 'EVENT_C',
'data': { 'a': { 'a_a', 'str', 'a_b', 'str' }, 'b': 'int' }
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
Makefile |9 +-
Makefile.objs |2 +-
qapi
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
Makefile|9 +-
Makefile.objs |2 +-
include/qapi/qmp-event.h| 29 +++
qapi/Makefile.objs |1 +
qapi/qmp-event.c
/qemu-devel/2013-11/msg01574.html
Wenchao Xia (3):
1 os-posix: include sys/time.h
2 qapi script: add support of event
3 tests: add test cases for qapi event support
Makefile|9 +-
Makefile.objs |2 +-
include/sysemu/os-posix.h
Sorry I sent this draft patch by mistake, please ignore this one and
have a look at the rest
3 patches.
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -948,8 +948,8 @@
# @tray_open: #optional True if the device has a tray and it is open
# (only present if removable is true)
#
-# @dirty: #optional dirty bitmap information (only present if the dirty
-# bitmap is enabled)
于 2013/11/13 22:40, Fam Zheng 写道:
On Wed, Nov 13, 2013 at 10:19 PM, Kevin Wolf kw...@redhat.com wrote:
Am 13.11.2013 um 11:29 hat Fam Zheng geschrieben:
We have multiple dirty bitmaps in BDS now, switch QAPI to allow query
it (BlockInfo.dirty_bitmaps), and also drop old BlockInfo.dirty.
ping?
Hello, any more comments?
Just found timestamp of this series seems older than v1, so ping to
correct it.
= 0;
void *buf;
+if (!bs-backing_hd) {
+block_job_completed(s-common, 0);
+return;
+}
+
s-common.len = bdrv_getlength(bs);
if (s-common.len 0) {
block_job_completed(s-common, s-common.len);
Reviewed-by: Wenchao Xia xiaw
Tried on RH6.4 x86_64 on upstream, the value can be passed to the final
vm boot command.
Tested-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
于 2013/11/13 2:12, Eric Blake 写道:
On 11/06/2013 12:33 PM, Wenchao Xia wrote:
It will check whether the values specified are written correctly when
discriminator is a pre-defined enum type, which help check whether the
schema is in good form.
It is allowed, that not every value in enum is used
check for enum value at compile time.
8: correspond test case change.
Wenchao Xia (8):
1 qapi script: remember enum values
2 qapi script: add check for duplicated key
3 qapi script: check correctness of discriminator values in union
4 qapi script: code move for generate_enum_name()
5
, although the patch changes it,
the final string generated is not changed. The custom function used
before will met problem when capitalized discriminator value is
introduced.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py |6 +++---
scripts/qapi-visit.py | 21
It is bad that same key was specified twice, especially when a union have
two branches with same condition. This patch can prevent it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi.py |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/scripts
It will check whether the values specified are written correctly,
and whether all enum values are covered, when discriminator is a
pre-defined enum type
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-visit.py | 17 +
scripts/qapi.py | 31
Now enum AIOContext will generate AIO_CONTEXT instead of A_I_O_CONTEXT,
X86CPU will generate X86_CPU instead of X86_C_P_U.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/qapi/qmp/qerror.h |2 +-
scripts/qapi.py | 26 +++---
target-i386/cpu.c
Later other scripts will need to check the enum values.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
scripts/qapi.py| 18 ++
tests/qapi-schema/comments.out |2 +-
tests/qapi-schema/qapi
Test for inherit and complex union.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qapi-schema/qapi-schema-test.json | 27 ++
tests/qapi-schema/qapi-schema-test.out | 11 +++
tests/test-qmp-input-visitor.c | 120 +
tests/test-qmp-output
code.
In short, enum type as discriminator is fully supported now.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py | 18 ++
scripts/qapi-visit.py | 23 ---
scripts/qapi.py |4 +++-
3 files changed, 33 insertions
Later both qapi-types.py and qapi-visit.py need a common function
for enum name generation.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
scripts/qapi-types.py | 10 --
scripts/qapi.py | 10 ++
2 files changed, 10
Some code in qcow2-snapshot.c directly accesses bs-file, so in those
places errors can't be injected by other events. Since the code in
qcow2-snapshot.c is similar to the other qcow2 internal code (in regards
to e.g. the L1 table), add some debug events.
Signed-off-by: Wenchao Xia xiaw
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block/qcow2-snapshot.c | 25 +
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 70e329e..685ef8b 100644
typo fix in comments.
5 typo fix in commit message.
Address Eric's comments:
2 fix 32bit/64bit issue in printf for sizeof and offse.
v6:
Address Jeff's comments:
6: add quote for image name in test case.
Wenchao Xia (6):
1 snapshot: add parameter *errp in snapshot create
2 qcow2: add
于 2013/11/9 4:50, Jeff Cody 写道:
On Tue, Nov 05, 2013 at 08:01:29AM +0800, Wenchao Xia wrote:
This test will focus on the low level procedure of qcow2 snapshot
operations, now it covers only the create operation. Overlap error
paths are not checked since no good way to trigger those errors
于 2013/11/9 1:18, Jeff Cody 写道:
On Fri, Oct 11, 2013 at 10:33:31AM +0800, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 19 ++-
tests/qemu-iotests/058.out | 12
2 files changed, 30 insertions(+), 1
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 102
tests/qemu-iotests/058.out | 32 ++
tests/qemu-iotests/check |1 +
tests/qemu-iotests/group |1 +
4 files changed, 136 insertions
as deprecated, added doc
for them.
v5:
Address Jeff's comments:
Quote image name in test cases.
Wenchao Xia (5):
1 snapshot: distinguish id and name in load_tmp
2 qemu-nbd: support internal snapshot export
3 qemu-iotests: add 058 internal snapshot export with qemu-nbd case
4 qemu-img: add
Now it is possible to directly export an internal snapshot, which
can be used to probe the snapshot's contents without qemu-img
convert.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/snapshot.c | 18 +
include/block/snapshot.h |8 +++
qemu
to let caller know the errno, and errno will be used later.
Also fix a typo in comments of bdrv_snapshot_delete().
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c| 16 ++-
block/qcow2.h |5 +++-
block/snapshot.c | 60
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 19 ++-
tests/qemu-iotests/058.out | 12
2 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058
index 2d50d97..9e28132
Now qemu-img convert have similar options as qemu-nbd for internal
snapshot.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qemu-img-cmds.hx |2 +-
qemu-img.c | 45 -
qemu-img.texi| 12
3 files changed, 45
The function still returns int since qcow2_snapshot_delete() will
return the number.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block/qcow2-snapshot.c | 43 +--
1 files changed, 37 insertions(+), 6
The return value is only used for error report before this patch,
so change the function protype to return void.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block/qcow2-snapshot.c| 30 +-
block/qcow2.h
This test will focus on the low level procedure of qcow2 snapshot
operations, now it covers only the create operation. Overlap error
paths are not checked since no good way to trigger those errors.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/070 | 216
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block/qcow2-snapshot.c |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 6a1d9de..70e329e 100644
--- a/block/qcow2
于 2013/11/8 2:47, Max Reitz 写道:
If the NewImageMode is absolute-paths but no backing file is available
(e.g., when mirroring a device with an unbacked image), the target image
will not be backed either. This patch updates the documentation in
qapi-schema.json accordingly.
Signed-off-by: Max
Hello, rebase on upstream?
(-)
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Should we change doc for NewImageMode in qapi-schema.json also?
于 2013/11/6 21:33, Eric Blake 写道:
On 11/05/2013 08:20 PM, Wenchao Xia wrote:
+ 'server': {
+ '_base': 'NetworkConnectionInfo',
Interesting idea for shorthand. However, I would suggest that you pick
a different character than '_', since '_' is valid in names. That is,
we
It is possible to reach default case, when an union have a enum
discriminator, so don't abort() but report the error message.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-visit.py | 14 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git
It will check whether the values specified are written correctly when
discriminator is a pre-defined enum type, which help check whether the
schema is in good form.
It is allowed, that not every value in enum is used, so does not check
that case.
Signed-off-by: Wenchao Xia xiaw
, although the patch changes it,
the final string generated is not changed. The custom function used
before will met problem when capitalized discriminator value is
introduced.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py |6 +++---
scripts/qapi-visit.py | 21
Now enum AIOContext will generate AIO_CONTEXT instead of A_I_O_CONTEXT,
X86CPU will generate X86_CPU instead of X86_C_P_U.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/qapi/qmp/qerror.h |2 +-
scripts/qapi.py | 26 +++---
target-i386/cpu.c
Test for inherit and complex union.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qapi-schema/qapi-schema-test.json | 25 +
tests/qapi-schema/qapi-schema-test.out | 11 ++
tests/test-qmp-input-visitor.c | 152 +++
tests/test-qmp-output
Later other scripts will need to check the enum values.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
scripts/qapi.py| 18 ++
tests/qapi-schema/comments.out |2 +-
tests/qapi-schema/qapi
:
Mainly address Eric's comments: fix typo, add patch 2 to allow partly mapping
enum value in union, add related test case, remove direct inherit support
_base
and related test case.
Wenchao Xia (8):
1 qapi script: remember enum values
2 qapi script: report error for default case in union visit
code.
In short, enum type as discriminator is fully supported now.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py | 18 ++
scripts/qapi-visit.py | 23 ---
scripts/qapi.py |4 +++-
3 files changed, 33 insertions
Later both qapi-types.py and qapi-visit.py need a common function
for enum name generation.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py | 10 --
scripts/qapi.py | 10 ++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git
This test will focus on the low level procedure of qcow2 snapshot
operations, now it covers only the create operation. Overlap error
paths are not checked since no good way to trigger those errors.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/070 | 214
301 - 400 of 1818 matches
Mail list logo