Skip to contentSkip to conversation

tests: Add check-block to "make check"

PATCH Applied Fam Zheng 2 participants 5 messages Dec 15, 2014

v2 of 4 Applied Latest is v4 →

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

v2 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.

v2: Address comments from reviewing of v1:
Remove 091 from quick group. (Kevin)
Add Max's rev-by in patch 2. (Max)
Allow overriding TEST_DIR, and leave "-c writeback" out in patch 3. (Markus, Kevin)

Fam Zheng (3):
qemu-iotests: Remove 091 from quick group
qemu-iotests: Speed up make check-block
tests/Makefile: Add check-block to make check

 tests/Makefile              | 2 +-
 tests/qemu-iotests-quick.sh | 2 +-
 tests/qemu-iotests/check    | 1 +
 tests/qemu-iotests/group    | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.3
author
#1 lore raw

PATCH v2 1/3 qemu-iotests: Remove 091 from quick group

For the purpose of allowing running quick group on tmpfs.

---
 tests/qemu-iotests/group | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/group +1 -1
index a4742c6..08099b9 100644
@@ -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
Signature · 1 line
1.9.3
author
#2 lore raw

PATCH v2 2/3 qemu-iotests: Speed up make check-block

In reply to Fam Zheng

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.

---
 tests/qemu-iotests-quick.sh | 2 +-
 tests/qemu-iotests/check    | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
tests/qemu-iotests-quick.sh +1 -1
index 12af731..0e554bb 100755
@@ -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
tests/qemu-iotests/check +1 -0
index 8ca4011..baeae80 100755
@@ -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
Signature · 1 line
1.9.3
author
#3 lore raw

PATCH v2 3/3 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
index 16f0e4c..f430b18 100644
@@ -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
Applied
#4 lore raw
In reply to Fam Zheng

Am 15.12.2014 um 06:07 hat Fam Zheng geschrieben:

Quoted 9 lines

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.

v2: Address comments from reviewing of v1:
Remove 091 from quick group. (Kevin)
Add Max's rev-by in patch 2. (Max)
Allow overriding TEST_DIR, and leave "-c writeback" out in patch 3. (Markus, Kevin)

Thanks, applied to the block branch.

Kevin