tests: Add check-block to "make check"
cover tests: Add check-block to "make check"
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.
With the first patch, this set takes a half minute on my laptop. If "-j" option is used, it only takes a few more seconds than what we have now.
Fam Zheng (2):
qemu-iotests: Speed up make check-block
tests/Makefile: Add check-block to make check
tests/Makefile | 2 +- tests/qemu-iotests-quick.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/2 qemu-iotests: Speed up make check-block
Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick group can be quicker.
On my laptop (Lenovo T430s with Fedora 20), this reduces the time from 50s to 30s.
--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests-quick.sh +1 -1
@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1 exit $ret
Signature · 1 line
1.9.3
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
Quoted 23 lines · Fam Zheng
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -cwriteback || ret=1
Quoted 1 line
exit $ret
Should we let users specify another directory in the environment?
Like this:
: ${TEST_DIR=/tmp/qemu-iotests-quick-$$}
ret=0
./check -T -qcow2 -g quick || ret=1
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
In reply to Fam ZhengQuoted 16 lines · Fam Zheng
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests-quick.sh +0
-0
tests/qemu-iotests-quick.sh line 6
Quoted 5 lines
tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
There are (at least) two tests which don't work with -c writeback (026 and 039), one of them is in the quick group (039). Why not use -c writethrough? It doesn't make any difference on tmpfs anyway (we can't omit it because that will break 091).
And thank you, I didn't know about TEST_DIR. I always built the full qemu in /tmp. *g*
Max
Quoted 1 line
tests/qemu-iotests-quick.sh +0
-0exit $ret
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
Quoted 12 lines · Fam Zheng
Quoted 11 lines
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
tests/qemu-iotests-quick.sh line 5
Quoted 9 lines
tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1There are (at least) two tests which don't work with -c writeback (026 and 039), one of them is in the quick group (039). Why not use -c writethrough? It doesn't make any difference on tmpfs anyway (we can't omit it because that will break 091).
Why use any -c? The default is the fast option writeback, and for those test cases that don't support writeback, something working is chosen instead.
Kevin
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
Quoted 26 lines · Kevin Wolf
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
Quoted 12 lines · Fam Zheng
Quoted 11 lines
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 13 lines
tests/qemu-iotests-quick.sh line 5
Quoted 9 lines
tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1There are (at least) two tests which don't work with -c writeback (026 and 039), one of them is in the quick group (039). Why not use -c writethrough? It doesn't make any difference on tmpfs anyway (we can't omit it because that will break 091).
Quoted 3 lines
Why use any -c? The default is the fast option writeback, and for those test cases that don't support writeback, something working is chosen instead.
Because that breaks 091.
Max
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
Quoted 27 lines · Kevin Wolf
Quoted 26 lines
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
Quoted 25 lines · Fam Zheng
Quoted 16 lines
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests-quick.sh +0
-0tests/qemu-iotests-quick.sh line 5
Quoted 4 lines
tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1There are (at least) two tests which don't work with -c writeback (026 and 039), one of them is in the quick group (039). Why not use -c writethrough? It doesn't make any difference on tmpfs anyway (we can't omit it because that will break 091).
Quoted 5 lines
Quoted 3 lines
Why use any -c? The default is the fast option writeback, and for those test cases that don't support writeback, something working is chosen instead.
Because that breaks 091.
That's unfortunate. I wish tmpfs supported O_DIRECT...
But let's just remove it from quick then - it doesn't really matter if it doesn't run because of the cache mode or because we didn't include it in the group.
-c writethrough is okay as long as you really have tmpfs on your /tmp, but it really hurts when you don't (and I for one don't, standard RHEL 7 installation).
Kevin
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
Quoted 31 lines · Kevin Wolf
Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
Quoted 30 lines · Kevin Wolf
Quoted 29 lines
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
Quoted 12 lines · Fam Zheng
Quoted 11 lines
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 13 lines
tests/qemu-iotests-quick.sh line 5
Quoted 9 lines
tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1There are (at least) two tests which don't work with -c writeback (026 and 039), one of them is in the quick group (039). Why not use -c writethrough? It doesn't make any difference on tmpfs anyway (we can't omit it because that will break 091).
Why use any -c? The default is the fast option writeback, and for those test cases that don't support writeback, something working is chosen instead.
Quoted 6 lines
Quoted 1 line
Because that breaks 091.
That's unfortunate. I wish tmpfs supported
O_DIRECT...But let's just remove it from quick then - it doesn't really matter if it doesn't run because of the cache mode or because we didn't include it in the group.
Fine with me.
Max
Quoted 3 lines
-c writethrough is okay as long as you really have tmpfs on your /tmp, but it really hurts when you don't (and I for one don't, standard RHEL 7 installation).
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
Quoted 29 lines · Max Reitz
Quoted 28 lines · Kevin Wolf
Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
Quoted 27 lines · Kevin Wolf
Quoted 26 lines
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
Quoted 25 lines · Fam Zheng
Quoted 16 lines
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests-quick.sh +0
-0tests/qemu-iotests-quick.sh line 5
Quoted 4 lines
tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1There are (at least) two tests which don't work with -c writeback (026 and 039), one of them is in the quick group (039). Why not use -c writethrough? It doesn't make any difference on tmpfs anyway (we can't omit it because that will break 091).
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Why use any -c? The default is the fast option writeback, and for those test cases that don't support writeback, something working is chosen instead.
Because that breaks 091.
That's unfortunate. I wish tmpfs supported
O_DIRECT...
Indeed unfortunate!
Quoted 4 lines
Quoted 4 lines
But let's just remove it from quick then - it doesn't really matter if it doesn't run because of the cache mode or because we didn't include it in the group.
Will do it when respin.
Quoted 4 lines
Quoted 3 lines
-c writethrough is okay as long as you really have tmpfs on your /tmp, but it really hurts when you don't (and I for one don't, standard RHEL 7 installation).
Oh, do you have any better idea than hardcoding to /tmp then?
Fam
Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block
Am 25.11.2014 um 10:44 hat Fam Zheng geschrieben:
Quoted 43 lines · Max Reitz
Quoted 29 lines · Kevin Wolf
Quoted 28 lines
Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
Quoted 27 lines · Kevin Wolf
Quoted 26 lines
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
Quoted 25 lines · Fam Zheng
Quoted 16 lines
Using /tmp (usually mounted as tmpfs) and cache=writeback, 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 <[email protected]>--- tests/qemu-iotests-quick.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests-quick.sh +0
-0tests/qemu-iotests-quick.sh line 5
Quoted 4 lines
tests/qemu-iotests-quick.sh +1
-1@@ -3,6 +3,6 @@ cd tests/qemu-iotests ret=0 -./check -T -qcow2 -g quick || ret=1 +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1There are (at least) two tests which don't work with -c writeback (026 and 039), one of them is in the quick group (039). Why not use -c writethrough? It doesn't make any difference on tmpfs anyway (we can't omit it because that will break 091).
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Why use any -c? The default is the fast option writeback, and for those test cases that don't support writeback, something working is chosen instead.
Because that breaks 091.
That's unfortunate. I wish tmpfs supported
O_DIRECT...Indeed unfortunate!
Quoted 4 lines
Quoted 4 lines
But let's just remove it from quick then - it doesn't really matter if it doesn't run because of the cache mode or because we didn't include it in the group.
Quoted 8 lines
Will do it when respin.
Quoted 4 lines
Quoted 3 lines
-c writethrough is okay as long as you really have tmpfs on your /tmp, but it really hurts when you don't (and I for one don't, standard RHEL 7 installation).
Oh, do you have any better idea than hardcoding to /tmp then?
I think /tmp is fine. It helps those of us who do have a tmpfs there, and it shouldn't hurt the rest at least. Just don't combine it with writethrough, but leave out -c.
Kevin
PATCH 2/2 tests/Makefile: Add check-block to make check
In reply to Fam Zheng--- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -1
@@ -463,7 +463,7 @@ check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) 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 +check: check-qapi-schema check-unit check-qtest check-block check-clean: $(MAKE) -C tests/tcg clean rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
Signature · 1 line
1.9.3
Re: [Qemu-devel] [PATCH 2/2] tests/Makefile: Add check-block to make check
Quoted 10 lines · Fam Zheng
Signed-off-by Fam Zheng <[email protected]>--- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/Makefile +0
-0
tests/Makefile check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) · line 469
Quoted 8 lines
tests/Makefile +1
-1@@ -463,7 +463,7 @@ check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) 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 +check: check-qapi-schema check-unit check-qtest check-block check-clean: $(MAKE) -C tests/tcg clean rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
Even regardless of patch 1:
But we must fix 039 first (I remember some other test failing sometimes, but I can't remember which).
Quoted 6 lines · Fam Zheng
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.With the first patch, this set takes a half minute on my laptop. If "-j" option is used, it only takes a few more seconds than what we have now.
Different data point: elderly machine, spinning rust, /tmp is tmpfs, no -j: elapsed time increases from ~2 to ~3 minutes.
Quoted 6 lines · Markus Armbruster
Quoted 4 lines · Fam Zheng
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.
Quoted 6 lines
Quoted 3 lines
With the first patch, this set takes a half minute on my laptop. If "-j" option
is used, it only takes a few more seconds than what we have now.Different data point: elderly machine, spinning rust, /tmp is tmpfs, no -j: elapsed time increases from ~2 to ~3 minutes.
I'm very much in favour of actually running the tests we have.
Running all the block tests for all the formats would be too slow, and that's why you run just the "quick" group, and only for qcow2. Quick enough?
Any ideas on speeding it up further? Trimming image sizes, perhaps?
What are the slowest tests in the quick group? Why are they slow? How are tests selected for the quick group anyway?
Quoted 15 lines · Markus Armbruster
Quoted 11 lines · Markus Armbruster
Quoted 7 lines · Fam Zheng
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.With the first patch, this set takes a half minute on my laptop. If "-j" option
is used, it only takes a few more seconds than what we have now.Different data point: elderly machine, spinning rust, /tmp is tmpfs, no -j: elapsed time increases from ~2 to ~3 minutes.
I'm very much in favour of actually running the tests we have.
Quoted 8 lines
Running all the block tests for all the formats would be too slow, and that's why you run just the "quick" group, and only for qcow2. Quick enough?
Any ideas on speeding it up further? Trimming image sizes, perhaps?
What are the slowest tests in the quick group? Why are they slow? How are tests selected for the quick group anyway?
Last time I updated the associations it was "Whatever runs in under five seconds on my HDD".
Max