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