Lines Matching +full:read +full:- +full:1
4 # Test case for copy-on-read into qcow2, using the COR filter driver
25 status=1 # failure is the default!
37 *[^-_a-zA-Z0-9/]*)
45 rm -f "$BLKDBG_CONF"
47 trap "_cleanup; exit \$status" 0 1 2 3 15
57 echo '=== Copy-on-read ==='
66 $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io
68 _make_test_img --no-opts -F "$IMGFMT" -b "$TEST_IMG" | _filter_img_create
69 $QEMU_IO -f qcow2 -c "write -z -u 1M 64k" "$TEST_WRAP" | _filter_qemu_io
71 # Ensure that a read of two clusters, but where one is already allocated,
72 # does not re-write the allocated cluster
74 [inject-error]
78 $QEMU_IO -c "open \
79 …-o driver=copy-on-read,file.driver=blkdebug,file.config=$BLKDBG_CONF,file.image.driver=qcow2 $TEST…
80 -c "read -P 0 1M 128k" | _filter_qemu_io
82 # Read the areas we want copied. A zero-length read should still be a
83 # no-op. The next read is under 2G, but aligned so that rounding to
84 # clusters copies more than 2G of zeroes. The final read will pick up
85 # the non-zero data in the same cluster. Since a 2G read may exhaust
86 # memory on some machines (particularly 32-bit), we skip the test if
89 -c "open -o driver=copy-on-read,file.driver=qcow2 $TEST_WRAP" \
90 -c "read 0 0" \
93 -c "open -o driver=copy-on-read,file.driver=qcow2 $TEST_WRAP" \
94 -c "read -P 0 1k $((2*1024*1024*1024 - 512))" \
95 2>&1 | _filter_qemu_io)
102 -c "open -o driver=copy-on-read,file.driver=qcow2 $TEST_WRAP" \
103 -c "read -P 0 $((3*1024*1024*1024 + 1024)) 1k" \
106 # Copy-on-read is incompatible with read-only
108 -c "open -r -o driver=copy-on-read,file.driver=qcow2 $TEST_WRAP" \
109 2>&1 | _filter_testdir
113 $QEMU_IMG rebase -u -b "" -f qcow2 "$TEST_WRAP"
114 $QEMU_IO -f qcow2 -c map "$TEST_WRAP"
116 $QEMU_IMG compare -f $IMGFMT -F qcow2 "$TEST_IMG" "$TEST_WRAP"