* [Qemu-devel] [PATCH v4 1/7] .gitignore: Ignore generated "common.env"
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
@ 2015-01-04 1:53 ` Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 2/7] qemu-iotests: Remove 091 from quick group Fam Zheng
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Fam Zheng @ 2015-01-04 1:53 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, Stefan Hajnoczi,
Max Reitz
Signed-off-by: Fam Zheng <famz@redhat.com>
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index e32a584..090f974 100644
--- a/.gitignore
+++ b/.gitignore
@@ -109,3 +109,4 @@ cscope.*
tags
TAGS
*~
+/tests/qemu-iotests/common.env
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v4 2/7] qemu-iotests: Remove 091 from quick group
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 1/7] .gitignore: Ignore generated "common.env" Fam Zheng
@ 2015-01-04 1:53 ` Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 3/7] qemu-iotests: Replace "/bin/true" with "true" Fam Zheng
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Fam Zheng @ 2015-01-04 1:53 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, Stefan Hajnoczi,
Max Reitz
For the purpose of allowing running quick group on tmpfs.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/group | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index a4742c6..08099b9 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -97,7 +97,7 @@
088 rw auto quick
089 rw auto quick
090 rw auto quick
-091 rw auto quick
+091 rw auto
092 rw auto quick
095 rw auto quick
097 rw auto backing
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v4 3/7] qemu-iotests: Replace "/bin/true" with "true"
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 1/7] .gitignore: Ignore generated "common.env" Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 2/7] qemu-iotests: Remove 091 from quick group Fam Zheng
@ 2015-01-04 1:53 ` Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 4/7] qemu-iotests: Add "_supported_os Linux" to 058 Fam Zheng
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Fam Zheng @ 2015-01-04 1:53 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, Stefan Hajnoczi,
Max Reitz
The former is not portable because on Mac OSX it is /usr/bin/true.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/common.config | 2 +-
tests/qemu-iotests/common.filter | 2 +-
tests/qemu-iotests/common.rc | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 91a5ef6..a1973ad 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -155,4 +155,4 @@ _readlink()
}
# make sure this script returns success
-/bin/true
+true
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 6c14590..a2cb9fb 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -223,4 +223,4 @@ _filter_qemu_img_map()
}
# make sure this script returns success
-/bin/true
+true
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 3b14053..aa093d9 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -490,4 +490,4 @@ _die()
}
# make sure this script returns success
-/bin/true
+true
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v4 4/7] qemu-iotests: Add "_supported_os Linux" to 058
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
` (2 preceding siblings ...)
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 3/7] qemu-iotests: Replace "/bin/true" with "true" Fam Zheng
@ 2015-01-04 1:53 ` Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 5/7] qemu-iotests: Speed up make check-block Fam Zheng
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Fam Zheng @ 2015-01-04 1:53 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, Stefan Hajnoczi,
Max Reitz
Other cases have this, and this test is not portable as well, as we want
to add "make check-block" to "make check", it shouldn't fail on Mac OS
X.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/058 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058
index 2d5ca85..a60b34b 100755
--- a/tests/qemu-iotests/058
+++ b/tests/qemu-iotests/058
@@ -87,6 +87,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
+_supported_os Linux
_require_command QEMU_NBD
# Use -f raw instead of -f $IMGFMT for the NBD connection
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v4 5/7] qemu-iotests: Speed up make check-block
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
` (3 preceding siblings ...)
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 4/7] qemu-iotests: Add "_supported_os Linux" to 058 Fam Zheng
@ 2015-01-04 1:53 ` Fam Zheng
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 6/7] tests/Makefile: Add check-block to make check on Linux Fam Zheng
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Fam Zheng @ 2015-01-04 1:53 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, Stefan Hajnoczi,
Max Reitz
Using /tmp, which is usually mounted as tmpfs, the quick group can be
quicker.
On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
50s to 30s.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests-quick.sh | 2 +-
tests/qemu-iotests/check | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
index 12af731..0e554bb 100755
--- a/tests/qemu-iotests-quick.sh
+++ b/tests/qemu-iotests-quick.sh
@@ -3,6 +3,6 @@
cd tests/qemu-iotests
ret=0
-./check -T -qcow2 -g quick || ret=1
+TEST_DIR=${TEST_DIR:-/tmp/qemu-iotests-quick-$$} ./check -T -qcow2 -g quick || ret=1
exit $ret
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 8ca4011..baeae80 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -238,6 +238,7 @@ QEMU_NBD -- $QEMU_NBD
IMGFMT -- $FULL_IMGFMT_DETAILS
IMGPROTO -- $FULL_IMGPROTO_DETAILS
PLATFORM -- $FULL_HOST_DETAILS
+TEST_DIR -- $TEST_DIR
SOCKET_SCM_HELPER -- $SOCKET_SCM_HELPER
EOF
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v4 6/7] tests/Makefile: Add check-block to make check on Linux
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
` (4 preceding siblings ...)
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 5/7] qemu-iotests: Speed up make check-block Fam Zheng
@ 2015-01-04 1:53 ` Fam Zheng
2015-01-12 16:35 ` Stefan Hajnoczi
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 7/7] qemu-iotests: Add supported os parameter for python tests Fam Zheng
2015-01-06 14:53 ` [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Stefan Hajnoczi
7 siblings, 1 reply; 10+ messages in thread
From: Fam Zheng @ 2015-01-04 1:53 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, Stefan Hajnoczi,
Max Reitz
"make check-block" does nothing on other platforms, but still takes some
time to enumerate all the tests. So let's only add it for Linux for now.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/Makefile b/tests/Makefile
index e4ddb6a..b3ee364 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -467,6 +467,9 @@ check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
check-unit: $(patsubst %,check-%, $(check-unit-y))
check-block: $(patsubst %,check-%, $(check-block-y))
check: check-qapi-schema check-unit check-qtest
+ifeq ($(CONFIG_LINUX),y)
+check: check-block
+endif
check-clean:
$(MAKE) -C tests/tcg clean
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v4 6/7] tests/Makefile: Add check-block to make check on Linux
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 6/7] tests/Makefile: Add check-block to make check on Linux Fam Zheng
@ 2015-01-12 16:35 ` Stefan Hajnoczi
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2015-01-12 16:35 UTC (permalink / raw)
To: Fam Zheng
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, qemu-devel,
Max Reitz, Stefan Hajnoczi
On Sun, Jan 4, 2015 at 1:53 AM, Fam Zheng <famz@redhat.com> wrote:
> "make check-block" does nothing on other platforms, but still takes some
> time to enumerate all the tests. So let's only add it for Linux for now.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> tests/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
Dropped from the block pull request because it fails on ARM hosts, as
mentioned by Peter Maydell in my block pull request email thread.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v4 7/7] qemu-iotests: Add supported os parameter for python tests
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
` (5 preceding siblings ...)
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 6/7] tests/Makefile: Add check-block to make check on Linux Fam Zheng
@ 2015-01-04 1:53 ` Fam Zheng
2015-01-06 14:53 ` [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Stefan Hajnoczi
7 siblings, 0 replies; 10+ messages in thread
From: Fam Zheng @ 2015-01-04 1:53 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, Stefan Hajnoczi,
Max Reitz
If I understand correctly, qemu-iotests never meant to be portable. We
only support Linux for all the shell cases, but didn't specify it for
python tests. Now add this and default all the python tests as Linux
only. If we cares enough later, we can override the parameter in
individual cases.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/iotests.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index f57f154..87002e0 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -282,12 +282,15 @@ def notrun(reason):
print '%s not run: %s' % (seq, reason)
sys.exit(0)
-def main(supported_fmts=[]):
+def main(supported_fmts=[], supported_oses=['linux']):
'''Run tests'''
if supported_fmts and (imgfmt not in supported_fmts):
notrun('not suitable for this image format: %s' % imgfmt)
+ if sys.platform not in supported_oses:
+ notrun('not suitable for this OS: %s' % sys.platform)
+
# We need to filter out the time taken from the output so that qemu-iotest
# can reliably diff the results against master output.
import StringIO
--
1.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check"
2015-01-04 1:53 [Qemu-devel] [PATCH v4 0/7] tests: Add check-block to "make check" Fam Zheng
` (6 preceding siblings ...)
2015-01-04 1:53 ` [Qemu-devel] [PATCH v4 7/7] qemu-iotests: Add supported os parameter for python tests Fam Zheng
@ 2015-01-06 14:53 ` Stefan Hajnoczi
7 siblings, 0 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2015-01-06 14:53 UTC (permalink / raw)
To: Fam Zheng
Cc: Kevin Wolf, Peter Maydell, Markus Armbruster, qemu-devel,
Max Reitz, Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]
On Sun, Jan 04, 2015 at 09:53:45AM +0800, Fam Zheng wrote:
> qemu-iotests contains useful tests that have a nice coverage of block layer
> code. Adding check-block (which calls tests/qemu-iotests-quick.sh) to "make
> check" is good for developers' self-testing.
>
> v4: 06: Use CONFIG_LINUX instead of custom "uname" in tests/Makefile. (Peter)
>
> v2: Take care of other platforms, basically by keeping them unchanged, and only
> add "make check-block" to "make check" on Linux. (Peter)
>
>
> Fam Zheng (7):
> .gitignore: Ignore generated "common.env"
> qemu-iotests: Remove 091 from quick group
> qemu-iotests: Replace "/bin/true" with "true"
> qemu-iotests: Add "_supported_os Linux" to 058
> qemu-iotests: Speed up make check-block
> tests/Makefile: Add check-block to make check on Linux
> qemu-iotests: Add supported os parameter for python tests
>
> .gitignore | 1 +
> tests/Makefile | 3 +++
> tests/qemu-iotests-quick.sh | 2 +-
> tests/qemu-iotests/058 | 1 +
> tests/qemu-iotests/check | 1 +
> tests/qemu-iotests/common.config | 2 +-
> tests/qemu-iotests/common.filter | 2 +-
> tests/qemu-iotests/common.rc | 2 +-
> tests/qemu-iotests/group | 2 +-
> tests/qemu-iotests/iotests.py | 5 ++++-
> 10 files changed, 15 insertions(+), 6 deletions(-)
>
> --
> 1.9.3
>
>
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread