Lines Matching +full:- +full:- +full:-
4 # Test case for copy-on-read into qcow2
40 *[^-_a-zA-Z0-9/]*)
48 rm -f "$BLKDBG_CONF"
60 echo '=== Copy-on-read ==='
69 $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io
71 _make_test_img --no-opts -F "$IMGFMT" -b "$TEST_IMG" | _filter_img_create
72 $QEMU_IO -f qcow2 -c "write -z -u 1M 64k" "$TEST_WRAP" | _filter_qemu_io
75 # does not re-write the allocated cluster
77 [inject-error]
81 $QEMU_IO -c "open -C \
82 -o driver=blkdebug,config=$BLKDBG_CONF,image.driver=qcow2 $TEST_WRAP" \
83 -c "read -P 0 1M 128k" | _filter_qemu_io
85 # Read the areas we want copied. A zero-length read should still be a
86 # no-op. The next read is under 2G, but aligned so that rounding to
88 # the non-zero data in the same cluster. Since a 2G read may exhaust
89 # memory on some machines (particularly 32-bit), we skip the test if
91 $QEMU_IO -f qcow2 -C -c "read 0 0" "$TEST_WRAP" | _filter_qemu_io
92 output=$($QEMU_IO -f qcow2 -C -c "read -P 0 1k $((2*1024*1024*1024 - 512))" \
99 $QEMU_IO -f qcow2 -C -c "read -P 0 $((3*1024*1024*1024 + 1024)) 1k" \
102 # Copy-on-read is incompatible with read-only
103 $QEMU_IO -f qcow2 -C -r "$TEST_WRAP" 2>&1 | _filter_testdir
107 $QEMU_IMG rebase -u -b "" -f qcow2 "$TEST_WRAP"
108 $QEMU_IO -f qcow2 -c map "$TEST_WRAP"
110 $QEMU_IMG compare -f $IMGFMT -F qcow2 "$TEST_IMG" "$TEST_WRAP"
120 _make_test_img --no-opts -o compat=1.1 1024
121 $QEMU_IO -f qcow2 -C -c 'read 0 1024' "$TEST_WRAP" | _filter_qemu_io
122 $QEMU_IO -f qcow2 -c map "$TEST_WRAP"
126 echo '=== Copy-on-read with subclusters ==='
133 _make_test_img --no-opts -o extended_l2=true -F "$IMGFMT" -b "$TEST_IMG" \
136 $QEMU_IO -c "write -P 0xaa 0 64k" "$TEST_IMG" | _filter_qemu_io
139 $QEMU_IO -f qcow2 -c "write -P 0xbb 28K 2K" -c "write -P 0xcc 34K 2K" "$TEST_WRAP" \
143 $QEMU_IO -f qcow2 -c map "$TEST_WRAP"
145 # Actual copy-on-read operation
146 $QEMU_IO -f qcow2 -C -c "read -P 0xaa 30K 4K" "$TEST_WRAP" | _filter_qemu_io
150 $QEMU_IO -f qcow2 -c map "$TEST_WRAP"