1QA output created by 153 2== readonly=off,force-share=on should be rejected == 3QEMU_PROG: -drive if=none,file=null-co://,readonly=off,force-share=on: force-share=on can only be used with read-only images 4 5== Creating base image == 6Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=33554432 7 8== Creating test image == 9Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base 10 11== Launching QEMU, opts: '' == 12 13== Launching another QEMU, opts: '' == 14QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,: Failed to get "write" lock 15Is another process using the image? 16 17== Launching another QEMU, opts: 'read-only=on' == 18QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,read-only=on: Failed to get shared "write" lock 19Is another process using the image? 20 21== Launching another QEMU, opts: 'read-only=on,force-share=on' == 22 23== Running utility commands == 24 25_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2 26can't open device TEST_DIR/t.qcow2: Failed to get "write" lock 27Is another process using the image? 28 29_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2 30can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock 31Is another process using the image? 32 33_qemu_io_wrapper -c open TEST_DIR/t.qcow2 -c read 0 512 34can't open device TEST_DIR/t.qcow2: Failed to get "write" lock 35Is another process using the image? 36 37_qemu_io_wrapper -c open -r TEST_DIR/t.qcow2 -c read 0 512 38can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock 39Is another process using the image? 40 41_qemu_img_wrapper info TEST_DIR/t.qcow2 42qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 43Is another process using the image? 44 45_qemu_img_wrapper check TEST_DIR/t.qcow2 46qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 47Is another process using the image? 48 49_qemu_img_wrapper compare TEST_DIR/t.qcow2 TEST_DIR/t.qcow2 50qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 51Is another process using the image? 52 53_qemu_img_wrapper map TEST_DIR/t.qcow2 54qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 55Is another process using the image? 56 57_qemu_img_wrapper amend -o TEST_DIR/t.qcow2 58qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 59Is another process using the image? 60 61_qemu_img_wrapper commit TEST_DIR/t.qcow2 62qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 63Is another process using the image? 64 65_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M 66qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 67Is another process using the image? 68 69_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base 70qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 71Is another process using the image? 72 73_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2 74qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 75Is another process using the image? 76 77_qemu_img_wrapper convert TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert 78qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 79Is another process using the image? 80 81_qemu_img_wrapper dd if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1 82qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 83Is another process using the image? 84 85_qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2 86qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock 87Is another process using the image? 88 89_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2 90qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 91Is another process using the image? 92 93== Running utility commands -U == 94 95_qemu_io_wrapper -U -c read 0 512 TEST_DIR/t.qcow2 96can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images 97 98_qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2 99 100_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512 101can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images 102 103_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512 104 105_qemu_img_wrapper info -U TEST_DIR/t.qcow2 106 107_qemu_img_wrapper check -U TEST_DIR/t.qcow2 108 109_qemu_img_wrapper compare -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2 110 111_qemu_img_wrapper map -U TEST_DIR/t.qcow2 112 113_qemu_img_wrapper amend -o -U TEST_DIR/t.qcow2 114qemu-img: unrecognized option '-U' 115Try 'qemu-img --help' for more information 116 117_qemu_img_wrapper commit -U TEST_DIR/t.qcow2 118qemu-img: unrecognized option '-U' 119Try 'qemu-img --help' for more information 120 121_qemu_img_wrapper resize -U TEST_DIR/t.qcow2 32M 122qemu-img: unrecognized option '-U' 123Try 'qemu-img --help' for more information 124 125_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base 126qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 127Is another process using the image? 128 129_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2 130 131_qemu_img_wrapper convert -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert 132 133_qemu_img_wrapper dd -U if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1 134 135_qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2 136 137_qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2 138qemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=on can only be used with read-only images 139 140Round done 141 142== Creating base image == 143Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=33554432 144 145== Creating test image == 146Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base 147 148== Launching QEMU, opts: 'read-only=on' == 149 150== Launching another QEMU, opts: '' == 151QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,: Failed to get "write" lock 152Is another process using the image? 153 154== Launching another QEMU, opts: 'read-only=on' == 155 156== Launching another QEMU, opts: 'read-only=on,force-share=on' == 157 158== Running utility commands == 159 160_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2 161can't open device TEST_DIR/t.qcow2: Failed to get "write" lock 162Is another process using the image? 163 164_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2 165 166_qemu_io_wrapper -c open TEST_DIR/t.qcow2 -c read 0 512 167can't open device TEST_DIR/t.qcow2: Failed to get "write" lock 168Is another process using the image? 169 170_qemu_io_wrapper -c open -r TEST_DIR/t.qcow2 -c read 0 512 171 172_qemu_img_wrapper info TEST_DIR/t.qcow2 173 174_qemu_img_wrapper check TEST_DIR/t.qcow2 175 176_qemu_img_wrapper compare TEST_DIR/t.qcow2 TEST_DIR/t.qcow2 177 178_qemu_img_wrapper map TEST_DIR/t.qcow2 179 180_qemu_img_wrapper amend -o TEST_DIR/t.qcow2 181qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 182Is another process using the image? 183 184_qemu_img_wrapper commit TEST_DIR/t.qcow2 185qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 186Is another process using the image? 187 188_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M 189qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 190Is another process using the image? 191 192_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base 193qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 194Is another process using the image? 195 196_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2 197 198_qemu_img_wrapper convert TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert 199 200_qemu_img_wrapper dd if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1 201 202_qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2 203 204_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2 205qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 206Is another process using the image? 207 208== Running utility commands -U == 209 210_qemu_io_wrapper -U -c read 0 512 TEST_DIR/t.qcow2 211can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images 212 213_qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2 214 215_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512 216can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images 217 218_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512 219 220_qemu_img_wrapper info -U TEST_DIR/t.qcow2 221 222_qemu_img_wrapper check -U TEST_DIR/t.qcow2 223 224_qemu_img_wrapper compare -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2 225 226_qemu_img_wrapper map -U TEST_DIR/t.qcow2 227 228_qemu_img_wrapper amend -o -U TEST_DIR/t.qcow2 229qemu-img: unrecognized option '-U' 230Try 'qemu-img --help' for more information 231 232_qemu_img_wrapper commit -U TEST_DIR/t.qcow2 233qemu-img: unrecognized option '-U' 234Try 'qemu-img --help' for more information 235 236_qemu_img_wrapper resize -U TEST_DIR/t.qcow2 32M 237qemu-img: unrecognized option '-U' 238Try 'qemu-img --help' for more information 239 240_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base 241qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock 242Is another process using the image? 243 244_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2 245 246_qemu_img_wrapper convert -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert 247 248_qemu_img_wrapper dd -U if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1 249 250_qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2 251 252_qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2 253qemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=on can only be used with read-only images 254 255Round done 256 257== Creating base image == 258Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=33554432 259 260== Creating test image == 261Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base 262 263== Launching QEMU, opts: 'read-only=on,force-share=on' == 264 265== Launching another QEMU, opts: '' == 266 267== Launching another QEMU, opts: 'read-only=on' == 268 269== Launching another QEMU, opts: 'read-only=on,force-share=on' == 270 271== Running utility commands == 272 273_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2 274 275_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2 276 277_qemu_io_wrapper -c open TEST_DIR/t.qcow2 -c read 0 512 278 279_qemu_io_wrapper -c open -r TEST_DIR/t.qcow2 -c read 0 512 280 281_qemu_img_wrapper info TEST_DIR/t.qcow2 282 283_qemu_img_wrapper check TEST_DIR/t.qcow2 284 285_qemu_img_wrapper compare TEST_DIR/t.qcow2 TEST_DIR/t.qcow2 286 287_qemu_img_wrapper map TEST_DIR/t.qcow2 288 289_qemu_img_wrapper amend -o TEST_DIR/t.qcow2 290 291_qemu_img_wrapper commit TEST_DIR/t.qcow2 292 293_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M 294 295_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base 296 297_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2 298 299_qemu_img_wrapper convert TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert 300 301_qemu_img_wrapper dd if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1 302 303_qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2 304 305_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2 306 307== Running utility commands -U == 308 309_qemu_io_wrapper -U -c read 0 512 TEST_DIR/t.qcow2 310can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images 311 312_qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2 313 314_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512 315can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images 316 317_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512 318 319_qemu_img_wrapper info -U TEST_DIR/t.qcow2 320 321_qemu_img_wrapper check -U TEST_DIR/t.qcow2 322 323_qemu_img_wrapper compare -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2 324 325_qemu_img_wrapper map -U TEST_DIR/t.qcow2 326 327_qemu_img_wrapper amend -o -U TEST_DIR/t.qcow2 328qemu-img: unrecognized option '-U' 329Try 'qemu-img --help' for more information 330 331_qemu_img_wrapper commit -U TEST_DIR/t.qcow2 332qemu-img: unrecognized option '-U' 333Try 'qemu-img --help' for more information 334 335_qemu_img_wrapper resize -U TEST_DIR/t.qcow2 32M 336qemu-img: unrecognized option '-U' 337Try 'qemu-img --help' for more information 338 339_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base 340 341_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2 342 343_qemu_img_wrapper convert -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert 344 345_qemu_img_wrapper dd -U if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1 346 347_qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2 348 349_qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2 350qemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=on can only be used with read-only images 351 352Round done 353== Creating TEST_DIR/t.qcow2.[abc] == 354Formatting 'TEST_DIR/t.IMGFMT.a', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT 355Formatting 'TEST_DIR/t.IMGFMT.b', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT 356Formatting 'TEST_DIR/t.IMGFMT.c', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.b 357 358== Two devices sharing the same file in backing chain == 359 360== Backing image also as an active device == 361QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2: Failed to get "write" lock 362Is another process using the image? 363 364== Backing image also as an active device (ro) == 365 366== Symbolic link == 367QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2: Failed to get "write" lock 368Is another process using the image? 369 370== Closing an image should unlock it == 371{"return": {}} 372Adding drive 373 374_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 375can't open device TEST_DIR/t.qcow2: Failed to get "write" lock 376Is another process using the image? 377Closing drive 378 379_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 380Adding two and closing one 381 382_qemu_img_wrapper info TEST_DIR/t.qcow2 383 384_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 385can't open device TEST_DIR/t.qcow2: Failed to get "write" lock 386Is another process using the image? 387Closing the other 388 389_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 390*** done 391