* [Qemu-devel] [PATCH v3 1/7] .gitignore: Ignore generated "common.env"
2014-12-31 4:30 [Qemu-devel] [PATCH v3 0/7] tests: Add check-block to "make check" Fam Zheng
@ 2014-12-31 4:30 ` Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 2/7] qemu-iotests: Remove 091 from quick group Fam Zheng
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-12-31 4:30 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] 9+ messages in thread
* [Qemu-devel] [PATCH v3 2/7] qemu-iotests: Remove 091 from quick group
2014-12-31 4:30 [Qemu-devel] [PATCH v3 0/7] tests: Add check-block to "make check" Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 1/7] .gitignore: Ignore generated "common.env" Fam Zheng
@ 2014-12-31 4:30 ` Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 3/7] qemu-iotests: Replace "/bin/true" with "true" Fam Zheng
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-12-31 4:30 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] 9+ messages in thread
* [Qemu-devel] [PATCH v3 3/7] qemu-iotests: Replace "/bin/true" with "true"
2014-12-31 4:30 [Qemu-devel] [PATCH v3 0/7] tests: Add check-block to "make check" Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 1/7] .gitignore: Ignore generated "common.env" Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 2/7] qemu-iotests: Remove 091 from quick group Fam Zheng
@ 2014-12-31 4:30 ` Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 4/7] qemu-iotests: Add "_supported_os Linux" to 058 Fam Zheng
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-12-31 4:30 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] 9+ messages in thread
* [Qemu-devel] [PATCH v3 4/7] qemu-iotests: Add "_supported_os Linux" to 058
2014-12-31 4:30 [Qemu-devel] [PATCH v3 0/7] tests: Add check-block to "make check" Fam Zheng
` (2 preceding siblings ...)
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 3/7] qemu-iotests: Replace "/bin/true" with "true" Fam Zheng
@ 2014-12-31 4:30 ` Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 5/7] qemu-iotests: Speed up make check-block Fam Zheng
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-12-31 4:30 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] 9+ messages in thread
* [Qemu-devel] [PATCH v3 5/7] qemu-iotests: Speed up make check-block
2014-12-31 4:30 [Qemu-devel] [PATCH v3 0/7] tests: Add check-block to "make check" Fam Zheng
` (3 preceding siblings ...)
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 4/7] qemu-iotests: Add "_supported_os Linux" to 058 Fam Zheng
@ 2014-12-31 4:30 ` Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 6/7] tests/Makefile: Add check-block to make check on Linux Fam Zheng
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 7/7] qemu-iotests: Add supported os parameter for python tests Fam Zheng
6 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-12-31 4:30 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] 9+ messages in thread
* [Qemu-devel] [PATCH v3 6/7] tests/Makefile: Add check-block to make check on Linux
2014-12-31 4:30 [Qemu-devel] [PATCH v3 0/7] tests: Add check-block to "make check" Fam Zheng
` (4 preceding siblings ...)
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 5/7] qemu-iotests: Speed up make check-block Fam Zheng
@ 2014-12-31 4:30 ` Fam Zheng
2014-12-31 8:53 ` Peter Maydell
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 7/7] qemu-iotests: Add supported os parameter for python tests Fam Zheng
6 siblings, 1 reply; 9+ messages in thread
From: Fam Zheng @ 2014-12-31 4:30 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..0968121 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 ($(shell uname -s),"Linux")
+ 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] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v3 6/7] tests/Makefile: Add check-block to make check on Linux
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 6/7] tests/Makefile: Add check-block to make check on Linux Fam Zheng
@ 2014-12-31 8:53 ` Peter Maydell
0 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2014-12-31 8:53 UTC (permalink / raw)
To: Fam Zheng
Cc: Kevin Wolf, Max Reitz, QEMU Developers, Stefan Hajnoczi,
Markus Armbruster
On 31 December 2014 at 04:30, 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(+)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index e4ddb6a..0968121 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 ($(shell uname -s),"Linux")
You can just use
ifeq ($(CONFIG_LINUX), y)
here, since configure has already identified the host.
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH v3 7/7] qemu-iotests: Add supported os parameter for python tests
2014-12-31 4:30 [Qemu-devel] [PATCH v3 0/7] tests: Add check-block to "make check" Fam Zheng
` (5 preceding siblings ...)
2014-12-31 4:30 ` [Qemu-devel] [PATCH v3 6/7] tests/Makefile: Add check-block to make check on Linux Fam Zheng
@ 2014-12-31 4:30 ` Fam Zheng
6 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-12-31 4:30 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] 9+ messages in thread