On 2015-02-09 at 03:06, chen xiao guang
wrote:
On 02/05/2015 11:11 PM, Max Reitz
wrote:
On
2015-02-04 at 22:44, Xiao Guang Chen wrote:
From: Mao Chuan Li <address@hidden>
The tests for device type "ide_cd" are skipped for the s390
platform.
The default device id of hard disk on the s390 platform
differs to that
of the x86 platform. A new variable device_id is defined and
"virtio0"
set for the s390 platform. A s390 platform specific output
file is also
needed.
Reviewed-by: Michael Mueller <address@hidden>
Signed-off-by: Mao Chuan Li <address@hidden>
---
tests/qemu-iotests/051 | 91 +++++---
tests/qemu-iotests/051.s390-virtio.out | 377
+++++++++++++++++++++++++++++++++
2 files changed, 439 insertions(+), 29 deletions(-)
create mode 100644 tests/qemu-iotests/051.s390-virtio.out
First: This patch contains lines which are too long to be sent
via email (they are broken up and thus the patch needs manual
fixup by the reviewers). If you could specify a public
repository where we could pull from, that may be helpful to the
reviewers.
I can not find a public repository. Do you have other options?
Or I manually split the long lines into small ones only for
review. But it will not work if you apply the patch.
Well, in that case, better leave it as it is; I have a script for
"fixing" the patch, so as far as I'm concerned, it's fine.
Second: I'm not sure whether s390-virtio should be the special
case here. Maybe "pc" is the platform that is actually special
because it contains a floppy drive, an IDE CD drive and so on.
So while this patch is (nearly?) correct, it may make more sense
to move 051.out to 051.pc.out and modify the current 051.out to
be what is 051.s390-virtio.out in this patch.
OK.
In
the same way, maybe all the conditionals in this series (not
just this patch) which check whether the machine type is
s390-virtio should maybe instead check whether the machine type
is not pc.
OK.
However, the problem with the pc machine type is that
QEMU_DEFAULT_MACHINE will be version-dependent (currently, it's
pc-i440fx-2.3), so that would require a workaround.
When we run the qemu-system-x86_64 -machine ? we will get the
following output:
Supported machines are:
pc Standard PC (i440FX + PIIX, 1996) (alias of
pc-i440fx-2.3)
pc-i440fx-2.3 Standard PC (i440FX + PIIX, 1996) (default)
pc-i440fx-2.2 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.1 Standard PC (i440FX + PIIX, 1996)
......
We can get the default machine:pc-i440fx-2.3 and the alias of the
default machine:pc.
If the default machine has an alias then we use the alias
otherwise we use the default machine.
qemu/tests/qemu-iotests/common.config:
default_machine=$($QEMU -machine \? | awk '/(default)/{print
$1}')
default_alias_machine=$($QEMU -machine \? |\
awk -v var_default_machine=$default_machine\)\
'{if
($(NF-2)=="(alias"&&$(NF-1)=="of"&&$(NF)==var_default_machine){print
$1}}')
if [ ! -z "$default_alias_machine" ]; then
default_machine="$default_alias_machine"
fi
export QEMU_DEFAULT_MACHINE=$default_machine
How about this change?
I don't know awk, but assuming it works it looks good to me.
Max
[snip]
diff --git
a/tests/qemu-iotests/051.s390-virtio.out
b/tests/qemu-iotests/051.s390-virtio.out
new file mode 100644
index 0000000..751670f
--- /dev/null
+++ b/tests/qemu-iotests/051.s390-virtio.out
@@ -0,0 +1,377 @@
+QA output created by 051
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
backing_file='TEST_DIR/t.IMGFMT.base'
+
+=== Unknown option ===
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: could not
open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by
device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: could not
open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by
device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: could not
open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by
device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could not
open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by
device 'virtio0' doesn't support the option 'unknown_opt'
+
+
+=== Unknown protocol option ===
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=: could
not open disk image TEST_DIR/t.qcow2: Block protocol 'file'
doesn't support the option 'unknown_opt'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on: could
not open disk image TEST_DIR/t.qcow2: Block protocol 'file'
doesn't support the option 'unknown_opt'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234:
could not open disk image TEST_DIR/t.qcow2: Block protocol
'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo: could
not open disk image TEST_DIR/t.qcow2: Block protocol 'file'
doesn't support the option 'unknown_opt'
+
+
+=== Invalid format ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=foo: 'foo'
invalid format
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=foo: could not
open disk image TEST_DIR/t.qcow2: Unknown driver 'foo'
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,driver=raw,format=qcow2: could not open
disk image TEST_DIR/t.qcow2: Driver specified twice
+
+
+=== Overriding backing file ===
+
+Testing: -drive
file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig
-nodefaults
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
i[K[Din[K[D[Dinf[K[D[D[Dinfo[K[D[D[D[Dinfo
[K[D[D[D[D[Dinfo b[K[D[D[D[D[D[Dinfo
bl[K[D[D[D[D[D[D[Dinfo
blo[K[D[D[D[D[D[D[D[Dinfo
bloc[K[D[D[D[D[D[D[D[D[Dinfo block[K
+virtio0: TEST_DIR/t.qcow2 (qcow2)
+ Backing file: TEST_DIR/t.qcow2.orig (chain depth: 1)
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+Testing: -drive
file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig:
could not open disk image TEST_DIR/t.qcow2: Driver doesn't
support backing files
+
+Testing: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig:
could not open disk image TEST_DIR/t.qcow2: Driver doesn't
support backing files
+
+Testing: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig:
could not open disk image TEST_DIR/t.qcow2: Driver doesn't
support backing files
+
+
+=== Enable and disable lazy refcounting on the command line,
plus some invalid values ===
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=: could not
open disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts'
expects 'on' or 'off'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42: could
not open disk image TEST_DIR/t.qcow2: Parameter
'lazy-refcounts' expects 'on' or 'off'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo: could
not open disk image TEST_DIR/t.qcow2: Parameter
'lazy-refcounts' expects 'on' or 'off'
+
+
+=== With version 2 images enabling lazy refcounts must fail
===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: could
not open disk image TEST_DIR/t.qcow2: Lazy refcounts require a
qcow2 image with at least qemu 1.1 compatibility level
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+
+=== No medium ===
+
+Testing: -drive if=floppy
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device:
id=floppy0,file=,if=floppy,bus=0,unit=0
+q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
Can't we get rid of these warnings somehow? If nothing else
works, filter them out?
OK.
[snip]
+=== Snapshot mode ===
+
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive file=TEST_DIR/t.qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io
v[K[D[D[D[D[D[D[D[D[Dqemu-io
vi[K[D[D[D[D[D[D[D[D[D[Dqemu-io
vir[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virt[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virti[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0
[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0
"w[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0
"wr[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0
"wri[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0
"writ[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D!
[D[Dqemu-io virtio0
"write[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write
[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write
-[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write
-P[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P
[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P
0[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P
0x[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P
0x2[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P
0x22[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "wr!
ite -P 0x22
[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P 0x22
0[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P 0x22 0
[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P 0x22 0
4[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P 0x22 0
4k[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io
virtio0 "write -P 0x22 0 4k"[K
This is an example of a line that got split into multiple lines
in the email. It's fixable by the reviewer, but that requires
work. :-)
Max
|