qemu/tests/qemu-iotests
Alberto Garcia 8aa34834d5 qcow2: Prevent allocating compressed clusters at offset 0
If the refcount data is corrupted then we can end up trying to
allocate a new compressed cluster at offset 0 in the image, triggering
an assertion in qcow2_alloc_bytes() that would crash QEMU:

  qcow2_alloc_bytes: Assertion `offset' failed.

This patch adds an explicit check for this scenario and a new test
case.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: fb53467cf48e95ff3330def1cf1003a5b862b7d9.1509718618.git.berto@igalia.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-11-14 18:06:25 +01:00
..
sample_images
.gitignore
001
001.out
002
002.out
003
003.out
004
004.out
005
005.out
007
007.out
008
008.out
009
009.out
010
010.out
011
011.out
012
012.out
013
013.out
014
014.out
015
015.out
017
017.out
018
018.out
019
019.out
020
020.out
021
021.out
022
022.out
023
023.out
024
024.out
025
025.out
026
026.out
026.out.nocache
027
027.out
028
028.out
029
029.out
030 commit: Remove overlay_bs 2017-10-06 16:28:58 +02:00
030.out
031
031.out
032
032.out
033
033.out
034
034.out
035
035.out
036
036.out
037
037.out
038
038.out
039
039.out qemu-iotests: limit non-_PROG-suffixed variables to common.rc 2017-10-06 16:28:58 +02:00
040 iotests: use -ccw on s390x for 040, 139, and 182 2017-09-26 14:46:23 +02:00
040.out block: Skip implicit nodes in query-block/blockstats 2017-07-24 15:06:04 +02:00
041 qemu-iotests/041: Fix leaked scratch images 2017-08-01 18:09:33 +02:00
041.out block: Skip implicit nodes in query-block/blockstats 2017-07-24 15:06:04 +02:00
042
042.out
043
043.out
044
044.out
045
045.out
046
046.out
047
047.out
048
048.out
049
049.out
050
050.out
051 iotests: use -ccw on s390x for 051 2017-09-26 14:46:23 +02:00
051.out iotests: use -ccw on s390x for 051 2017-09-26 14:46:23 +02:00
051.pc.out iotests: use -ccw on s390x for 051 2017-09-26 14:46:23 +02:00
052
052.out
053
053.out
054
054.out
055 qemu-iotests: Avoid unnecessary sleeps 2017-07-24 15:06:04 +02:00
055.out
056
056.out
057
057.out
058 nbd-client: Refuse read-only client with BDRV_O_RDWR 2017-11-09 10:10:17 -06:00
058.out
059 qemu-iotests/059: Fix leaked image files 2017-08-01 18:09:33 +02:00
059.out qemu-iotests/059: Fix leaked image files 2017-08-01 18:09:33 +02:00
060 qcow2: Prevent allocating compressed clusters at offset 0 2017-11-14 18:06:25 +01:00
060.out qcow2: Prevent allocating compressed clusters at offset 0 2017-11-14 18:06:25 +01:00
061
061.out qemu-iotests: limit non-_PROG-suffixed variables to common.rc 2017-10-06 16:28:58 +02:00
062
062.out
063 qemu-iotests/063: Fix leaked image 2017-08-01 18:09:33 +02:00
063.out
064
064.out
065
065.out
066
066.out
067 iotests: Pull _filter_actual_image_size from 67/87 2017-10-26 15:01:13 +02:00
067.out iotests: use virtio aliases for 067 2017-09-26 14:46:23 +02:00
068 snapshot/tests: Try loadvm twice 2017-09-06 15:19:01 +01:00
068.out snapshot/tests: Try loadvm twice 2017-09-06 15:19:01 +01:00
069
069.out
070
070.out
071
071.out
072
072.out
073
073.out
074 qemu-iotests: Remove blkdebug.conf after tests 2017-08-01 18:09:33 +02:00
074.out qemu-img: Drop redundant error message in compare 2017-10-26 14:45:57 +02:00
075
075.out
076
076.out
077
077.out
078
078.out
079
079.out
080
080.out
081
081.out
082 qemu-img: Check for backing image if specified during create 2017-07-18 15:27:37 +02:00
082.out qemu-img: Check for backing image if specified during create 2017-07-18 15:27:37 +02:00
083 qemu-iotests: test NBD over UNIX domain sockets in 083 2017-08-30 13:00:38 -05:00
083.out nbd: Minimal structured read for client 2017-10-30 21:48:41 +01:00
084
084.out
085 block: Use JSON null instead of "" to disable backing file 2017-07-24 13:35:11 +02:00
085.out
086
086.out
087 iotests: Pull _filter_actual_image_size from 67/87 2017-10-26 15:01:13 +02:00
087.out
088
088.out
089
089.out
090
090.out
091
091.out
092
092.out
093 qemu-iotests: Test I/O limits with removable media 2017-11-13 15:46:26 +00:00
093.out qemu-iotests: Test I/O limits with removable media 2017-11-13 15:46:26 +00:00
094
094.out
095
095.out
096
096.out
097
097.out
098
098.out
099
099.out
101
101.out
102 qemu-img: add --shrink flag for resize 2017-09-26 15:00:32 +02:00
102.out
103
103.out
104
104.out
105
105.out
106 qemu-img: add --shrink flag for resize 2017-09-26 15:00:32 +02:00
106.out iotests: Add preallocated resize test for raw 2017-07-11 17:45:02 +02:00
107
107.out
108
108.out
109 qemu-iotests/109: Fix lock race condition 2017-08-08 14:36:59 +02:00
109.out qemu-iotests/109: Fix lock race condition 2017-08-08 14:36:59 +02:00
110
110.out
111
111.out qemu-img: Check for backing image if specified during create 2017-07-18 15:27:37 +02:00
112
112.out
113
113.out
114
114.out
115
115.out
116
116.out
117
117.out
118
118.out
119
119.out
120
120.out
121
121.out
122
122.out
123
123.out
124 iotests: Check dirty bitmap statistics in 124 2017-08-01 18:09:33 +02:00
124.out
125 iotests: Add cluster_size=64k to 125 2017-10-26 15:01:14 +02:00
125.out iotests: Add cluster_size=64k to 125 2017-10-26 15:01:14 +02:00
126
126.out
127 iotests: Add test for dataplane mirroring 2017-10-26 15:01:13 +02:00
127.out iotests: Add test for dataplane mirroring 2017-10-26 15:01:13 +02:00
128
128.out
129
129.out
130
130.out
131
131.out
132
132.out
133
133.out
134
134.out
135
135.out
136 block/null: Remove 'filename' option 2017-08-08 15:19:16 +02:00
136.out
137
137.out qemu-iotests: limit non-_PROG-suffixed variables to common.rc 2017-10-06 16:28:58 +02:00
138
138.out
139 iotests: use -ccw on s390x for 040, 139, and 182 2017-09-26 14:46:23 +02:00
139.out
140 nbd-client: Refuse read-only client with BDRV_O_RDWR 2017-11-09 10:10:17 -06:00
140.out nbd: Fix iotests failure due to changed client error message 2017-07-17 13:57:42 -05:00
141 qemu-iotests/141: Fix image cleanup 2017-08-01 18:09:33 +02:00
141.out
142
142.out
143
143.out nbd: Fix iotests failure due to changed client error message 2017-07-17 13:57:42 -05:00
144
144.out
145
145.out
146
146.out
147 nbd-client: Refuse read-only client with BDRV_O_RDWR 2017-11-09 10:10:17 -06:00
147.out
148
148.out
149
149.out
150
150.out
152
152.out
153 qemu-iotests/153: Fix leaked scratch images 2017-08-01 18:09:33 +02:00
153.out
154
154.out
155
155.out
156 iotests: Fix test 156 2017-08-01 18:09:33 +02:00
156.out
157
157.out
158 qemu-img: Check for backing image if specified during create 2017-07-18 15:27:37 +02:00
158.out
159
159.out
160
160.out
162 qemu-iotests/162: Fix leaked temporary files 2017-08-01 18:09:33 +02:00
162.out
163 qemu-iotests: add shrinking image test 2017-09-26 15:00:32 +02:00
163.out qemu-iotests: add shrinking image test 2017-09-26 15:00:32 +02:00
165 qcow2: Switch store_bitmap_data() to byte-based iteration 2017-10-06 16:28:58 +02:00
165.out
170
170.out
171
171.out
172 qemu-iotests: Add missing -machine accel=qtest 2017-09-26 14:46:23 +02:00
172.out hw/block/fdc: Convert to realize 2017-09-18 19:43:38 -04:00
173
173.out
174
174.out
175
175.out
176
176.out
177 qemu-io: Relax 'alloc' now that block-status doesn't assert 2017-10-26 14:45:57 +02:00
177.out qemu-io: Relax 'alloc' now that block-status doesn't assert 2017-10-26 14:45:57 +02:00
178
178.out.qcow2
178.out.raw
179 qemu-iotests: Remove blkdebug.conf after tests 2017-08-01 18:09:33 +02:00
179.out
181 iotests: fix 181: enable postcopy-ram capability on target 2017-09-26 14:46:23 +02:00
181.out iotests: fix 181: enable postcopy-ram capability on target 2017-09-26 14:46:23 +02:00
182 iotests: use -ccw on s390x for 040, 139, and 182 2017-09-26 14:46:23 +02:00
182.out
183
183.out
184 iotests: Filter actual image size in 184 and 191 2017-10-26 15:01:13 +02:00
184.out iotests: Filter actual image size in 184 and 191 2017-10-26 15:01:13 +02:00
185 qemu-iotests: fix 185 2017-08-11 14:44:39 +02:00
185.out
186 qemu-iotests: Add missing -machine accel=qtest 2017-09-26 14:46:23 +02:00
186.out iotests: Redirect stderr to stdout in 186 2017-08-01 18:09:33 +02:00
187 qemu-iotests: Test reopen between read-only and read-write 2017-08-08 15:19:16 +02:00
187.out qemu-io: Drop write permissions before read-only reopen 2017-09-26 14:46:23 +02:00
188
188.out
189 qemu-img: Check for backing image if specified during create 2017-07-18 15:27:37 +02:00
189.out
190 iotests: Add test of recent fix to 'qemu-img measure' 2017-08-01 18:09:33 +02:00
190.out iotests: Add test of recent fix to 'qemu-img measure' 2017-08-01 18:09:33 +02:00
191 iotests: Filter actual image size in 184 and 191 2017-10-26 15:01:13 +02:00
191.out iotests: Filter actual image size in 184 and 191 2017-10-26 15:01:13 +02:00
192 iotests: rewrite 192 to use _launch_qemu to fix LUKS support 2017-09-05 14:17:26 -05:00
192.out iotests: Add non-shared storage migration case 192 2017-08-15 10:03:28 -05:00
194 iotests: blacklist 194 with the luks driver 2017-09-05 14:17:26 -05:00
194.out qemu-iotests: Extend non-shared storage migration test (194) 2017-08-30 13:00:37 -05:00
195 iotests: Fix 195 if IMGFMT is part of TEST_DIR 2017-10-06 16:30:47 +02:00
195.out qemu-iotests: Test change-backing-file command 2017-09-26 14:46:23 +02:00
197 iotests: Add test 197 for covering copy-on-read 2017-10-06 16:28:58 +02:00
197.out iotests: Add test 197 for covering copy-on-read 2017-10-06 16:28:58 +02:00
check iotests: Restore stty settings on completion 2017-10-06 16:28:58 +02:00
common.config qemu-iotests: disintegrate more parts of common.config 2017-10-06 16:28:58 +02:00
common.filter iotests: Pull _filter_actual_image_size from 67/87 2017-10-26 15:01:13 +02:00
common.pattern
common.qemu qemu-iotests: Allow QMP pretty printing in common.qemu 2017-10-06 16:28:58 +02:00
common.rc qemu-iotests: get rid of $iam 2017-10-06 16:28:58 +02:00
COPYING
group iotests: Add test for dataplane mirroring 2017-10-26 15:01:13 +02:00
iotests.py scripts: Remove debug parameter from QEMUMachine 2017-10-11 15:15:17 -03:00
Makefile
nbd-fault-injector.py nbd: rename some simple-request related objects to be _simple_ 2017-10-12 16:27:34 -05:00
qcow2.py
qed.py
README
socket_scm_helper.c

=== This is the QEMU I/O test suite ===

* Intro

This package contains a simple test suite for the I/O layer of qemu.
It does not require a guest, but only the qemu, qemu-img and qemu-io
binaries.  This does limit it to exercise the low-level I/O path only
but no actual block drivers like ide, scsi or virtio.

* Usage

Just run ./check to run all tests for the raw image format, or ./check
-qcow2 to test the qcow2 image format.  The output of ./check -h explains
additional options to test further image formats or I/O methods.

* Feedback and patches

Please send improvements to the test suite, general feedback or just
reports of failing tests cases to qemu-devel@nongnu.org with a CC:
to qemu-block@nongnu.org.