]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
reflink: fix style problems in existing tests
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 10 Feb 2016 08:33:10 +0000 (00:33 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 12 Feb 2016 17:39:05 +0000 (09:39 -0800)
Fix style problems such as unnecessary use of quotes, add helper
variables to reduce visual clutter, and other minor fixes to make the
first batch of tests more closely resemble the second round tests.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
87 files changed:
tests/generic/110
tests/generic/111
tests/generic/115
tests/generic/116
tests/generic/118
tests/generic/119
tests/generic/121
tests/generic/122
tests/generic/134
tests/generic/136
tests/generic/137
tests/generic/138
tests/generic/139
tests/generic/140
tests/generic/142
tests/generic/143
tests/generic/144
tests/generic/145
tests/generic/146
tests/generic/147
tests/generic/148
tests/generic/149
tests/generic/150
tests/generic/151
tests/generic/152
tests/generic/153
tests/generic/154
tests/generic/155
tests/generic/156
tests/generic/157
tests/generic/158
tests/generic/159
tests/generic/160
tests/generic/161
tests/generic/162
tests/generic/163
tests/generic/164
tests/generic/165
tests/generic/166
tests/generic/167
tests/generic/168
tests/generic/170
tests/generic/171
tests/generic/172
tests/generic/173
tests/generic/174
tests/generic/178
tests/generic/179
tests/generic/180
tests/generic/181
tests/generic/182
tests/generic/183
tests/generic/185
tests/generic/186
tests/generic/187
tests/generic/188
tests/generic/189
tests/generic/190
tests/generic/191
tests/generic/194
tests/generic/195
tests/generic/196
tests/generic/197
tests/generic/199
tests/generic/200
tests/generic/201
tests/generic/202
tests/generic/203
tests/generic/205
tests/generic/206
tests/generic/216
tests/generic/217
tests/generic/218
tests/generic/220
tests/generic/222
tests/generic/227
tests/generic/229
tests/generic/238
tests/generic/242
tests/generic/243
tests/xfs/127
tests/xfs/128
tests/xfs/129
tests/xfs/131
tests/xfs/132
tests/xfs/139
tests/xfs/140

index a43f02d307d627ab773b961d72da78627882f13d..1fcdb56b48f8501c742c40bd33b04312dab0225a 100755 (executable)
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f $tmp.* "$testdir"
+    rm -f $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
index ef9c42459fe51baf12ca5b6826f8d6257a405a0f..dce9c84f514570a7fbb63906c085f323c3d1e44c 100755 (executable)
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f $tmp.* "$testdir"
+    rm -f $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
index 578d5bd8528fa712a44009e63726afa2c7e7b14d..43ce59c6f0366538f3db4299499d58e7547bfa83 100755 (executable)
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f $tmp.* "$testdir"
+    rm -f $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
index 5c361e2646f2fb7d70a187aa66d6aee0ce1c5a1c..18f807323fcb26da1f60a79562c1904b27a25226 100755 (executable)
@@ -22,8 +22,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -46,44 +46,44 @@ _cleanup()
 _supported_os Linux
 _require_test_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) "$testdir/file2" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 8)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 8)) \
        || echo "Files do not match"
 
 echo "Reflink the middle blocks together"
-free_before="$(stat -f -c '%a' "$testdir")"
-_reflink_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
-               $((blksz * 4)) $((blksz * 2)) >> "$seqres.full"
+free_before=$(stat -f -c '%a' $testdir)
+_reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
+               $((blksz * 4)) $((blksz * 2)) >> $seqres.full
 _test_remount
-free_after="$(stat -f -c '%a' "$testdir")"
-echo "freesp changed by $free_before -> $free_after" >> "$seqres.full"
+free_after=$(stat -f -c '%a' $testdir)
+echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
 echo "Compare sections"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 4)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) \
        || echo "Start sections do not match"
 
-_compare_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
                $((blksz * 4)) $((blksz * 2)) \
        || echo "Middle sections do not match"
 
-_compare_range "$testdir/file1" $((blksz * 6)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 6)) $testdir/file2 \
                $((blksz * 6)) $((blksz * 2)) \
        || echo "End sections do not match"
 
index 41e525c3a28d0571d3c6e37ed2e44c326321862a..6b6478b1f27068980eced643e532d1eb7e8df2c3 100755 (executable)
@@ -23,7 +23,7 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
+seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -47,44 +47,44 @@ _cleanup()
 _supported_os Linux
 _require_test_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) "$testdir/file2" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 8)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 8)) \
        || echo "Files do not match (intentional)"
 
 echo "Reflink the middle blocks together"
-free_before="$(stat -f -c '%a' "$testdir")"
-_reflink_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
-               $((blksz * 4)) $((blksz * 2)) >> "$seqres.full"
+free_before=$(stat -f -c '%a' $testdir)
+_reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
+               $((blksz * 4)) $((blksz * 2)) >> $seqres.full
 _test_remount
-free_after="$(stat -f -c '%a' "$testdir")"
-echo "freesp changed by $free_before -> $free_after" >> "$seqres.full"
+free_after=$(stat -f -c '%a' $testdir)
+echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
 echo "Compare sections"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 4)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) \
        || echo "Start sections do not match (intentional)"
 
-_compare_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
                $((blksz * 4)) $((blksz * 2)) \
        || echo "Middle sections do not match"
 
-_compare_range "$testdir/file1" $((blksz * 6)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 6)) $testdir/file2 \
                $((blksz * 6)) $((blksz * 2)) \
        || echo "End sections do not match (intentional)"
 
index 27e76045378dfcc66dec0f3f6338719eb2093207..1a7d26e755d88d084a5b3af58faa86c513284327 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,7 +48,7 @@ _cleanup()
 _supported_os Linux
 _require_test_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 testdir=$TEST_DIR/test-$seq
 rm -rf $testdir
@@ -56,112 +56,112 @@ mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 8)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * 8)) "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x63 0 $((blksz * 8)) "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x64 0 $((blksz * 8)) "$testdir/file4" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 8)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz * 8)) $testdir/file2 >> $seqres.full
+_pwrite_byte 0x63 0 $((blksz * 8)) $testdir/file3 >> $seqres.full
+_pwrite_byte 0x64 0 $((blksz * 8)) $testdir/file4 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 8)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 8)) \
        || echo "Files 1-2 do not match (intentional)"
 
-_compare_range "$testdir/file1" 0 "$testdir/file3" 0 $((blksz * 8)) \
+_compare_range $testdir/file1 0 $testdir/file3 0 $((blksz * 8)) \
        || echo "Files 1-3 do not match (intentional)"
 
-_compare_range "$testdir/file1" 0 "$testdir/file4" 0 $((blksz * 8)) \
+_compare_range $testdir/file1 0 $testdir/file4 0 $((blksz * 8)) \
        || echo "Files 1-4 do not match (intentional)"
 
 echo "Reflink the first four blocks together, 1-2 3-4"
-free_before="$(stat -f -c '%a' "$testdir")"
-_reflink_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 4)) >> "$seqres.full"
-_reflink_range "$testdir/file3" 0 "$testdir/file4" 0 $((blksz * 4)) >> "$seqres.full"
+free_before=$(stat -f -c '%a' $testdir)
+_reflink_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) >> $seqres.full
+_reflink_range $testdir/file3 0 $testdir/file4 0 $((blksz * 4)) >> $seqres.full
 _test_remount
-free_after="$(stat -f -c '%a' "$testdir")"
-echo "freesp changed by $free_before -> $free_after" >> "$seqres.full"
+free_after=$(stat -f -c '%a' $testdir)
+echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
 echo "Compare sections"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 4)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) \
        || echo "Sections of file 1-2 do not match"
 
-_compare_range "$testdir/file1" 0 "$testdir/file3" 0 $((blksz * 4)) \
+_compare_range $testdir/file1 0 $testdir/file3 0 $((blksz * 4)) \
        || echo "Sections of file 1-3 do not match (intentional)"
 
-_compare_range "$testdir/file1" 0 "$testdir/file4" 0 $((blksz * 4)) \
+_compare_range $testdir/file1 0 $testdir/file4 0 $((blksz * 4)) \
        || echo "Sections of file 1-4 do not match (intentional)"
 
-_compare_range "$testdir/file2" 0 "$testdir/file3" 0 $((blksz * 4)) \
+_compare_range $testdir/file2 0 $testdir/file3 0 $((blksz * 4)) \
        || echo "Sections of file 2-3 do not match (intentional)"
 
-_compare_range "$testdir/file2" 0 "$testdir/file4" 0 $((blksz * 4)) \
+_compare_range $testdir/file2 0 $testdir/file4 0 $((blksz * 4)) \
        || echo "Sections of file 2-4 do not match (intentional)"
 
-_compare_range "$testdir/file3" 0 "$testdir/file4" 0 $((blksz * 4)) \
+_compare_range $testdir/file3 0 $testdir/file4 0 $((blksz * 4)) \
        || echo "Sections of file 3-4 do not match"
 
 echo "Reflink the first two blocks together, 1-3 1-4"
-free_before="$(stat -f -c '%a' $testdir)"
-_reflink_range "$testdir/file1" 0 "$testdir/file3" 0 $((blksz * 2)) >> "$seqres.full"
-_reflink_range "$testdir/file1" 0 "$testdir/file4" 0 $((blksz * 2)) >> "$seqres.full"
+free_before=$(stat -f -c '%a' $testdir)
+_reflink_range $testdir/file1 0 $testdir/file3 0 $((blksz * 2)) >> $seqres.full
+_reflink_range $testdir/file1 0 $testdir/file4 0 $((blksz * 2)) >> $seqres.full
 _test_remount
-free_after="$(stat -f -c '%a' $testdir)"
-echo "freesp changed by $free_before -> $free_after" >> "$seqres.full"
+free_after=$(stat -f -c '%a' $testdir)
+echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
 echo "Compare sections"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 2)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 2)) \
        || echo "Sections of files 1-2 do not match"
 
-_compare_range "$testdir/file1" 0 "$testdir/file3" 0 $((blksz * 2)) \
+_compare_range $testdir/file1 0 $testdir/file3 0 $((blksz * 2)) \
        || echo "Sections of files 1-3 do not match"
 
-_compare_range "$testdir/file1" 0 "$testdir/file4" 0 $((blksz * 2)) \
+_compare_range $testdir/file1 0 $testdir/file4 0 $((blksz * 2)) \
        || echo "Sections of files 1-4 do not match"
 
-_compare_range "$testdir/file2" 0 "$testdir/file3" 0 $((blksz * 2)) \
+_compare_range $testdir/file2 0 $testdir/file3 0 $((blksz * 2)) \
        || echo "Sections of files 2-3 do not match"
 
-_compare_range "$testdir/file2" 0 "$testdir/file4" 0 $((blksz * 2)) \
+_compare_range $testdir/file2 0 $testdir/file4 0 $((blksz * 2)) \
        || echo "Sections of files 2-4 do not match"
 
-_compare_range "$testdir/file3" 0 "$testdir/file4" 0 $((blksz * 2)) \
+_compare_range $testdir/file3 0 $testdir/file4 0 $((blksz * 2)) \
        || echo "Sections of files 3-4 do not match"
 
 echo "Compare previously reflinked sections"
-_compare_range "$testdir/file1" $((blksz * 2)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 2)) $testdir/file2 \
                $((blksz * 2)) $((blksz * 2)) \
        || echo "Sections of file 1-2 do not match"
 
-_compare_range "$testdir/file1" $((blksz * 2)) "$testdir/file3" \
+_compare_range $testdir/file1 $((blksz * 2)) $testdir/file3 \
                $((blksz * 2)) $((blksz * 2)) \
        || echo "Sections of file 1-3 do not match (intentional)"
 
-_compare_range "$testdir/file1" $((blksz * 2)) "$testdir/file4" \
+_compare_range $testdir/file1 $((blksz * 2)) $testdir/file4 \
                $((blksz * 2)) $((blksz * 2)) \
        || echo "Sections of file 1-4 do not match (intentional)"
 
-_compare_range "$testdir/file2" $((blksz * 2)) "$testdir/file3" \
+_compare_range $testdir/file2 $((blksz * 2)) $testdir/file3 \
                $((blksz * 2)) $((blksz * 2)) \
        || echo "Sections of file 2-3 do not match (intentional)"
 
-_compare_range "$testdir/file2" $((blksz * 2)) "$testdir/file4" \
+_compare_range $testdir/file2 $((blksz * 2)) $testdir/file4 \
                $((blksz * 2)) $((blksz * 2)) \
        || echo "Sections of file 2-4 do not match (intentional)"
 
-_compare_range "$testdir/file3" $((blksz * 2)) "$testdir/file4" \
+_compare_range $testdir/file3 $((blksz * 2)) $testdir/file4 \
                $((blksz * 2)) $((blksz * 2)) \
        || echo "Sections of file 3-4 do not match"
 
index 0e15e8d9c312b87e78a5a5a0adcabf3b3d24d50c..7d6f9820942468dcd4ee60282ce45a6ffb5c3080 100755 (executable)
@@ -22,8 +22,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -46,44 +46,44 @@ _cleanup()
 _supported_os Linux
 _require_test_dedupe
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) "$testdir/file2" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 8)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 8)) \
        || echo "Files 1-2 do not match (intentional)"
 
 echo "Dedupe the middle blocks together"
-free_before="$(stat -f -c '%a' "$testdir")"
-_dedupe_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
-               $((blksz * 4)) $((blksz * 2)) >> "$seqres.full"
+free_before=$(stat -f -c '%a' $testdir)
+_dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
+               $((blksz * 4)) $((blksz * 2)) >> $seqres.full
 _test_remount
-free_after="$(stat -f -c '%a' "$testdir")"
-echo "freesp changed by $free_before -> $free_after" >> "$seqres.full"
+free_after=$(stat -f -c '%a' $testdir)
+echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
 echo "Compare sections"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 4)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) \
        || echo "Start sections do not match"
 
-_compare_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
                $((blksz * 4)) $((blksz * 2)) \
        || echo "Middle sections do not match"
 
-_compare_range "$testdir/file1" $((blksz * 6)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 6)) $testdir/file2 \
                $((blksz * 6)) $((blksz * 2)) \
        || echo "End sections do not match"
 
index e7585f75621906201d9a099c1476f9a89609ff09..d5cc3a2d76eac9ca25e88342ca9d0a009e4b9453 100755 (executable)
@@ -22,8 +22,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -46,44 +46,44 @@ _cleanup()
 _supported_os Linux
 _require_test_dedupe
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) "$testdir/file2" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 "$((blksz * 8))" \
+_compare_range $testdir/file1 0 $testdir/file2 0 "$((blksz * 8))" \
        || echo "Files 1-2 do not match (intentional)"
 
 echo "(Fail to) dedupe the middle blocks together"
-free_before="$(stat -f -c '%a' "$testdir")"
-_dedupe_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
-               $((blksz * 4)) $((blksz * 2)) >> "$seqres.full"
+free_before=$(stat -f -c '%a' $testdir)
+_dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
+               $((blksz * 4)) $((blksz * 2)) >> $seqres.full
 _test_remount
-free_after="$(stat -f -c '%a' "$testdir")"
-echo "freesp changed by $free_before -> $free_after" >> "$seqres.full"
+free_after=$(stat -f -c '%a' $testdir)
+echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
 echo "Compare sections"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $((blksz * 4)) \
+_compare_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) \
        || echo "Start sections do not match (intentional)"
 
-_compare_range "$testdir/file1" $((blksz * 4)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
                $((blksz * 4)) $((blksz * 2)) \
        || echo "Middle sections do not match (intentional)"
 
-_compare_range "$testdir/file1" $((blksz * 6)) "$testdir/file2" \
+_compare_range $testdir/file1 $((blksz * 6)) $testdir/file2 \
                $((blksz * 6)) $((blksz * 2)) \
        || echo "End sections do not match (intentional)"
 
index 1dda839ac1eb042e20881a3e6cef332b9b22f7b8..b1b1fa7729632ad85e23d78533b0edadc8f3d126 100755 (executable)
@@ -26,8 +26,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,46 +50,46 @@ _cleanup()
 _supported_os Linux
 _require_test_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz + 37)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz + 37)) "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz + 37)) "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz + 37)) "$testdir/file4" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
 
 c1="$(_md5_checksum $testdir/file1)"
 c2="$(_md5_checksum $testdir/file2)"
 c3="$(_md5_checksum $testdir/file3)"
 c4="$(_md5_checksum $testdir/file4)"
 
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" = "${c4}" || echo "file3 and file4 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} = ${c4} || echo "file3 and file4 should match"
 
 echo "Reflink the last blocks together, 1-2 1-3"
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $blksz 37 >> "$seqres.full"
-_reflink_range "$testdir/file1" $blksz "$testdir/file3" $blksz 37 >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
+_reflink_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
 
 c1="$(_md5_checksum $testdir/file1)"
 c2="$(_md5_checksum $testdir/file2)"
@@ -97,30 +97,30 @@ c3="$(_md5_checksum $testdir/file3)"
 c4="$(_md5_checksum $testdir/file4)"
 
 echo "Compare files"
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" != "${c4}" || echo "file3 and file4 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} != ${c4} || echo "file3 and file4 should match"
 
 echo "Compare sections"
-_compare_range "$testdir/file1" $blksz "$testdir/file2" $blksz 37 \
+_compare_range $testdir/file1 $blksz $testdir/file2 $blksz 37 \
        || echo "End sections of files 1-2 do not match"
 
-_compare_range "$testdir/file1" $blksz "$testdir/file3" $blksz 37 \
+_compare_range $testdir/file1 $blksz $testdir/file3 $blksz 37 \
        || echo "End sections of files 1-3 do not match"
 
-_compare_range "$testdir/file1" $blksz "$testdir/file4" $blksz 37 \
+_compare_range $testdir/file1 $blksz $testdir/file4 $blksz 37 \
        || echo "End sections of files 1-4 do not match (intentional)"
 
-_compare_range "$testdir/file2" $blksz "$testdir/file3" $blksz 37 \
+_compare_range $testdir/file2 $blksz $testdir/file3 $blksz 37 \
        || echo "End sections of files 2-3 do not match"
 
-_compare_range "$testdir/file2" $blksz "$testdir/file4" $blksz 37 \
+_compare_range $testdir/file2 $blksz $testdir/file4 $blksz 37 \
        || echo "End sections of files 2-4 do not match (intentional)"
 
-_compare_range "$testdir/file3" $blksz "$testdir/file4" $blksz 37 \
+_compare_range $testdir/file3 $blksz $testdir/file4 $blksz 37 \
        || echo "End sections of files 3-4 do not match (intentional)"
 
 # success, all done
index 6bd6b14490b4441263fbe0446734b55d2f716f8c..bc69fa7810477278ac13841f51942b9dbc496099 100755 (executable)
@@ -26,8 +26,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,48 +50,48 @@ _cleanup()
 _supported_os Linux
 _require_test_dedupe
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz + 37)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz + 37)) "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz + 37)) "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz + 37)) "$testdir/file4" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
 
 c1="$(_md5_checksum $testdir/file1)"
 c2="$(_md5_checksum $testdir/file2)"
 c3="$(_md5_checksum $testdir/file3)"
 c4="$(_md5_checksum $testdir/file4)"
 
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" = "${c4}" || echo "file3 and file4 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} = ${c4} || echo "file3 and file4 should match"
 
 echo "Dedupe the last blocks together"
 echo "1->2"
-_dedupe_range "$testdir/file1" $blksz "$testdir/file2" $blksz 37 >> "$seqres.full"
+_dedupe_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
 echo "1->3"
-_dedupe_range "$testdir/file1" $blksz "$testdir/file3" $blksz 37 >> "$seqres.full"
+_dedupe_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
 
 c1="$(_md5_checksum $testdir/file1)"
 c2="$(_md5_checksum $testdir/file2)"
@@ -99,30 +99,30 @@ c3="$(_md5_checksum $testdir/file3)"
 c4="$(_md5_checksum $testdir/file4)"
 
 echo "Compare files"
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" = "${c4}" || echo "file3 and file4 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} = ${c4} || echo "file3 and file4 should match"
 
 echo "Compare sections"
-_compare_range "$testdir/file1" $blksz "$testdir/file2" $blksz 37 \
+_compare_range $testdir/file1 $blksz $testdir/file2 $blksz 37 \
        || echo "End sections of files 1-2 do not match"
 
-_compare_range "$testdir/file1" $blksz "$testdir/file3" $blksz 37 \
+_compare_range $testdir/file1 $blksz $testdir/file3 $blksz 37 \
        || echo "End sections of files 1-3 do not match (intentional)"
 
-_compare_range "$testdir/file1" $blksz "$testdir/file4" $blksz 37 \
+_compare_range $testdir/file1 $blksz $testdir/file4 $blksz 37 \
        || echo "End sections of files 1-4 do not match (intentional)"
 
-_compare_range "$testdir/file2" $blksz "$testdir/file3" $blksz 37 \
+_compare_range $testdir/file2 $blksz $testdir/file3 $blksz 37 \
        || echo "End sections of files 2-3 do not match (intentional)"
 
-_compare_range "$testdir/file2" $blksz "$testdir/file4" $blksz 37 \
+_compare_range $testdir/file2 $blksz $testdir/file4 $blksz 37 \
        || echo "End sections of files 2-4 do not match (intentional)"
 
-_compare_range "$testdir/file3" $blksz "$testdir/file4" $blksz 37 \
+_compare_range $testdir/file3 $blksz $testdir/file4 $blksz 37 \
        || echo "End sections of files 3-4 do not match"
 
 # success, all done
index dcfd90db55322a4d871180179039705d7a1b0c91..19a7ab4cd146543b4530de675f7b0f1af1dc8e30 100755 (executable)
@@ -26,8 +26,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -52,57 +52,57 @@ _require_test_reflink
 _require_test_dedupe
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
 blksz=65536
-_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $((blksz * 2)) "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $blksz $((blksz * 2)) $testdir/file1 >> $seqres.full
 
 nr_blks=1024
 
 echo "fallocate half the file"
-"$XFS_IO_PROG" -f -c "falloc $((nr_blks * blksz / 2)) $((nr_blks * blksz / 2))" "$testdir/file1" >> "$seqres.full"
+$XFS_IO_PROG -f -c "falloc $((nr_blks * blksz / 2)) $((nr_blks * blksz / 2))" $testdir/file1 >> $seqres.full
 
 echo "Reflink block zero to the threes"
 seq 1 $((nr_blks / 3)) | while read nr; do
-       _reflink_range "$testdir/file1" 0 "$testdir/file1" $((nr * 3 * blksz)) \
-                       $blksz >> "$seqres.full"
+       _reflink_range $testdir/file1 0 $testdir/file1 $((nr * 3 * blksz)) \
+                       $blksz >> $seqres.full
 done
 
 echo "Reflink block one to the fives"
 seq 1 $((nr_blks / 5)) | while read nr; do
-       _reflink_range "$testdir/file1" $blksz "$testdir/file1" \
-                       $((nr * 5 * blksz)) $blksz >> "$seqres.full"
+       _reflink_range $testdir/file1 $blksz $testdir/file1 \
+                       $((nr * 5 * blksz)) $blksz >> $seqres.full
 done
 
 echo "Dedupe block two to the sevens"
 seq 1 $((nr_blks / 7)) | while read nr; do
-       _dedupe_range "$testdir/file1" $((blksz * 2)) "$testdir/file1" \
-                       $((nr * 7 * blksz)) $blksz >> "$seqres.full" 2>&1
+       _dedupe_range $testdir/file1 $((blksz * 2)) $testdir/file1 \
+                       $((nr * 7 * blksz)) $blksz >> $seqres.full 2>&1
 done
 
 _test_remount
 
 echo "Check block mappings"
-md5sum "$testdir/file1" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
 
 crcZ=$(_md5_range_checksum /dev/zero 0 $blksz)
-crc0=$(_md5_range_checksum "$testdir/file1" 0 $blksz)
-crc1=$(_md5_range_checksum "$testdir/file1" $blksz $blksz)
-crc2=$(_md5_range_checksum "$testdir/file1" $((blksz * 2)) $blksz)
+crc0=$(_md5_range_checksum $testdir/file1 0 $blksz)
+crc1=$(_md5_range_checksum $testdir/file1 $blksz $blksz)
+crc2=$(_md5_range_checksum $testdir/file1 $((blksz * 2)) $blksz)
 
 check_block() {
-       lblk="$1"
+       lblk=$1
        rem7=$((lblk % 7))
        rem5=$((lblk % 5))
        rem3=$((lblk % 3))
 
-       crc=$(_md5_range_checksum "$testdir/file1" $((lblk * blksz)) $blksz)
+       crc=$(_md5_range_checksum $testdir/file1 $((lblk * blksz)) $blksz)
 
        if [ $rem7 -eq 0 ]; then
                if [ $rem5 -eq 0 ]; then
index 59d23e9dc5d160aec1e2d5838c5731cb576bf507..c8b4255b95f908b78a2342731881d7e6435e1e5a 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,103 +48,103 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 48 - 3)) "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz * 48 - 3)) "$testdir/file3" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
 
-cmp -s "$testdir/file1" "$testdir/file2" || echo "Files 1-2 do not match"
-cmp -s "$testdir/file1" "$testdir/file3" || echo "Files 1-3 do not match"
-cmp -s "$testdir/file2" "$testdir/file3" || echo "Files 2-3 do not match"
+cmp -s $testdir/file1 $testdir/file2 || echo "Files 1-2 do not match"
+cmp -s $testdir/file1 $testdir/file3 || echo "Files 1-3 do not match"
+cmp -s $testdir/file2 $testdir/file3 || echo "Files 2-3 do not match"
 
 echo "pagecache CoW the second file"
-_pwrite_byte 0x62 0 17 "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x62 0 17 "$testdir/file3" >> "$seqres.full"
+_pwrite_byte 0x62 0 17 $testdir/file2 >> $seqres.full
+_pwrite_byte 0x62 0 17 $testdir/file3 >> $seqres.full
 
-_pwrite_byte 0x62 $((blksz * 16 - 34)) 17 "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 16 - 34)) 17 "$testdir/file3" >> "$seqres.full"
+_pwrite_byte 0x62 $((blksz * 16 - 34)) 17 $testdir/file2 >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 16 - 34)) 17 $testdir/file3 >> $seqres.full
 
-_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 "$testdir/file3" >> "$seqres.full"
+_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file2 >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file3 >> $seqres.full
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
 
-cmp -s "$testdir/file1" "$testdir/file2" || echo "Files 1-2 do not match (intentional)"
-cmp -s "$testdir/file1" "$testdir/file3" || echo "Files 1-3 do not match (intentional)"
-cmp -s "$testdir/file2" "$testdir/file3" || echo "Files 2-3 do not match"
+cmp -s $testdir/file1 $testdir/file2 || echo "Files 1-2 do not match (intentional)"
+cmp -s $testdir/file1 $testdir/file3 || echo "Files 1-3 do not match (intentional)"
+cmp -s $testdir/file2 $testdir/file3 || echo "Files 2-3 do not match"
 
 echo "Compare the CoW'd section to the before file"
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 17 \
+_compare_range $testdir/file1 0 $testdir/file2 0 17 \
        || echo "Start sections do not match (intentional)"
 
-_compare_range  "$testdir/file1" $((blksz * 16 - 34)) \
-               "$testdir/file2" $((blksz * 16 - 34)) 17 \
+_compare_range  $testdir/file1 $((blksz * 16 - 34)) \
+               $testdir/file2 $((blksz * 16 - 34)) 17 \
        || echo "Middle sections do not match (intentional)"
 
-_compare_range  "$testdir/file1" $((blksz * 48 - 8)) \
-               "$testdir/file2" $((blksz * 48 - 8)) 17 \
+_compare_range  $testdir/file1 $((blksz * 48 - 8)) \
+               $testdir/file2 $((blksz * 48 - 8)) 17 \
        || echo "End sections do not match (intentional)"
 
 echo "Compare the CoW'd section to the after file"
-_compare_range "$testdir/file2" 0 "$testdir/file3" 0 17 \
+_compare_range $testdir/file2 0 $testdir/file3 0 17 \
        || echo "Start sections do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 16 - 34)) \
-               "$testdir/file3" $((blksz * 16 - 34)) 17 \
+_compare_range  $testdir/file2 $((blksz * 16 - 34)) \
+               $testdir/file3 $((blksz * 16 - 34)) 17 \
        || echo "Middle sections do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 48 - 8)) \
-               "$testdir/file3" $((blksz * 48 - 8)) 17 \
+_compare_range  $testdir/file2 $((blksz * 48 - 8)) \
+               $testdir/file3 $((blksz * 48 - 8)) 17 \
        || echo "End sections do not match"
 
 echo "Compare the not CoW'd sections"
-_compare_range "$testdir/file1" 18 "$testdir/file2" 18 17 \
+_compare_range $testdir/file1 18 $testdir/file2 18 17 \
        || echo "Start sections of 1-2 do not match"
 
-_compare_range "$testdir/file2" 18 "$testdir/file3" 18 17 \
+_compare_range $testdir/file2 18 $testdir/file3 18 17 \
        || echo "Start sections of 2-3 do not match"
 
 
-_compare_range  "$testdir/file1" $((blksz * 16 - 17)) \
-               "$testdir/file2" $((blksz * 16 - 17)) 82 \
+_compare_range  $testdir/file1 $((blksz * 16 - 17)) \
+               $testdir/file2 $((blksz * 16 - 17)) 82 \
        || echo "Middle sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 16 - 17)) \
-               "$testdir/file3" $((blksz * 16 - 17)) 82 \
+_compare_range  $testdir/file2 $((blksz * 16 - 17)) \
+               $testdir/file3 $((blksz * 16 - 17)) 82 \
        || echo "Middle sections of 2-3 do not match"
 
-_compare_range  "$testdir/file1" $((blksz * 48 - 108)) \
-               "$testdir/file2" $((blksz * 48 - 108)) 100 \
+_compare_range  $testdir/file1 $((blksz * 48 - 108)) \
+               $testdir/file2 $((blksz * 48 - 108)) 100 \
        || echo "End sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 48 - 108)) \
-               "$testdir/file3" $((blksz * 48 - 108)) 100 \
+_compare_range  $testdir/file2 $((blksz * 48 - 108)) \
+               $testdir/file3 $((blksz * 48 - 108)) 100 \
        || echo "End sections of 2-3 do not match"
 
 
-_compare_range  "$testdir/file1" $((blksz * 14)) \
-               "$testdir/file2" $((blksz * 14)) $blksz \
+_compare_range  $testdir/file1 $((blksz * 14)) \
+               $testdir/file2 $((blksz * 14)) $blksz \
        || echo "Untouched sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 14)) \
-               "$testdir/file3" $((blksz * 14)) $blksz \
+_compare_range  $testdir/file2 $((blksz * 14)) \
+               $testdir/file3 $((blksz * 14)) $blksz \
        || echo "Untouched sections of 2-3 do not match"
 
 # success, all done
index 59e5bff6113c4ed570ed0da089bdad9287c81e32..5e7b63181f70ffd913aebc68e0dac49ad4c48e3b 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,7 +48,7 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 testdir=$TEST_DIR/test-$seq
 rm -rf $testdir
@@ -56,94 +56,94 @@ mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 48 - 3)) "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz * 48 - 3)) "$testdir/file3" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
 
-cmp -s "$testdir/file1" "$testdir/file2" || echo "Files 1-2 should match"
-cmp -s "$testdir/file1" "$testdir/file3" || echo "Files 1-3 should match"
-cmp -s "$testdir/file2" "$testdir/file3" || echo "Files 2-3 should match"
+cmp -s $testdir/file1 $testdir/file2 || echo "Files 1-2 should match"
+cmp -s $testdir/file1 $testdir/file3 || echo "Files 1-3 should match"
+cmp -s $testdir/file2 $testdir/file3 || echo "Files 2-3 should match"
 
 echo "directio CoW the second file"
-_pwrite_byte 0x62 0 $blksz "$testdir/file2" -d >> "$seqres.full"
-_pwrite_byte 0x62 0 $blksz "$testdir/file3" -d >> "$seqres.full"
+_pwrite_byte 0x62 0 $blksz $testdir/file2 -d >> $seqres.full
+_pwrite_byte 0x62 0 $blksz $testdir/file3 -d >> $seqres.full
 
-_pwrite_byte 0x62 $((blksz * 16 - 512)) 512 "$testdir/file2" -d >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 16 - 512)) 512 "$testdir/file3" -d >> "$seqres.full"
+_pwrite_byte 0x62 $((blksz * 16 - 512)) 512 $testdir/file2 -d >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 16 - 512)) 512 $testdir/file3 -d >> $seqres.full
 
-_pwrite_byte 0x62 $((blksz * 48)) $blksz "$testdir/file2" -d >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 48)) $blksz "$testdir/file3" -d >> "$seqres.full"
+_pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file2 -d >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file3 -d >> $seqres.full
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
 
-cmp -s "$testdir/file1" "$testdir/file2" || echo "Files 1-2 should not match (intentional)"
-cmp -s "$testdir/file1" "$testdir/file3" || echo "Files 1-3 should not match (intentional)"
-cmp -s "$testdir/file2" "$testdir/file3" || echo "Files 2-3 should match"
+cmp -s $testdir/file1 $testdir/file2 || echo "Files 1-2 should not match (intentional)"
+cmp -s $testdir/file1 $testdir/file3 || echo "Files 1-3 should not match (intentional)"
+cmp -s $testdir/file2 $testdir/file3 || echo "Files 2-3 should match"
 
 echo "Compare the CoW'd section to the before file"
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 $blksz \
+_compare_range $testdir/file1 0 $testdir/file2 0 $blksz \
        || echo "Start sections do not match (intentional)"
 
-_compare_range  "$testdir/file1" $((blksz * 16 - 512)) \
-               "$testdir/file2" $((blksz * 16 - 512)) 512 \
+_compare_range  $testdir/file1 $((blksz * 16 - 512)) \
+               $testdir/file2 $((blksz * 16 - 512)) 512 \
        || echo "Middle sections do not match (intentional)"
 
-_compare_range  "$testdir/file1" $((blksz * 48 - 512)) \
-               "$testdir/file2" $((blksz * 48 - 512)) $blksz \
+_compare_range  $testdir/file1 $((blksz * 48 - 512)) \
+               $testdir/file2 $((blksz * 48 - 512)) $blksz \
        || echo "End sections do not match (intentional)"
 
 echo "Compare the CoW'd section to the after file"
-_compare_range "$testdir/file2" 0 "$testdir/file3" 0 $blksz \
+_compare_range $testdir/file2 0 $testdir/file3 0 $blksz \
        || echo "Start sections do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 16 - 512)) \
-               "$testdir/file3" $((blksz * 16 - 512)) 512 \
+_compare_range  $testdir/file2 $((blksz * 16 - 512)) \
+               $testdir/file3 $((blksz * 16 - 512)) 512 \
        || echo "Middle sections do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 48 - 512)) \
-               "$testdir/file3" $((blksz * 48 - 512)) $blksz \
+_compare_range  $testdir/file2 $((blksz * 48 - 512)) \
+               $testdir/file3 $((blksz * 48 - 512)) $blksz \
        || echo "End sections do not match"
 
 echo "Compare the not CoW'd sections"
-_compare_range "$testdir/file1" $blksz "$testdir/file2" $blksz 512 \
+_compare_range $testdir/file1 $blksz $testdir/file2 $blksz 512 \
        || echo "Start sections of 1-2 do not match"
-_compare_range "$testdir/file2" $blksz "$testdir/file3" $blksz 512 \
+_compare_range $testdir/file2 $blksz $testdir/file3 $blksz 512 \
        || echo "Start sections of 2-3 do not match"
 
 
-_compare_range  "$testdir/file1" $((blksz * 16 - 1024)) \
-               "$testdir/file2" $((blksz * 16 - 1024)) 512 \
+_compare_range  $testdir/file1 $((blksz * 16 - 1024)) \
+               $testdir/file2 $((blksz * 16 - 1024)) 512 \
        || echo "Middle sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 16 - 1024)) \
-               "$testdir/file3" $((blksz * 16 - 1024)) 512 \
+_compare_range  $testdir/file2 $((blksz * 16 - 1024)) \
+               $testdir/file3 $((blksz * 16 - 1024)) 512 \
        || echo "Middle sections of 2-3 do not match"
 
-_compare_range  "$testdir/file1" $((blksz * 48 - 1024)) \
-               "$testdir/file2" $((blksz * 48 - 1024)) 512 \
+_compare_range  $testdir/file1 $((blksz * 48 - 1024)) \
+               $testdir/file2 $((blksz * 48 - 1024)) 512 \
        || echo "End sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 48 - 1024)) \
-               "$testdir/file3" $((blksz * 48 - 1024)) 512 \
+_compare_range  $testdir/file2 $((blksz * 48 - 1024)) \
+               $testdir/file3 $((blksz * 48 - 1024)) 512 \
        || echo "End sections of 2-3 do not match"
 
 
-_compare_range  "$testdir/file1" $((blksz * 16)) \
-               "$testdir/file2" $((blksz * 16)) 512 \
+_compare_range  $testdir/file1 $((blksz * 16)) \
+               $testdir/file2 $((blksz * 16)) 512 \
        || echo "Untouched sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 16)) \
-               "$testdir/file3" $((blksz * 16)) 512 \
+_compare_range  $testdir/file2 $((blksz * 16)) \
+               $testdir/file3 $((blksz * 16)) 512 \
        || echo "Untouched sections of 2-3 do not match"
 
 # success, all done
index e8e765589602fda2b03830f08d7ca740a072843f..5bcd4ef13da3dfff0f7d317103d323feb46f3612 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,103 +48,103 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 48 - 3)) "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz * 48 - 3)) "$testdir/file3" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
 
-cmp -s "$testdir/file1" "$testdir/file2" || echo "Files 1-2 do not match"
-cmp -s "$testdir/file1" "$testdir/file3" || echo "Files 1-3 do not match"
-cmp -s "$testdir/file2" "$testdir/file3" || echo "Files 2-3 do not match"
+cmp -s $testdir/file1 $testdir/file2 || echo "Files 1-2 do not match"
+cmp -s $testdir/file1 $testdir/file3 || echo "Files 1-3 do not match"
+cmp -s $testdir/file2 $testdir/file3 || echo "Files 2-3 do not match"
 
 echo "mmap CoW the second file"
-_mwrite_byte 0x62 0 17 $((blksz * 48 - 3)) "$testdir/file2" >> "$seqres.full"
-_mwrite_byte 0x62 0 17 $((blksz * 48 - 3)) "$testdir/file3" >> "$seqres.full"
+_mwrite_byte 0x62 0 17 $((blksz * 48 - 3)) $testdir/file2 >> $seqres.full
+_mwrite_byte 0x62 0 17 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
 
-_mwrite_byte 0x62 $((blksz * 16 - 34)) 17 $((blksz * 48 - 3)) "$testdir/file2" >> "$seqres.full"
-_mwrite_byte 0x62 $((blksz * 16 - 34)) 17 $((blksz * 48 - 3)) "$testdir/file3" >> "$seqres.full"
+_mwrite_byte 0x62 $((blksz * 16 - 34)) 17 $((blksz * 48 - 3)) $testdir/file2 >> $seqres.full
+_mwrite_byte 0x62 $((blksz * 16 - 34)) 17 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
 
-_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) "$testdir/file2" >> "$seqres.full"
-_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) "$testdir/file3" >> "$seqres.full"
+_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file2 >> $seqres.full
+_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
 
-cmp -s "$testdir/file1" "$testdir/file2" || echo "Files 1-2 do not match (intentional)"
-cmp -s "$testdir/file1" "$testdir/file3" || echo "Files 1-3 do not match (intentional)"
-cmp -s "$testdir/file2" "$testdir/file3" || echo "Files 2-3 do not match"
+cmp -s $testdir/file1 $testdir/file2 || echo "Files 1-2 do not match (intentional)"
+cmp -s $testdir/file1 $testdir/file3 || echo "Files 1-3 do not match (intentional)"
+cmp -s $testdir/file2 $testdir/file3 || echo "Files 2-3 do not match"
 
 echo "Compare the CoW'd section to the before file"
-_compare_range "$testdir/file1" 0 "$testdir/file2" 0 17 \
+_compare_range $testdir/file1 0 $testdir/file2 0 17 \
        || echo "Start sections do not match (intentional)"
 
-_compare_range  "$testdir/file1" $((blksz * 16 - 34)) \
-               "$testdir/file2" $((blksz * 16 - 34)) 17 \
+_compare_range  $testdir/file1 $((blksz * 16 - 34)) \
+               $testdir/file2 $((blksz * 16 - 34)) 17 \
        || echo "Middle sections do not match (intentional)"
 
-_compare_range  "$testdir/file1" $((blksz * 48 - 20)) \
-               "$testdir/file2" $((blksz * 48 - 20)) 17 \
+_compare_range  $testdir/file1 $((blksz * 48 - 20)) \
+               $testdir/file2 $((blksz * 48 - 20)) 17 \
        || echo "End sections do not match (intentional)"
 
 echo "Compare the CoW'd section to the after file"
-_compare_range "$testdir/file2" 0 "$testdir/file3" 0 17 \
+_compare_range $testdir/file2 0 $testdir/file3 0 17 \
        || echo "Start sections do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 16 - 34)) \
-               "$testdir/file3" $((blksz * 16 - 34)) 17 \
+_compare_range  $testdir/file2 $((blksz * 16 - 34)) \
+               $testdir/file3 $((blksz * 16 - 34)) 17 \
        || echo "Middle sections do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 48 - 20)) \
-               "$testdir/file3" $((blksz * 48 - 20)) 17 \
+_compare_range  $testdir/file2 $((blksz * 48 - 20)) \
+               $testdir/file3 $((blksz * 48 - 20)) 17 \
        || echo "End sections do not match"
 
 echo "Compare the not CoW'd sections"
-_compare_range "$testdir/file1" 18 "$testdir/file2" 18 17 \
+_compare_range $testdir/file1 18 $testdir/file2 18 17 \
        || echo "Start sections of 1-2 do not match"
 
-_compare_range "$testdir/file2" 18 "$testdir/file3" 18 17 \
+_compare_range $testdir/file2 18 $testdir/file3 18 17 \
        || echo "Start sections of 2-3 do not match"
 
 
-_compare_range  "$testdir/file1" $((blksz * 16 - 17)) \
-               "$testdir/file2" $((blksz * 16 - 17)) 82 \
+_compare_range  $testdir/file1 $((blksz * 16 - 17)) \
+               $testdir/file2 $((blksz * 16 - 17)) 82 \
        || echo "Middle sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 16 - 17)) \
-               "$testdir/file3" $((blksz * 16 - 17)) 82 \
+_compare_range  $testdir/file2 $((blksz * 16 - 17)) \
+               $testdir/file3 $((blksz * 16 - 17)) 82 \
        || echo "Middle sections of 2-3 do not match"
 
-_compare_range  "$testdir/file1" $((blksz * 48 - 120)) \
-               "$testdir/file2" $((blksz * 48 - 120)) 100 \
+_compare_range  $testdir/file1 $((blksz * 48 - 120)) \
+               $testdir/file2 $((blksz * 48 - 120)) 100 \
        || echo "End sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 48 - 120)) \
-               "$testdir/file3" $((blksz * 48 - 120)) 100 \
+_compare_range  $testdir/file2 $((blksz * 48 - 120)) \
+               $testdir/file3 $((blksz * 48 - 120)) 100 \
        || echo "End sections of 2-3 do not match"
 
 
-_compare_range  "$testdir/file1" $((blksz * 14)) \
-               "$testdir/file2" $((blksz * 14)) $blksz \
+_compare_range  $testdir/file1 $((blksz * 14)) \
+               $testdir/file2 $((blksz * 14)) $blksz \
        || echo "Untouched sections of 1-2 do not match"
 
-_compare_range  "$testdir/file2" $((blksz * 14)) \
-               "$testdir/file3" $((blksz * 14)) $blksz \
+_compare_range  $testdir/file2 $((blksz * 14)) \
+               $testdir/file3 $((blksz * 14)) $blksz \
        || echo "Untouched sections of 2-3 do not match"
 
 # success, all done
index 2ac4d10a484c16f174da527d3da7c5e0e24748fe..e9a2d5e32f7a770c9d7e4c134b3c2670666c2138 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,41 +50,42 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
 blksz=65536
 nr=9
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-csum="$(_md5_checksum "$testdir/file1")"
+md5sum $testdir/file1 | _filter_test_dir
+csum=$(_md5_checksum $testdir/file1)
 
 echo "Create the reflink copies"
 seq 2 $nr | while read i; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
 
 echo "Rewrite the copies"
 seq 2 $nr | while read i; do
-       _pwrite_byte 0x62 0 $((blksz * 256)) "$testdir/file$i" >> "$seqres.full"
+       _pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i >> $seqres.full
 done
 _test_remount
 
 echo "Examine original file"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-mod_csum="$(_md5_checksum "$testdir/file2")"
-new_csum="$(_md5_checksum "$testdir/file1")"
-test "${csum}" != "${mod_csum}" || echo "checksums do not match"
-test "${csum}" = "${new_csum}" || echo "checksums do not match"
+mod_csum=$(_md5_checksum $testdir/file2)
+new_csum=$(_md5_checksum $testdir/file1)
+test ${csum} != ${mod_csum} || echo "checksums do not match"
+test ${csum} = ${new_csum} || echo "checksums do not match"
 
 # success, all done
 status=0
index c0bc6722c499ca437baaf915bf132787ba955d18..586cf5c10c7be96b7acfc6671a96e357fffe9e7b 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,41 +50,42 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
 blksz=65536
 nr=9
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-csum="$(_md5_checksum "$testdir/file1")"
+md5sum $testdir/file1 | _filter_test_dir
+csum=$(_md5_checksum $testdir/file1)
 
 echo "Create the reflink copies"
 seq 2 $nr | while read i; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
 
 echo "Rewrite the copies"
 seq 2 $nr | while read i; do
-       _pwrite_byte 0x62 0 $((blksz * 256)) "$testdir/file$i" -d >> "$seqres.full"
+       _pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i -d >> $seqres.full
 done
 _test_remount
 
 echo "Examine original file"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
-mod_csum="$(_md5_checksum "$testdir/file2")"
-new_csum="$(_md5_checksum "$testdir/file1")"
-test "${csum}" != "${mod_csum}" || echo "checksums do not match"
-test "${csum}" = "${new_csum}" || echo "checksums do not match"
+mod_csum=$(_md5_checksum $testdir/file2)
+new_csum=$(_md5_checksum $testdir/file1)
+test ${csum} != ${mod_csum} || echo "checksums do not match"
+test ${csum} = ${new_csum} || echo "checksums do not match"
 
 # success, all done
 status=0
index 631fa33ff029d2dac34e2bc6f91ba3a16658440c..71020abd69d95c153d44c62fb7bb9d8740ce2acd 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,92 +50,92 @@ _require_cp_reflink
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "truncate"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 5 + 37)) "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 5 + 37)) $testdir/file1 >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $blksz \
-               $((blksz * 4 + 37)) >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $blksz \
+               $((blksz * 4 + 37)) >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $((blksz * 5 + 37))" "$testdir/file3" >> "$seqres.full"
-_reflink_range "$testdir/file1" 0 "$testdir/file3" 0 $blksz >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $((blksz * 5 + 37))" $testdir/file3 >> $seqres.full
+_reflink_range $testdir/file1 0 $testdir/file3 0 $blksz >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $((blksz * 5 + 37))" "$testdir/file4" >> "$seqres.full"
-_reflink_range "$testdir/file1" $blksz "$testdir/file4" $blksz $blksz >> "$seqres.full"
-_reflink_range "$testdir/file1" $((blksz * 3)) "$testdir/file4" $((blksz * 3)) \
-               $blksz >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $((blksz * 5 + 37))" $testdir/file4 >> $seqres.full
+_reflink_range $testdir/file1 $blksz $testdir/file4 $blksz $blksz >> $seqres.full
+_reflink_range $testdir/file1 $((blksz * 3)) $testdir/file4 $((blksz * 3)) \
+               $blksz >> $seqres.full
 
-_cp_reflink "$testdir/file1" "$testdir/file5"
+_cp_reflink $testdir/file1 $testdir/file5
 _test_remount
 
 echo "Compare sections"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file5" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file5 | _filter_test_dir
 
-_compare_range "$testdir/file1" $blksz "$testdir/file2" $blksz \
+_compare_range $testdir/file1 $blksz $testdir/file2 $blksz \
                $((blksz * 4 + 37)) \
        || echo "shared parts of files 1-2 changed"
 
-_compare_range "$testdir/file1" 0 "$testdir/file3" 0 $blksz \
+_compare_range $testdir/file1 0 $testdir/file3 0 $blksz \
        || echo "shared parts of files 1-3 changed"
 
-_compare_range "$testdir/file1" $blksz "$testdir/file4" $blksz $blksz \
+_compare_range $testdir/file1 $blksz $testdir/file4 $blksz $blksz \
        || echo "shared parts of files 1-4 changed"
 
-_compare_range "$testdir/file1" 0 "$testdir/file5" 0 $((blksz * 5 + 37)) \
+_compare_range $testdir/file1 0 $testdir/file5 0 $((blksz * 5 + 37)) \
        || echo "shared parts of files 1-5 changed"
 
 echo "Compare files"
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-c5="$(_md5_checksum "$testdir/file5")"
-
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c1}"  = "${c5}" || echo "file1 and file5 should match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c2}" != "${c5}" || echo "file2 and file5 should not match"
-test "${c3}" != "${c4}" || echo "file3 and file4 should not match"
-test "${c3}" != "${c5}" || echo "file3 and file5 should not match"
-test "${c4}" != "${c5}" || echo "file4 and file5 should not match"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+c5=$(_md5_checksum $testdir/file5)
+
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c1}  = ${c5} || echo "file1 and file5 should match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c2} != ${c5} || echo "file2 and file5 should not match"
+test ${c3} != ${c4} || echo "file3 and file4 should not match"
+test ${c3} != ${c5} || echo "file3 and file5 should not match"
+test ${c4} != ${c5} || echo "file4 and file5 should not match"
 
 echo "falloc everything"
-"$XFS_IO_PROG" -f -c "falloc 0 $((blksz * 5))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "falloc 0 $((blksz * 5))" "$testdir/file3" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "falloc 0 $((blksz * 5))" "$testdir/file4" >> "$seqres.full"
+$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file3 >> $seqres.full
+$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file4 >> $seqres.full
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file5" | _filter_test_dir
-
-d1="$(_md5_checksum "$testdir/file1")"
-d2="$(_md5_checksum "$testdir/file2")"
-d3="$(_md5_checksum "$testdir/file3")"
-d4="$(_md5_checksum "$testdir/file4")"
-d5="$(_md5_checksum "$testdir/file5")"
-
-test "${c1}" = "${d1}" || echo "file1 should not change"
-test "${c2}" = "${d2}" || echo "file2 should not change"
-test "${c3}" = "${d3}" || echo "file3 should not change"
-test "${c4}" = "${d4}" || echo "file4 should not change"
-test "${c5}" = "${d5}" || echo "file2 should not change"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file5 | _filter_test_dir
+
+d1=$(_md5_checksum $testdir/file1)
+d2=$(_md5_checksum $testdir/file2)
+d3=$(_md5_checksum $testdir/file3)
+d4=$(_md5_checksum $testdir/file4)
+d5=$(_md5_checksum $testdir/file5)
+
+test ${c1} = ${d1} || echo "file1 should not change"
+test ${c2} = ${d2} || echo "file2 should not change"
+test ${c3} = ${d3} || echo "file3 should not change"
+test ${c4} = ${d4} || echo "file4 should not change"
+test ${c5} = ${d5} || echo "file2 should not change"
 
 # success, all done
 status=0
index 2b8d74f690515e496e828915b01e5c33983ac56d..dac2b272acc88b6aab7bd86609d8a1877905ee7d 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -51,91 +51,91 @@ _require_cp_reflink
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "fcollapse"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file1" >> "$seqres.full"
-
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_cp_reflink "$testdir/file1" "$testdir/file3"
-_cp_reflink "$testdir/file1" "$testdir/file4"
-
-"$XFS_IO_PROG" -f -c "falloc 0 $((blksz * 4))" "$testdir/file1"
-"$XFS_IO_PROG" -f -c "falloc 0 $((blksz * 4))" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "falloc 0 $((blksz * 4))" "$testdir/file3"
-"$XFS_IO_PROG" -f -c "falloc 0 $((blksz * 4))" "$testdir/file4"
-
-_pwrite_byte 0x62 0 $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
-
-_pwrite_byte 0x61 0 $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $blksz $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 2)) $blksz "$testdir/file3.chk" >> "$seqres.full"
-
-_pwrite_byte 0x61 0 $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 2)) $blksz "$testdir/file4.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file1 >> $seqres.full
+
+_cp_reflink $testdir/file1 $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file3
+_cp_reflink $testdir/file1 $testdir/file4
+
+$XFS_IO_PROG -f -c "falloc 0 $((blksz * 4))" $testdir/file1
+$XFS_IO_PROG -f -c "falloc 0 $((blksz * 4))" $testdir/file2
+$XFS_IO_PROG -f -c "falloc 0 $((blksz * 4))" $testdir/file3
+$XFS_IO_PROG -f -c "falloc 0 $((blksz * 4))" $testdir/file4
+
+_pwrite_byte 0x62 0 $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x63 $blksz $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
+
+_pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x63 $blksz $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
+
+_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" = "${c3}" || echo "file1 and file3 should match"
-test "${c1}" = "${c4}" || echo "file1 and file4 should match"
-test "${c2}" = "${c3}" || echo "file2 and file3 should match"
-test "${c2}" = "${c4}" || echo "file2 and file4 should match"
-test "${c3}" = "${c4}" || echo "file3 and file4 should match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} = ${c3} || echo "file1 and file3 should match"
+test ${c1} = ${c4} || echo "file1 and file4 should match"
+test ${c2} = ${c3} || echo "file2 and file3 should match"
+test ${c2} = ${c4} || echo "file2 and file4 should match"
+test ${c3} = ${c4} || echo "file3 and file4 should match"
 
 echo "fcollapse files"
-"$XFS_IO_PROG" -f -c "fcollapse 0 $blksz" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "fcollapse $blksz $blksz" "$testdir/file3"
-"$XFS_IO_PROG" -f -c "fcollapse $((blksz * 2)) $blksz" "$testdir/file4"
+$XFS_IO_PROG -f -c "fcollapse 0 $blksz" $testdir/file2
+$XFS_IO_PROG -f -c "fcollapse $blksz $blksz" $testdir/file3
+$XFS_IO_PROG -f -c "fcollapse $((blksz * 2)) $blksz" $testdir/file4
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" != "${c4}" || echo "file3 and file4 should not match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} != ${c4} || echo "file3 and file4 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
-cmp -s "$testdir/file3" "$testdir/file3.chk" || echo "file3 and file3.chk do not match"
-cmp -s "$testdir/file4" "$testdir/file4.chk" || echo "file4 and file4.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file3 $testdir/file3.chk || echo "file3 and file3.chk do not match"
+cmp -s $testdir/file4 $testdir/file4.chk || echo "file4 and file4.chk do not match"
 
 # success, all done
 status=0
index 17dc30609eed3deefeedd5b497419cd6c390358f..98f06210ce53198b838f21a933c50f045b2463ee 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,86 +50,86 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fpunch"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file1 >> $seqres.full
 
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_cp_reflink "$testdir/file1" "$testdir/file3"
-_cp_reflink "$testdir/file1" "$testdir/file4"
+_cp_reflink $testdir/file1 $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file3
+_cp_reflink $testdir/file1 $testdir/file4
 
-_pwrite_byte 0x00 0 $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x00 0 $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 0 $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $blksz $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x00 $blksz $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
 
-_pwrite_byte 0x61 0 $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 2)) $blksz "$testdir/file4.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" = "${c3}" || echo "file1 and file3 should match"
-test "${c1}" = "${c4}" || echo "file1 and file4 should match"
-test "${c2}" = "${c3}" || echo "file2 and file3 should match"
-test "${c2}" = "${c4}" || echo "file2 and file4 should match"
-test "${c3}" = "${c4}" || echo "file3 and file4 should match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} = ${c3} || echo "file1 and file3 should match"
+test ${c1} = ${c4} || echo "file1 and file4 should match"
+test ${c2} = ${c3} || echo "file2 and file3 should match"
+test ${c2} = ${c4} || echo "file2 and file4 should match"
+test ${c3} = ${c4} || echo "file3 and file4 should match"
 
 echo "fpunch files"
-"$XFS_IO_PROG" -f -c "fpunch 0 $blksz" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "fpunch $blksz $blksz" "$testdir/file3"
-"$XFS_IO_PROG" -f -c "fpunch $((blksz * 2)) $blksz" "$testdir/file4"
+$XFS_IO_PROG -f -c "fpunch 0 $blksz" $testdir/file2
+$XFS_IO_PROG -f -c "fpunch $blksz $blksz" $testdir/file3
+$XFS_IO_PROG -f -c "fpunch $((blksz * 2)) $blksz" $testdir/file4
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" != "${c4}" || echo "file3 and file4 should not match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} != ${c4} || echo "file3 and file4 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
-cmp -s "$testdir/file3" "$testdir/file3.chk" || echo "file3 and file3.chk do not match"
-cmp -s "$testdir/file4" "$testdir/file4.chk" || echo "file4 and file4.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file3 $testdir/file3.chk || echo "file3 and file3.chk do not match"
+cmp -s $testdir/file4 $testdir/file4.chk || echo "file4 and file4.chk do not match"
 
 # success, all done
 status=0
index b1601314dc046391372d92839f8a49ef9d615526..8706f83b8e97d12af81574d8f0adf397ffda6eb1 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,89 +50,89 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "finsert"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file1" >> "$seqres.full"
-
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_cp_reflink "$testdir/file1" "$testdir/file3"
-_cp_reflink "$testdir/file1" "$testdir/file4"
-
-_pwrite_byte 0x00 0 $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 3)) $blksz "$testdir/file2.chk" >> "$seqres.full"
-
-_pwrite_byte 0x61 0 $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $blksz $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $((blksz * 2)) $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 3)) $blksz "$testdir/file3.chk" >> "$seqres.full"
-
-_pwrite_byte 0x61 0 $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 2)) $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 3)) $blksz "$testdir/file4.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file1 >> $seqres.full
+
+_cp_reflink $testdir/file1 $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file3
+_cp_reflink $testdir/file1 $testdir/file4
+
+_pwrite_byte 0x00 0 $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
+
+_pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x00 $blksz $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x62 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 3)) $blksz $testdir/file3.chk >> $seqres.full
+
+_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 3)) $blksz $testdir/file4.chk >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" = "${c3}" || echo "file1 and file3 should match"
-test "${c1}" = "${c4}" || echo "file1 and file4 should match"
-test "${c2}" = "${c3}" || echo "file2 and file3 should match"
-test "${c2}" = "${c4}" || echo "file2 and file4 should match"
-test "${c3}" = "${c4}" || echo "file3 and file4 should match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} = ${c3} || echo "file1 and file3 should match"
+test ${c1} = ${c4} || echo "file1 and file4 should match"
+test ${c2} = ${c3} || echo "file2 and file3 should match"
+test ${c2} = ${c4} || echo "file2 and file4 should match"
+test ${c3} = ${c4} || echo "file3 and file4 should match"
 
 echo "finsert files"
-"$XFS_IO_PROG" -f -c "finsert 0 $blksz" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "finsert $blksz $blksz" "$testdir/file3"
-"$XFS_IO_PROG" -f -c "finsert $((blksz * 2)) $blksz" "$testdir/file4"
+$XFS_IO_PROG -f -c "finsert 0 $blksz" $testdir/file2
+$XFS_IO_PROG -f -c "finsert $blksz $blksz" $testdir/file3
+$XFS_IO_PROG -f -c "finsert $((blksz * 2)) $blksz" $testdir/file4
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" != "${c4}" || echo "file3 and file4 should not match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} != ${c4} || echo "file3 and file4 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
-cmp -s "$testdir/file3" "$testdir/file3.chk" || echo "file3 and file3.chk do not match"
-cmp -s "$testdir/file4" "$testdir/file4.chk" || echo "file4 and file4.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file3 $testdir/file3.chk || echo "file3 and file3.chk do not match"
+cmp -s $testdir/file4 $testdir/file4.chk || echo "file4 and file4.chk do not match"
 
 # success, all done
 status=0
index cf5567bcbeb1bfe6a4fa8e4861b5a80e58fd8ba4..af60ab8e50ecda28139bf915d55b061b8e690638 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -51,65 +51,65 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "truncate"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz 37 "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $blksz 37 $testdir/file1 >> $seqres.full
 
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_cp_reflink "$testdir/file1" "$testdir/file3"
+_cp_reflink $testdir/file1 $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file3
 
-_pwrite_byte 0x61 0 $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz 34 "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz 34 $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 0 $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz 37 "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz + 37)) 3 "$testdir/file3.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz 37 $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz + 37)) 3 $testdir/file3.chk >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
 
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" = "${c3}" || echo "file1 and file3 should match"
-test "${c2}" = "${c3}" || echo "file2 and file3 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} = ${c3} || echo "file1 and file3 should match"
+test ${c2} = ${c3} || echo "file2 and file3 should match"
 
 echo "truncate files"
-"$XFS_IO_PROG" -f -c "truncate $((blksz + 34))" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "truncate $((blksz + 40))" "$testdir/file3"
+$XFS_IO_PROG -f -c "truncate $((blksz + 34))" $testdir/file2
+$XFS_IO_PROG -f -c "truncate $((blksz + 40))" $testdir/file3
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
 
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
-cmp -s "$testdir/file3" "$testdir/file3.chk" || echo "file3 and file3.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file3 $testdir/file3.chk || echo "file3 and file3.chk do not match"
 
 # success, all done
 status=0
index 7d3189e50e178c62b977a2b621f0c7ee76ea385e..b5f9f4a07add83a5864043fc1b6b9e15b20e118b 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,86 +50,86 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fzero"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file1 >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file1 >> $seqres.full
 
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_cp_reflink "$testdir/file1" "$testdir/file3"
-_cp_reflink "$testdir/file1" "$testdir/file4"
+_cp_reflink $testdir/file1 $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file3
+_cp_reflink $testdir/file1 $testdir/file4
 
-_pwrite_byte 0x00 0 $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x00 0 $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 0 $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $blksz $blksz "$testdir/file3.chk" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * 2)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x00 $blksz $blksz $testdir/file3.chk >> $seqres.full
+_pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
 
-_pwrite_byte 0x61 0 $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file4.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 2)) $blksz "$testdir/file4.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
-test "${c1}" = "${c3}" || echo "file1 and file3 should match"
-test "${c1}" = "${c4}" || echo "file1 and file4 should match"
-test "${c2}" = "${c3}" || echo "file2 and file3 should match"
-test "${c2}" = "${c4}" || echo "file2 and file4 should match"
-test "${c3}" = "${c4}" || echo "file3 and file4 should match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} = ${c2} || echo "file1 and file2 should match"
+test ${c1} = ${c3} || echo "file1 and file3 should match"
+test ${c1} = ${c4} || echo "file1 and file4 should match"
+test ${c2} = ${c3} || echo "file2 and file3 should match"
+test ${c2} = ${c4} || echo "file2 and file4 should match"
+test ${c3} = ${c4} || echo "file3 and file4 should match"
 
 echo "fzero files"
-"$XFS_IO_PROG" -f -c "fzero 0 $blksz" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "fzero $blksz $blksz" "$testdir/file3"
-"$XFS_IO_PROG" -f -c "fzero $((blksz * 2)) $blksz" "$testdir/file4"
+$XFS_IO_PROG -f -c "fzero 0 $blksz" $testdir/file2
+$XFS_IO_PROG -f -c "fzero $blksz $blksz" $testdir/file3
+$XFS_IO_PROG -f -c "fzero $((blksz * 2)) $blksz" $testdir/file4
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file3" | _filter_test_dir
-md5sum "$testdir/file4" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
-md5sum "$testdir/file3.chk" | _filter_test_dir
-md5sum "$testdir/file4.chk" | _filter_test_dir
-
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
-c3="$(_md5_checksum "$testdir/file3")"
-c4="$(_md5_checksum "$testdir/file4")"
-
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
-test "${c1}" != "${c3}" || echo "file1 and file3 should not match"
-test "${c1}" != "${c4}" || echo "file1 and file4 should not match"
-test "${c2}" != "${c3}" || echo "file2 and file3 should not match"
-test "${c2}" != "${c4}" || echo "file2 and file4 should not match"
-test "${c3}" != "${c4}" || echo "file3 and file4 should not match"
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file3 | _filter_test_dir
+md5sum $testdir/file4 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
+md5sum $testdir/file3.chk | _filter_test_dir
+md5sum $testdir/file4.chk | _filter_test_dir
+
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
+c3=$(_md5_checksum $testdir/file3)
+c4=$(_md5_checksum $testdir/file4)
+
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
+test ${c1} != ${c3} || echo "file1 and file3 should not match"
+test ${c1} != ${c4} || echo "file1 and file4 should not match"
+test ${c2} != ${c3} || echo "file2 and file3 should not match"
+test ${c2} != ${c4} || echo "file2 and file4 should not match"
+test ${c3} != ${c4} || echo "file3 and file4 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
-cmp -s "$testdir/file3" "$testdir/file3.chk" || echo "file3 and file3.chk do not match"
-cmp -s "$testdir/file4" "$testdir/file4.chk" || echo "file4 and file4.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file3 $testdir/file3.chk || echo "file3 and file3.chk do not match"
+cmp -s $testdir/file4 $testdir/file4.chk || echo "file4 and file4.chk do not match"
 
 # success, all done
 status=0
index 90ac46b7cb459b45c43d6c2560d36e49d41cb597..88814b1d2efa449d2e76fd6090e3316aec0a7094 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,11 +48,11 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
 blksz="$(stat -f $testdir -c '%S')"
@@ -60,16 +60,17 @@ blks=2000
 margin='15%'
 sz=$((blksz * blks))
 nr=7
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 sync
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file.$i"
+       _cp_reflink $testdir/file1 $testdir/file.$i
 done
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
 _within_tolerance "free blocks after reflink" $free_blocks1 $free_blocks0 $margin -v
 
index c67a12cd2b8892462078e02e09a406d4caafb093..207378c69b6c6d9c0aacd07400dd6581f0988005 100755 (executable)
@@ -27,8 +27,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -52,39 +52,40 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 blks=2000
 margin='15%'
 sz=$((blksz * blks))
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 nr=7
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 sync
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file.$i"
+       _cp_reflink $testdir/file1 $testdir/file.$i
 done
-_cp_reflink "$testdir/file1" "$testdir/survivor"
+_cp_reflink $testdir/file1 $testdir/survivor
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Delete most of the files"
-rm -rf "$testdir"/file*
+rm -rf $testdir/file*
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Delete all the files"
-rm -rf "$testdir"/*
+rm -rf $testdir/*
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
 
 _within_tolerance "free blocks after reflink" $free_blocks1 $((free_blocks0 - blks)) $margin -v
index cdb2bf983db1ade8c002e0ceac11583e940ea43b..b221f8f1162d5cf0c7a15298a90b8144446078dd 100755 (executable)
@@ -27,8 +27,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -53,43 +53,44 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fpunch"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 blks=2000
 margin='15%'
 sz=$((blksz * blks))
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 sync
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Punch most of the blocks"
-"$XFS_IO_PROG" -f -c "fpunch 0 $sz" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "fpunch 0 $((sz / 2))" "$testdir/file3"
-"$XFS_IO_PROG" -f -c "fpunch $((sz / 2)) $((sz / 2))" "$testdir/file4"
+$XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file2
+$XFS_IO_PROG -f -c "fpunch 0 $((sz / 2))" $testdir/file3
+$XFS_IO_PROG -f -c "fpunch $((sz / 2)) $((sz / 2))" $testdir/file4
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Punch all the files"
 for i in `seq 2 $nr`; do
-       "$XFS_IO_PROG" -f -c "fpunch 0 $sz" "$testdir/file$i"
+       $XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file$i
 done
-"$XFS_IO_PROG" -f -c "fpunch 0 $sz" "$testdir/file1"
+$XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file1
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
 
 _within_tolerance "free blocks after reflink" $free_blocks1 $((free_blocks0 - blks)) $margin -v
index b2f4022f4923a068b2ce7689c3bbac464ff5ae87..550aa95c18c3e179a8876beceb49793e9db078ed 100755 (executable)
@@ -27,8 +27,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -53,42 +53,43 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fcollapse"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 blks=2000
 margin='15%'
 sz=$((blksz * blks))
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Collapse most of the blocks"
-"$XFS_IO_PROG" -f -c "fcollapse 0 $(((blks - 1) * blksz))" $testdir/file2
-"$XFS_IO_PROG" -f -c "fcollapse 0 $((sz / 2))" $testdir/file3
-"$XFS_IO_PROG" -f -c "fcollapse $((sz / 2)) $(( ((blks / 2) - 1) * blksz))" $testdir/file4
+$XFS_IO_PROG -f -c "fcollapse 0 $(((blks - 1) * blksz))" $testdir/file2
+$XFS_IO_PROG -f -c "fcollapse 0 $((sz / 2))" $testdir/file3
+$XFS_IO_PROG -f -c "fcollapse $((sz / 2)) $(( ((blks / 2) - 1) * blksz))" $testdir/file4
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Collpase nearly all the files"
-"$XFS_IO_PROG" -f -c "fcollapse 0 $(( ((blks / 2) - 1) * blksz))" $testdir/file3
-"$XFS_IO_PROG" -f -c "fcollapse 0 $((sz / 2))" $testdir/file4
-"$XFS_IO_PROG" -f -c "fcollapse 0 $(( (blks - 1) * blksz))" $testdir/file1
+$XFS_IO_PROG -f -c "fcollapse 0 $(( ((blks / 2) - 1) * blksz))" $testdir/file3
+$XFS_IO_PROG -f -c "fcollapse 0 $((sz / 2))" $testdir/file4
+$XFS_IO_PROG -f -c "fcollapse 0 $(( (blks - 1) * blksz))" $testdir/file1
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
 
 _within_tolerance "free blocks after reflink" $free_blocks1 $((free_blocks0 - blks)) $margin -v
index 579f78bfe9a6b446a03f0cf9b39c845be1e1c797..c0c31425c68846593a89cc71c9d8c5a1a7f8da92 100755 (executable)
@@ -28,7 +28,7 @@
 #-----------------------------------------------------------------------
 
 seq=`basename $0`
-seqres="$RESULT_DIR/$seq"
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -52,47 +52,48 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 blks=2000
 margin='15%'
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
+filesize=$((blksz * nr))
 sz=$((blks * blksz))
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Rewrite some of the blocks"
-_pwrite_byte 0x62 0 $sz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x63 0 $((sz / 2)) "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x64 $((sz / 2)) $((sz / 2)) "$testdir/file4" >> "$seqres.full"
+_pwrite_byte 0x62 0 $sz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x63 0 $((sz / 2)) $testdir/file3 >> $seqres.full
+_pwrite_byte 0x64 $((sz / 2)) $((sz / 2)) $testdir/file4 >> $seqres.full
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Rewrite all the files"
-_pwrite_byte 0x62 0 $sz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x63 0 $sz "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x64 0 $sz "$testdir/file4" >> "$seqres.full"
+_pwrite_byte 0x62 0 $sz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x63 0 $sz $testdir/file3 >> $seqres.full
+_pwrite_byte 0x64 0 $sz $testdir/file4 >> $seqres.full
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 
 echo "Rewrite the original file"
-_pwrite_byte 0x65 0 $sz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
-free_blocks4=$(stat -f "$testdir" -c '%f')
+free_blocks4=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
 
 _within_tolerance "free blocks after reflinking" $free_blocks1 $((free_blocks0 - blks)) $margin -v
index 56d2912869c6b7f7bf1ecfaaa0204cd85f874b4d..c6416a1d9a1d650c30e73449e2cbc080eac4b370 100755 (executable)
@@ -30,8 +30,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -56,47 +56,48 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fzero"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 testdir=$TEST_DIR/test-$seq
 rm -rf $testdir
 mkdir $testdir
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 blks=2000
 margin='15%'
 sz=$((blksz * blks))
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Rewrite some of the blocks"
-"$XFS_IO_PROG" -f -c "fzero 0 $sz" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x63 0 $((sz / 2)) "$testdir/file3" -d >> "$seqres.full"
-_mwrite_byte 0x64 $((sz / 2)) $((sz / 2)) $sz "$testdir/file4" >> "$seqres.full"
+$XFS_IO_PROG -f -c "fzero 0 $sz" $testdir/file2 >> $seqres.full
+_pwrite_byte 0x63 0 $((sz / 2)) $testdir/file3 -d >> $seqres.full
+_mwrite_byte 0x64 $((sz / 2)) $((sz / 2)) $sz $testdir/file4 >> $seqres.full
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Rewrite all the files"
-_pwrite_byte 0x62 0 $sz "$testdir/file2" -d >> "$seqres.full"
-_mwrite_byte 0x63 0 $sz $sz "$testdir/file3" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "fzero 0 $sz" $testdir/file4 >> "$seqres.full"
+_pwrite_byte 0x62 0 $sz $testdir/file2 -d >> $seqres.full
+_mwrite_byte 0x63 0 $sz $sz $testdir/file3 >> $seqres.full
+$XFS_IO_PROG -f -c "fzero 0 $sz" $testdir/file4 >> $seqres.full
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 
 echo "Rewrite the original file"
-_pwrite_byte 0x65 0 $sz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
-free_blocks4=$(stat -f "$testdir" -c '%f')
+free_blocks4=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
 
 _within_tolerance "free blocks after reflinking" $free_blocks1 $((free_blocks0 - blks)) $margin -v
index 9fea9886f68e88725736153e326ae6f65ffbaddf..de2d9b1bcbaeb238edd25d6743f245206f8c7645 100755 (executable)
@@ -33,8 +33,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -45,7 +45,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -64,49 +64,50 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 blks=2000
 margin='15%'
 sz=$((blksz * blks))
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "funshare part of a file"
-"$XFS_IO_PROG" -f -c "falloc 0 $((sz / 2))" "$testdir/file2"
+$XFS_IO_PROG -f -c "falloc 0 $((sz / 2))" $testdir/file2
 _test_remount
 
 echo "funshare some of the copies"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file3"
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file2
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file3
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "funshare the rest of the files"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file4"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file1"
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file4
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file1
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 
 echo "Rewrite the original file"
-_pwrite_byte 0x65 0 $sz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
-free_blocks4=$(stat -f "$testdir" -c '%f')
+free_blocks4=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
 
 _within_tolerance "free blocks after reflinking" $free_blocks1 $((free_blocks0 - blks)) $margin -v
index 19a9a189b0ead903951030ef414a6a7f0cf41b3e..fe294c88f2b08a918a92559dbd2b6bcf3b1282ee 100755 (executable)
@@ -20,8 +20,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -46,19 +46,18 @@ _supported_os Linux
 _require_test_reflink
 _require_scratch_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
 testdir1="$TEST_DIR/test-$seq"
-rm -rf "$testdir1"
-mkdir "$testdir1"
+rm -rf $testdir1
+mkdir $testdir1
 
 testdir2=$SCRATCH_MNT/test-$seq
-rm -rf "$testdir2"
-mkdir "$testdir2"
+mkdir $testdir2
 
 echo "Create the original files"
 blksz="$(stat -f $testdir1 -c '%S')"
@@ -67,16 +66,17 @@ margin='7%'
 sz=$((blksz * blks))
 free_blocks0=$(stat -f $testdir1 -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir1/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir1/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir2/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir2/file2" >> "$seqres.full"
-mkdir "$testdir1/dir1"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir1/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir1/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir2/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir2/file2 >> $seqres.full
+mkdir $testdir1/dir1
 seq 1 $((2 * blksz / 250)) | while read f; do
-       touch "$testdir1/dir1/$f"
+       touch $testdir1/dir1/$f
 done
-mknod "$testdir1/dev1" c 1 3
-mkfifo "$testdir1/fifo1"
+mknod $testdir1/dev1 c 1 3
+mkfifo $testdir1/fifo1
 sync
 
 _filter_enotty() {
@@ -88,38 +88,38 @@ _filter_einval() {
 }
 
 echo "Try cross-device reflink"
-_reflink_range "$testdir1/file1" 0 "$testdir2/file1" 0 $blksz
+_reflink_range $testdir1/file1 0 $testdir2/file1 0 $blksz
 
 echo "Try unaligned reflink"
-_reflink_range "$testdir1/file1" 37 "$testdir1/file1" 59 23
+_reflink_range $testdir1/file1 37 $testdir1/file1 59 23
 
 echo "Try overlapping reflink"
-_reflink_range "$testdir1/file1" 0 "$testdir1/file1" 1 $((blksz * 2))
+_reflink_range $testdir1/file1 0 $testdir1/file1 1 $((blksz * 2))
 
 echo "Try reflink past EOF"
-_reflink_range "$testdir1/file1" $(( (blks + 10) * blksz)) "$testdir1/file1" 0 $blksz
+_reflink_range $testdir1/file1 $(( (blks + 10) * blksz)) $testdir1/file1 0 $blksz
 
 echo "Try to reflink a dir"
-_reflink_range "$testdir1/dir1" 0 "$testdir1/file2" 0 $blksz
+_reflink_range $testdir1/dir1 0 $testdir1/file2 0 $blksz
 
 echo "Try to reflink a device"
-_reflink_range "$testdir1/dev1" 0 "$testdir1/file2" 0 $blksz
+_reflink_range $testdir1/dev1 0 $testdir1/file2 0 $blksz
 
 echo "Try to reflink to a dir"
-_reflink_range "$testdir1/file1" 0 "$testdir1/dir1" 0 $blksz 2>&1 | _filter_test_dir
+_reflink_range $testdir1/file1 0 $testdir1/dir1 0 $blksz 2>&1 | _filter_test_dir
 
 echo "Try to reflink to a device"
-_reflink_range "$testdir1/file1" 0 "$testdir1/dev1" 0 $blksz 2>&1 | _filter_enotty
+_reflink_range $testdir1/file1 0 $testdir1/dev1 0 $blksz 2>&1 | _filter_enotty
 
 echo "Try to reflink to a fifo"
-_reflink_range "$testdir1/file1" 0 "$testdir1/fifo1" 0 $blksz -n 2>&1 | _filter_enotty
+_reflink_range $testdir1/file1 0 $testdir1/fifo1 0 $blksz -n 2>&1 | _filter_enotty
 
 echo "Try to reflink an append-only file"
-_reflink_range "$testdir1/file1" 0 "$testdir1/file3" 0 $blksz -a 2>&1 | _filter_einval
+_reflink_range $testdir1/file1 0 $testdir1/file3 0 $blksz -a 2>&1 | _filter_einval
 
 echo "Reflink two files"
-_reflink_range "$testdir1/file1" 0 "$testdir1/file2" 0 $blksz >> "$seqres.full"
-_reflink_range "$testdir2/file1" 0 "$testdir2/file2" 0 $blksz >> "$seqres.full"
+_reflink_range $testdir1/file1 0 $testdir1/file2 0 $blksz >> $seqres.full
+_reflink_range $testdir2/file1 0 $testdir2/file2 0 $blksz >> $seqres.full
 
 # success, all done
 status=0
index 4b51973cf6d98740768ab9986ec3e8efd27076d0..0da5daa956fbf8d0e30901794a97602ad89e6cd2 100755 (executable)
@@ -20,8 +20,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -46,19 +46,18 @@ _supported_os Linux
 _require_test_dedupe
 _require_scratch_dedupe
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
 testdir1="$TEST_DIR/test-$seq"
-rm -rf "$testdir1"
-mkdir "$testdir1"
+rm -rf $testdir1
+mkdir $testdir1
 
 testdir2=$SCRATCH_MNT/test-$seq
-rm -rf "$testdir2"
-mkdir "$testdir2"
+mkdir $testdir2
 
 echo "Create the original files"
 blksz="$(stat -f $testdir1 -c '%S')"
@@ -67,17 +66,18 @@ margin='7%'
 sz=$((blksz * blks))
 free_blocks0=$(stat -f $testdir1 -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir1/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir1/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir1/file3" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir2/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir2/file2" >> "$seqres.full"
-mkdir "$testdir1/dir1"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir1/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir1/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir1/file3 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir2/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir2/file2 >> $seqres.full
+mkdir $testdir1/dir1
 seq 1 $((2 * blksz / 250)) | while read f; do
-       touch "$testdir1/dir1/$f"
+       touch $testdir1/dir1/$f
 done
-mknod "$testdir1/dev1" c 1 3
-mkfifo "$testdir1/fifo1"
+mknod $testdir1/dev1 c 1 3
+mkfifo $testdir1/fifo1
 sync
 
 _filter_enotty() {
@@ -89,38 +89,38 @@ _filter_eperm() {
 }
 
 echo "Try cross-device dedupe"
-_dedupe_range "$testdir1/file1" 0 "$testdir2/file1" 0 $blksz
+_dedupe_range $testdir1/file1 0 $testdir2/file1 0 $blksz
 
 echo "Try unaligned dedupe"
-_dedupe_range "$testdir1/file1" 37 "$testdir1/file1" 59 23
+_dedupe_range $testdir1/file1 37 $testdir1/file1 59 23
 
 echo "Try overlapping dedupe"
-_dedupe_range "$testdir1/file1" 0 "$testdir1/file1" 1 $((blksz * 2))
+_dedupe_range $testdir1/file1 0 $testdir1/file1 1 $((blksz * 2))
 
 echo "Try dedupe past EOF"
-_dedupe_range "$testdir1/file1" $(( (blks + 10) * blksz)) "$testdir1/file1" 0 $blksz
+_dedupe_range $testdir1/file1 $(( (blks + 10) * blksz)) $testdir1/file1 0 $blksz
 
 echo "Try to dedupe a dir"
-_dedupe_range "$testdir1/dir1" 0 "$testdir1/file2" 0 $blksz
+_dedupe_range $testdir1/dir1 0 $testdir1/file2 0 $blksz
 
 echo "Try to dedupe a device"
-_dedupe_range "$testdir1/dev1" 0 "$testdir1/file2" 0 $blksz 2>&1 | _filter_enotty
+_dedupe_range $testdir1/dev1 0 $testdir1/file2 0 $blksz 2>&1 | _filter_enotty
 
 echo "Try to dedupe to a dir"
-_dedupe_range "$testdir1/file1" 0 "$testdir1/dir1" 0 $blksz 2>&1 | _filter_test_dir
+_dedupe_range $testdir1/file1 0 $testdir1/dir1 0 $blksz 2>&1 | _filter_test_dir
 
 echo "Try to dedupe to a device"
-_dedupe_range "$testdir1/file1" 0 "$testdir1/dev1" 0 $blksz 2>&1 | _filter_eperm
+_dedupe_range $testdir1/file1 0 $testdir1/dev1 0 $blksz 2>&1 | _filter_eperm
 
 echo "Try to dedupe to a fifo"
-_dedupe_range "$testdir1/file1" 0 "$testdir1/fifo1" 0 $blksz -n 2>&1 | _filter_eperm
+_dedupe_range $testdir1/file1 0 $testdir1/fifo1 0 $blksz -n 2>&1 | _filter_eperm
 
 echo "Try to dedupe an append-only file"
-_dedupe_range "$testdir1/file1" 0 "$testdir1/file3" 0 $blksz -a >> "$seqres.full"
+_dedupe_range $testdir1/file1 0 $testdir1/file3 0 $blksz -a >> $seqres.full
 
 echo "Dedupe two files"
-_dedupe_range "$testdir1/file1" 0 "$testdir1/file2" 0 $blksz >> "$seqres.full"
-_dedupe_range "$testdir2/file1" 0 "$testdir2/file2" 0 $blksz >> "$seqres.full"
+_dedupe_range $testdir1/file1 0 $testdir1/file2 0 $blksz >> $seqres.full
+_dedupe_range $testdir2/file1 0 $testdir2/file2 0 $blksz >> $seqres.full
 
 # success, all done
 status=0
index 88a0c7ee2cbdf5dd13ef80d8b5eda7b2c54ad896..8898d58b5123e2c71070ca5bb1133c6d978d5ab2 100755 (executable)
@@ -20,8 +20,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -46,12 +46,12 @@ _supported_os Linux
 _require_test_lsattr
 _require_test_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
 testdir1="$TEST_DIR/test-$seq"
-rm -rf "$testdir1"
-mkdir "$testdir1"
+rm -rf $testdir1
+mkdir $testdir1
 
 echo "Create the original files"
 blksz="$(stat -f $testdir1 -c '%S')"
@@ -60,13 +60,14 @@ margin='7%'
 sz=$((blksz * blks))
 free_blocks0=$(stat -f $testdir1 -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir1/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir1/file2" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir1/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir1/file2 >> $seqres.full
 sync
 
 echo "Try reflink on immutable files"
 $CHATTR_PROG +i $testdir1/file1 $testdir1/file2
-_reflink_range "$testdir1/file1" 0 "$testdir1/file2" 0 $blksz 2>&1 | _filter_test_dir
+_reflink_range $testdir1/file1 0 $testdir1/file2 0 $blksz 2>&1 | _filter_test_dir
 $CHATTR_PROG -i $testdir1/file1 $testdir1/file2
 
 # success, all done
index 83325d5b51582c0fda75fa3841ab88c2d059dcc9..3a91dc81627627e174328ea09e3e2ed8b5919663 100755 (executable)
@@ -20,8 +20,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -46,12 +46,12 @@ _supported_os Linux
 _require_test_lsattr
 _require_test_dedupe
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
 testdir1="$TEST_DIR/test-$seq"
-rm -rf "$testdir1"
-mkdir "$testdir1"
+rm -rf $testdir1
+mkdir $testdir1
 
 echo "Create the original files"
 blksz="$(stat -f $testdir1 -c '%S')"
@@ -60,13 +60,14 @@ margin='7%'
 sz=$((blksz * blks))
 free_blocks0=$(stat -f $testdir1 -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir1/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir1/file2" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir1/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir1/file2 >> $seqres.full
 sync
 
 echo "Try dedupe on immutable files"
 $CHATTR_PROG +i $testdir1/file1 $testdir1/file2
-_dedupe_range "$testdir1/file1" 0 "$testdir1/file2" 0 $blksz 2>&1 | _filter_test_dir
+_dedupe_range $testdir1/file1 0 $testdir1/file2 0 $blksz 2>&1 | _filter_test_dir
 $CHATTR_PROG -i $testdir1/file1 $testdir1/file2
 
 # success, all done
index 1d5364e349ac43e787db3e6891fa53e7b43fe87f..7776b83c57de8ad53f5a6965fbc997d6eb45e61c 100755 (executable)
@@ -21,8 +21,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -48,25 +48,24 @@ _require_scratch_reflink
 _require_cp_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=4096
 blksz=65536
 
 echo "Initialize files"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2
 _scratch_remount
 
 echo "Delete while rewriting"
-rm -rf "$testdir/file1" &
-_pwrite_byte 0x62 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
+rm -rf $testdir/file1 &
+_pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 wait
 
 # success, all done
index 90445451a7bcbf83ae615d1e733916bac3b0fd20..6d5bb7a56b0e7b8c3dc41647451ea30d5f9d209d 100755 (executable)
@@ -21,8 +21,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -47,27 +47,26 @@ _supported_os Linux
 _require_scratch_dedupe
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=512
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize files"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file2" >> "$seqres.full"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
 _scratch_remount
 
 overwrite() {
-       while [ ! -e "$testdir/finished" ]; do
+       while [ ! -e $testdir/finished ]; do
                seq $nr_loops -1 0 | while read i; do
-                       _pwrite_byte 0x61 $((i * blksz)) $blksz "$testdir/file2" >> "$seqres.full"
+                       _pwrite_byte 0x61 $((i * blksz)) $blksz $testdir/file2 >> $seqres.full
                done
        done
 }
@@ -76,13 +75,13 @@ echo "Dedupe and rewrite the file!"
 overwrite &
 for i in `seq 1 2`; do
        seq $nr_loops -1 0 | while read i; do
-               _dedupe_range   "$testdir/file1" $((i * blksz)) \
-                               "$testdir/file2" $((i * blksz)) $blksz >> "$seqres.full"
+               _dedupe_range   $testdir/file1 $((i * blksz)) \
+                               $testdir/file2 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && break
        done
 done
 echo "Finished dedupeing"
-touch "$testdir/finished"
+touch $testdir/finished
 wait
 
 # success, all done
index 651d4457df57c96cd9d0beee08cfb15b5c97859b..b9b0cd7821cfdadf29ac71a9d1ce82a1c7483216 100755 (executable)
@@ -21,8 +21,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -47,27 +47,26 @@ _supported_os Linux
 _require_scratch_dedupe
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=512
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize files"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file2" >> "$seqres.full"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
 _scratch_remount
 
 overwrite() {
-       while [ ! -e "$testdir/finished" ]; do
+       while [ ! -e $testdir/finished ]; do
                seq $nr_loops -1 0 | while read i; do
-                       _pwrite_byte 0x61 $((i * blksz)) $blksz "$testdir/file1" >> "$seqres.full"
+                       _pwrite_byte 0x61 $((i * blksz)) $blksz $testdir/file1 >> $seqres.full
                done
        done
 }
@@ -76,13 +75,13 @@ echo "Dedupe and rewrite the file!"
 overwrite &
 for i in `seq 1 2`; do
        seq $nr_loops -1 0 | while read i; do
-               _dedupe_range   "$testdir/file1" $((i * blksz)) \
-                               "$testdir/file2" $((i * blksz)) $blksz >> "$seqres.full"
+               _dedupe_range   $testdir/file1 $((i * blksz)) \
+                               $testdir/file2 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && break
        done
 done
 echo "Finished dedupeing"
-touch "$testdir/finished"
+touch $testdir/finished
 wait
 
 # success, all done
index 6c19c7d8b3ac48dab42bb6f5572a25da3dfb013d..6c127240c3daabeceb297e2196315e38d13ac667 100755 (executable)
@@ -22,7 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
+seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -49,22 +49,21 @@ _require_scratch_reflink
 _require_cp_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=512
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize files"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((loops * blksz)) "$testdir/file2" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file3"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file3
 _scratch_remount
 
 fbytes() {
@@ -72,8 +71,8 @@ fbytes() {
 }
 
 reader() {
-       while [ ! -e "$testdir/finished" ]; do
-               _read_range "$testdir/file3" 0 $((loops * blksz)) | fbytes
+       while [ ! -e $testdir/finished ]; do
+               _read_range $testdir/file3 0 $((loops * blksz)) | fbytes
        done
 }
 
@@ -81,18 +80,18 @@ echo "Reflink and reread the files!"
 reader &
 for i in `seq 1 2`; do
        seq $nr_loops -1 0 | while read i; do
-               _reflink_range  "$testdir/file1" $((i * blksz)) \
-                               "$testdir/file3" $((i * blksz)) $blksz >> "$seqres.full"
+               _reflink_range  $testdir/file1 $((i * blksz)) \
+                               $testdir/file3 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && break
        done
        seq $nr_loops -1 0 | while read i; do
-               _reflink_range  "$testdir/file2" $((i * blksz)) \
-                               "$testdir/file3" $((i * blksz)) $blksz >> "$seqres.full"
+               _reflink_range  $testdir/file2 $((i * blksz)) \
+                               $testdir/file3 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && break
        done
 done
 echo "Finished reflinking"
-touch "$testdir/finished"
+touch $testdir/finished
 wait
 
 # success, all done
index 2e380a90a9709b2327bbe7d466790c995348f10b..e4c9a9dcd49d512f0d028fb9fa3305b0dab43d1e 100755 (executable)
@@ -22,7 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
+seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -49,21 +49,20 @@ _require_scratch_reflink
 _require_cp_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=512
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize files"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((loops * blksz)) "$testdir/file2" >> "$seqres.full"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file3
 _scratch_remount
 
@@ -72,8 +71,8 @@ fbytes() {
 }
 
 reader() {
-       while [ ! -e "$testdir/finished" ]; do
-               _read_range "$testdir/file3" 0 $((loops * blksz)) -d | fbytes
+       while [ ! -e $testdir/finished ]; do
+               _read_range $testdir/file3 0 $((loops * blksz)) -d | fbytes
        done
 }
 
@@ -81,18 +80,18 @@ echo "Reflink and dio reread the files!"
 reader &
 for i in `seq 1 2`; do
        seq $nr_loops -1 0 | while read i; do
-               _reflink_range  "$testdir/file1" $((i * blksz)) \
-                               "$testdir/file3" $((i * blksz)) $blksz >> "$seqres.full"
+               _reflink_range  $testdir/file1 $((i * blksz)) \
+                               $testdir/file3 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && break
        done
        seq $nr_loops -1 0 | while read i; do
-               _reflink_range  "$testdir/file2" $((i * blksz)) \
-                               "$testdir/file3" $((i * blksz)) $blksz >> "$seqres.full"
+               _reflink_range  $testdir/file2 $((i * blksz)) \
+                               $testdir/file3 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && break
        done
 done
 echo "Finished reflinking"
-touch "$testdir/finished"
+touch $testdir/finished
 wait
 
 # success, all done
index 028ee111d3679e845a6f4d4a9d976b5ca3646c72..9be753dd9343b40d9b742c823babbeb758607557 100755 (executable)
@@ -22,8 +22,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -49,27 +49,26 @@ _require_scratch_reflink
 _require_cp_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=1024
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize file"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _scratch_remount
 
 # Snapshot creator...
 snappy() {
        n=0
-       while [ ! -e "$testdir/finished" ]; do
-               _cp_reflink "$testdir/file1" "$testdir/snap_$n" || break
+       while [ ! -e $testdir/finished ]; do
+               _cp_reflink $testdir/file1 $testdir/snap_$n || break
                n=$((n + 1))
        done
 }
@@ -77,7 +76,7 @@ snappy() {
 echo "Snapshot a file undergoing directio rewrite"
 snappy &
 seq $nr_loops -1 0 | while read i; do
-       _pwrite_byte 0x63 $((i * blksz)) $blksz -d "$testdir/file1" >> "$seqres.full"
+       _pwrite_byte 0x63 $((i * blksz)) $blksz -d $testdir/file1 >> $seqres.full
 done
 touch $testdir/finished
 wait
index a4bf4f4c7defd05712e014325e4ca4175e32ea5d..ef8e75b002b9728bd08f6025eb1954ff56840e91 100755 (executable)
@@ -22,8 +22,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -49,27 +49,26 @@ _require_scratch_reflink
 _require_cp_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=1024
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize file"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _scratch_remount
 
 # Snapshot creator...
 snappy() {
        n=0
-       while [ ! -e "$testdir/finished" ]; do
-               _cp_reflink "$testdir/file1" "$testdir/snap_$n" || break
+       while [ ! -e $testdir/finished ]; do
+               _cp_reflink $testdir/file1 $testdir/snap_$n || break
                n=$((n + 1))
        done
 }
@@ -77,7 +76,7 @@ snappy() {
 echo "Snapshot a file undergoing buffered rewrite"
 snappy &
 seq $nr_loops -1 0 | while read i; do
-       _pwrite_byte 0x63 $((i * blksz)) $blksz "$testdir/file1" >> "$seqres.full"
+       _pwrite_byte 0x63 $((i * blksz)) $blksz $testdir/file1 >> $seqres.full
 done
 touch $testdir/finished
 wait
index 2ffc5b67a4a340cb04967d9c59cf5738ba0f295e..bb4a5a1baacc0e17f2d80ec32308a74322c68195 100755 (executable)
@@ -22,8 +22,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -48,28 +48,27 @@ _supported_os Linux
 _require_scratch_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=1024
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize files"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((loops * blksz)) "$testdir/file2" >> "$seqres.full"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
 _scratch_remount
 
 # Direct I/O overwriter...
 overwrite() {
-       while [ ! -e "$testdir/finished" ]; do
+       while [ ! -e $testdir/finished ]; do
                seq $nr_loops -1 0 | while read i; do
-                       _pwrite_byte 0x63 $((i * blksz)) $blksz "$testdir/file2" >> "$seqres.full"
+                       _pwrite_byte 0x63 $((i * blksz)) $blksz $testdir/file2 >> $seqres.full
                done
        done
 }
@@ -78,12 +77,12 @@ echo "Reflink and write the target"
 overwrite &
 seq 1 10 | while read j; do
        seq 0 $nr_loops | while read i; do
-               _reflink_range  "$testdir/file1" $((i * blksz)) \
-                               "$testdir/file2" $((i * blksz)) $blksz >> "$seqres.full"
+               _reflink_range  $testdir/file1 $((i * blksz)) \
+                               $testdir/file2 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && exit
        done
 done
-touch "$testdir/finished"
+touch $testdir/finished
 wait
 
 # success, all done
index 2a81caddf886aee570e4e3dbb514e2f04b795047..dbf156447228891a5bedbdabadf53bd8914b1c8e 100755 (executable)
@@ -22,8 +22,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 7 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".*
+    rm -rf $tmp.*
     wait
 }
 
@@ -48,28 +48,27 @@ _supported_os Linux
 _require_scratch_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 loops=1024
 nr_loops=$((loops - 1))
 blksz=65536
 
 echo "Initialize files"
-echo > "$seqres.full"
-_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((loops * blksz)) "$testdir/file2" >> "$seqres.full"
+echo > $seqres.full
+_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
 _scratch_remount
 
 # Direct I/O overwriter...
 overwrite() {
-       while [ ! -e "$testdir/finished" ]; do
+       while [ ! -e $testdir/finished ]; do
                seq $nr_loops -1 0 | while read i; do
-                       _pwrite_byte 0x63 $((i * blksz)) $blksz -d "$testdir/file2" >> "$seqres.full"
+                       _pwrite_byte 0x63 $((i * blksz)) $blksz -d $testdir/file2 >> $seqres.full
                done
        done
 }
@@ -78,12 +77,12 @@ echo "Reflink and dio write the target"
 overwrite &
 seq 1 10 | while read j; do
        seq 0 $nr_loops | while read i; do
-               _reflink_range  "$testdir/file1" $((i * blksz)) \
-                               "$testdir/file2" $((i * blksz)) $blksz >> "$seqres.full"
+               _reflink_range  $testdir/file1 $((i * blksz)) \
+                               $testdir/file2 $((i * blksz)) $blksz >> $seqres.full
                [ $? -ne 0 ] && exit
        done
 done
-touch "$testdir/finished"
+touch $testdir/finished
 wait
 
 # success, all done
index d865f64f5c9e90e64d93911eec7b1a4bf96c0d70..8a3f246a2bdae3e4624ca59912af55e7fad21f74 100755 (executable)
@@ -21,8 +21,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -47,53 +47,52 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 echo "Reformat with appropriate size"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 nr_blks=10240
-umount "$SCRATCH_MNT"
+umount $SCRATCH_MNT
 sz_bytes=$((nr_blks * 8 * blksz))
 if [ $sz_bytes -lt $((32 * 1048576)) ]; then
        sz_bytes=$((32 * 1048576))
 fi
-_scratch_mkfs_sized $sz_bytes >> "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
-rm -rf "$testdir"
-mkdir "$testdir"
+_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create a big file and reflink it"
-_pwrite_byte 0x61 0 $((blksz * nr_blks)) "$testdir/bigfile" >> "$seqres.full" 2>&1
-_cp_reflink "$testdir/bigfile" "$testdir/clonefile"
+_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/bigfile >> $seqres.full 2>&1
+_cp_reflink $testdir/bigfile $testdir/clonefile
 sync
 
 echo "Allocate the rest of the space"
-nr_free="$(stat -f -c '%f' "$testdir")"
-touch "$testdir/file0" "$testdir/file1"
-_pwrite_byte 0x61 0 $((blksz * nr_free)) "$testdir/eat_my_space" >> "$seqres.full" 2>&1
+nr_free=$(stat -f -c '%f' $testdir)
+touch $testdir/file0 $testdir/file1
+_pwrite_byte 0x61 0 $((blksz * nr_free)) $testdir/eat_my_space >> $seqres.full 2>&1
 sync
 
 echo "CoW the big file"
-out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) "$testdir/bigfile" 2>&1)"
-echo "${out}" | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
-echo "${out}" >> "$seqres.full" 2>&1
-echo "${out}"
+out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
+echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
+echo ${out} >> $seqres.full 2>&1
+echo ${out}
 
 echo "Remount and try CoW again"
 _scratch_remount
 
-out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) "$testdir/bigfile" 2>&1)"
-echo "${out}" | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
-echo "${out}" >> "$seqres.full" 2>&1
-echo "${out}"
+out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
+echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
+echo ${out} >> $seqres.full 2>&1
+echo ${out}
 
 # success, all done
 status=0
index e6020f15dc8f5b4461a1a0db1023ab25588e8e53..3e32644d009550981404e91a3a868f592027aa99 100755 (executable)
@@ -21,8 +21,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -47,53 +47,52 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 echo "Reformat with appropriate size"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 nr_blks=10240
-umount "$SCRATCH_MNT"
+umount $SCRATCH_MNT
 sz_bytes=$((nr_blks * 3 / 2 * blksz))
 if [ $sz_bytes -lt $((32 * 1048576)) ]; then
        sz_bytes=$((32 * 1048576))
 fi
-_scratch_mkfs_sized $sz_bytes >> "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
-rm -rf "$testdir"
-mkdir "$testdir"
+_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create a big file and reflink it"
-_pwrite_byte 0x61 0 $((blksz * nr_blks)) "$testdir/bigfile" >> "$seqres.full" 2>&1
-_cp_reflink "$testdir/bigfile" "$testdir/clonefile"
+_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/bigfile >> $seqres.full 2>&1
+_cp_reflink $testdir/bigfile $testdir/clonefile
 sync
 
 echo "Allocate the rest of the space"
-nr_free="$(stat -f -c '%f' "$testdir")"
-touch "$testdir/file0" "$testdir/file1"
-_pwrite_byte 0x61 0 $((blksz * nr_free)) "$testdir/eat_my_space" >> "$seqres.full" 2>&1
+nr_free=$(stat -f -c '%f' $testdir)
+touch $testdir/file0 $testdir/file1
+_pwrite_byte 0x61 0 $((blksz * nr_free)) $testdir/eat_my_space >> $seqres.full 2>&1
 sync
 
 echo "CoW the big file"
-out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) "$testdir/bigfile" 2>&1)"
-echo "${out}" | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
-echo "${out}" >> "$seqres.full" 2>&1
-echo "${out}"
+out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
+echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
+echo ${out} >> $seqres.full 2>&1
+echo ${out}
 
 echo "Remount and try CoW again"
 _scratch_remount
 
-out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) "$testdir/bigfile" 2>&1)"
-echo "${out}" | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
-echo "${out}" >> "$seqres.full" 2>&1
-echo "${out}"
+out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
+echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
+echo ${out} >> $seqres.full 2>&1
+echo ${out}
 
 # success, all done
 status=0
index 61c6b3264c021fdc80cd83ea1e07e32a38503e1c..fe085a6586af971e55f9dfed88475b9fe5a0855b 100755 (executable)
@@ -21,8 +21,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -47,53 +47,52 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 echo "Reformat with appropriate size"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 nr_blks=10240
-umount "$SCRATCH_MNT"
+umount $SCRATCH_MNT
 sz_bytes=$((nr_blks * 8 * blksz))
 if [ $sz_bytes -lt $((32 * 1048576)) ]; then
        sz_bytes=$((32 * 1048576))
 fi
-_scratch_mkfs_sized $sz_bytes >> "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
-rm -rf "$testdir"
-mkdir "$testdir"
+_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create a big file and reflink it"
-_pwrite_byte 0x61 0 $((blksz * nr_blks)) "$testdir/bigfile" >> "$seqres.full" 2>&1
-_cp_reflink "$testdir/bigfile" "$testdir/clonefile"
+_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/bigfile >> $seqres.full 2>&1
+_cp_reflink $testdir/bigfile $testdir/clonefile
 sync
 
 echo "Allocate the rest of the space"
-nr_free="$(stat -f -c '%f' "$testdir")"
-touch "$testdir/file0" "$testdir/file1"
-_pwrite_byte 0x61 0 $((blksz * nr_free)) "$testdir/eat_my_space" >> "$seqres.full" 2>&1
+nr_free=$(stat -f -c '%f' $testdir)
+touch $testdir/file0 $testdir/file1
+_pwrite_byte 0x61 0 $((blksz * nr_free)) $testdir/eat_my_space >> $seqres.full 2>&1
 sync
 
 echo "mmap CoW the big file"
-out="$(_mwrite_byte 0x62 0 $((blksz * nr_blks)) $((blksz * nr_blks)) "$testdir/bigfile" 2>&1)"
+out="$(_mwrite_byte 0x62 0 $((blksz * nr_blks)) $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
 err="$?"
-if [ "$err" -lt 128 ]; then
+if [ $err -lt 128 ]; then
        echo "mmap CoW should have failed with SIGBUS, got SIG$(kill -l $err)"
 fi
 
 echo "Remount and try CoW again"
 _scratch_remount
 
-out="$(_mwrite_byte 0x62 0 $((blksz * nr_blks)) $((blksz * nr_blks)) "$testdir/bigfile" 2>&1)"
+out="$(_mwrite_byte 0x62 0 $((blksz * nr_blks)) $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
 err="$?"
-if [ "$err" -lt 128 ]; then
+if [ $err -lt 128 ]; then
        echo "mmap CoW should have failed with SIGBUS, got SIG$(kill -l $err)"
 fi
 
index dd6fe5ae19efbec2b17150e6ca717e205d1741a5..cec2f05580fe77989cedb81603b70891ad725dfa 100755 (executable)
@@ -21,8 +21,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir1"
+    rm -rf $tmp.* $testdir1
 }
 
 # get standard environment, filters and checks
@@ -47,53 +47,52 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 echo "Reformat with appropriate size"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 nr_blks=10240
-umount "$SCRATCH_MNT"
+umount $SCRATCH_MNT
 sz_bytes=$((nr_blks * 8 * blksz))
 if [ $sz_bytes -lt $((32 * 1048576)) ]; then
        sz_bytes=$((32 * 1048576))
 fi
-_scratch_mkfs_sized $sz_bytes >> "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
-rm -rf "$testdir"
-mkdir "$testdir"
+_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create a big file and reflink it"
-_pwrite_byte 0x61 0 $((blksz * nr_blks)) "$testdir/bigfile" >> "$seqres.full" 2>&1
-_cp_reflink "$testdir/bigfile" "$testdir/clonefile"
+_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/bigfile >> $seqres.full 2>&1
+_cp_reflink $testdir/bigfile $testdir/clonefile
 sync
 
 echo "Allocate the rest of the space"
-nr_free="$(stat -f -c '%f' "$testdir")"
-touch "$testdir/file0" "$testdir/file1"
-_pwrite_byte 0x61 0 $((blksz * nr_free)) "$testdir/eat_my_space" >> "$seqres.full" 2>&1
+nr_free=$(stat -f -c '%f' $testdir)
+touch $testdir/file0 $testdir/file1
+_pwrite_byte 0x61 0 $((blksz * nr_free)) $testdir/eat_my_space >> $seqres.full 2>&1
 sync
 
 echo "CoW the big file"
-out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) "$testdir/bigfile" -d 2>&1)"
-echo "${out}" | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
-echo "${out}" >> "$seqres.full" 2>&1
-echo "${out}"
+out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile -d 2>&1)"
+echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
+echo ${out} >> $seqres.full 2>&1
+echo ${out}
 
 echo "Remount and try CoW again"
 _scratch_remount
 
-out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) "$testdir/bigfile" -d 2>&1)"
-echo "${out}" | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
-echo "${out}" >> "$seqres.full" 2>&1
-echo "${out}"
+out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile -d 2>&1)"
+echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
+echo ${out} >> $seqres.full 2>&1
+echo ${out}
 
 # success, all done
 status=0
index f1bc9635166f54b19065e82eee1db6926947a2bd..68432e786f18df50638581dfc37e09a5c170f3d8 100755 (executable)
@@ -20,8 +20,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -46,31 +46,32 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fpunch"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=512
-_pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 
-_cp_reflink "$testdir/file1" "$testdir/file2"
+_cp_reflink $testdir/file1 $testdir/file2
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
 echo "Write and punch"
-_pwrite_byte 0x62 0 $((blksz * 256)) "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "fpunch $blksz $((blksz * 254))" "$testdir/file2"
+_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "fpunch $blksz $((blksz * 254))" $testdir/file2
 _test_remount
 
 echo "Compare results"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
 
 # success, all done
 status=0
index 8e1e0591e8902e9ee117da474d29f02eb99dd1fe..27c25e774b414dd0add0f83747ebf5c3d8bb133f 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,47 +49,47 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fpunch"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 3)) "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file1 >> $seqres.full
 
-_cp_reflink "$testdir/file1" "$testdir/file2"
+_cp_reflink $testdir/file1 $testdir/file2
 
-_pwrite_byte 0x61 0 $((blksz * 3)) "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) $testdir/file2.chk >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
 
 echo "fpunch files"
-"$XFS_IO_PROG" -f -c "fpunch $((blksz - 17)) $((blksz + 17))" "$testdir/file2"
+$XFS_IO_PROG -f -c "fpunch $((blksz - 17)) $((blksz + 17))" $testdir/file2
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 # success, all done
 status=0
index dc6cbbbf8ded8c526eedc42f6b4aa7b7040521e9..a0f30a2a61aa9e9bb8e50d515aca337f40c10543 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,47 +49,47 @@ _require_test_reflink
 _require_cp_reflink
 _require_xfs_io_command "fzero"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 3)) "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file1 >> $seqres.full
 
-_cp_reflink "$testdir/file1" "$testdir/file2"
+_cp_reflink $testdir/file1 $testdir/file2
 
-_pwrite_byte 0x61 0 $((blksz * 3)) "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) $testdir/file2.chk >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
 
 echo "fzero files"
-"$XFS_IO_PROG" -f -c "fzero $((blksz - 17)) $((blksz + 17))" "$testdir/file2"
+$XFS_IO_PROG -f -c "fzero $((blksz - 17)) $((blksz + 17))" $testdir/file2
 _test_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 # success, all done
 status=0
index cb6639f82435114175731ba45c06687136cc6f20..9c640e404ed3e082326a9d2fcd305e089485d0e5 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,32 +48,32 @@ _supported_os Linux
 _require_test_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * 256)) "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * 2)) "$testdir/file2.chk" >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 255)) "$testdir/file2.chk" >> "$seqres.full"
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) 0 >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz * 2)) $testdir/file2.chk >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 255)) $testdir/file2.chk >> $seqres.full
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 # success, all done
 status=0
index ef10af8f323ecb2b53abba240dc22935c8a59ca1..fddacc4fe7f43d10b65b39435af9294285eeb32c 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -47,69 +47,69 @@ _cleanup()
 _supported_os Linux
 _require_test_dedupe
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * 257)) "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * 257)) "$testdir/file2.chk" >> "$seqres.full"
-_dedupe_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) 0 >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz * 257)) $testdir/file2 >> $seqres.full
+_pwrite_byte 0x62 0 $((blksz * 257)) $testdir/file2.chk >> $seqres.full
+_dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 echo "Make the original file almost dedup-able"
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file2.chk" >> "$seqres.full"
-_dedupe_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) 0 >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file2.chk >> $seqres.full
+_dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" != "${c2}" || echo "file1 and file2 should not match"
+test ${c1} != ${c2} || echo "file1 and file2 should not match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 echo "Make the original file dedup-able"
-_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz * 257)) "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $((blksz * 257)) "$testdir/file2.chk" >> "$seqres.full"
-_dedupe_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) 0 >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz * 257)) $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $((blksz * 257)) $testdir/file2.chk >> $seqres.full
+_dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
 _test_remount
 
-md5sum "$testdir/file1" | _filter_test_dir
-md5sum "$testdir/file2" | _filter_test_dir
-md5sum "$testdir/file2.chk" | _filter_test_dir
+md5sum $testdir/file1 | _filter_test_dir
+md5sum $testdir/file2 | _filter_test_dir
+md5sum $testdir/file2.chk | _filter_test_dir
 
-c1="$(_md5_checksum "$testdir/file1")"
-c2="$(_md5_checksum "$testdir/file2")"
+c1=$(_md5_checksum $testdir/file1)
+c2=$(_md5_checksum $testdir/file2)
 
-test "${c1}" = "${c2}" || echo "file1 and file2 should match"
+test ${c1} = ${c2} || echo "file1 and file2 should match"
 
 echo "Compare against check files"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 # success, all done
 status=0
index c928acd7a56e139a4ba5dbfbe847bb2de91abfaf..0f35da2654d1b66bfcaa201c2046915bd7194523 100755 (executable)
@@ -26,8 +26,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,47 +50,49 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
-_pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * nr)) "$testdir/file2" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $filesize $testdir/file2 >> $seqres.full
 seq 0 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file1" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x61 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file1 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x61 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 seq 1 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file2" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x62 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "directio CoW across the transition"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index fb05e6d7356c063aee6534256accbecce2ed5eb8..28826d02ce6cdc23414d66f31125a6386b7f7eee 100755 (executable)
@@ -26,8 +26,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,47 +50,49 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
-_pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * nr)) "$testdir/file2" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $filesize $testdir/file2 >> $seqres.full
 seq 0 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file1" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x61 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file1 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x61 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 seq 1 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file2" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x62 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW across the transition"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index e495cbcba23262fc544d9cff477785a9670efcfb..9839a220c23a1f77cc5eefbec3d39083a3a73fa3 100755 (executable)
@@ -28,8 +28,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-#    rm -rf "$tmp".* "$testdir"
+#    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -54,88 +54,91 @@ _require_scratch_reflink
 _require_cp_reflink
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
-test "$FSTYP" = "btrfs" && _notrun "Can't fragment free space on btrfs."
+test $FSTYP = "btrfs" && _notrun "Can't fragment free space on btrfs."
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 _fragment_freesp()
 {
-       file="$1"
+       file=$1
 
        # consume nearly all available space (leave ~1MB)
        avail=`_get_available_space $SCRATCH_MNT`
        echo "$avail bytes left"
        filesize=$((avail - 1048576))
-       $XFS_IO_PROG -fc "truncate $filesize" "$file"
+       $XFS_IO_PROG -fc "truncate $filesize" $file
 
        chunks=20
        chunksizemb=$((filesize / chunks / 1048576))
        seq 1 $chunks | while read f; do
                echo "$((f * chunksizemb)) file size $f / 20"
-               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" "$file"
+               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" $file
        done
 
        chunks=100
        chunksizemb=$((filesize / chunks / 1048576))
        seq 80 $chunks | while read f; do
                echo "$((f * chunksizemb)) file size $f / $chunks"
-               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" "$file"
+               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" $file
        done
 
        filesizemb=$((filesize / 1048576))
-       $XFS_IO_PROG -fc "falloc -k 0 ${filesizemb}m" "$file"
+       $XFS_IO_PROG -fc "falloc -k 0 ${filesizemb}m" $file
 
        # Try again anyway
        avail=`_get_available_space $SCRATCH_MNT`
-       $XFS_IO_PROG -fc "pwrite -S 0x65 0 $avail" "${file}.${i}"
+       $XFS_IO_PROG -fc "pwrite -S 0x65 0 $avail" ${file}.${i}
 
        # Punch out whatever we need
        seq 1 $((nr * 4)) | while read f; do
-               $XFS_IO_PROG -f -c "fpunch $((f * 2 * blksz)) $blksz" "$file"
+               $XFS_IO_PROG -f -c "fpunch $((f * 2 * blksz)) $blksz" $file
        done
 }
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=1024
-_pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * nr)) "$testdir/file2" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $filesize $testdir/file2 >> $seqres.full
 seq 0 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file1" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x61 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file1 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x61 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 seq 1 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file2" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x62 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 _scratch_remount
-_fragment_freesp "$testdir/bigfile" >> "$seqres.full" 2>&1
+_fragment_freesp $testdir/bigfile >> $seqres.full 2>&1
+filesize=$((blksz * nr))
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW with multiple extents?"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index e3461ab45b500fb9f4034810b39638f1628bcf58..b8fade21821bd0696ff404e971fd5888b09817ea 100755 (executable)
@@ -28,8 +28,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-#    rm -rf "$tmp".* "$testdir"
+#    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -54,88 +54,91 @@ _require_scratch_reflink
 _require_cp_reflink
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
-test "$FSTYP" = "btrfs" && _notrun "Can't fragment free space on btrfs."
+test $FSTYP = "btrfs" && _notrun "Can't fragment free space on btrfs."
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 _fragment_freesp()
 {
-       file="$1"
+       file=$1
 
        # consume nearly all available space (leave ~1MB)
        avail=`_get_available_space $SCRATCH_MNT`
        echo "$avail bytes left"
        filesize=$((avail - 1048576))
-       $XFS_IO_PROG -fc "truncate $filesize" "$file"
+       $XFS_IO_PROG -fc "truncate $filesize" $file
 
        chunks=20
        chunksizemb=$((filesize / chunks / 1048576))
        seq 1 $chunks | while read f; do
                echo "$((f * chunksizemb)) file size $f / 20"
-               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" "$file"
+               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" $file
        done
 
        chunks=100
        chunksizemb=$((filesize / chunks / 1048576))
        seq 80 $chunks | while read f; do
                echo "$((f * chunksizemb)) file size $f / $chunks"
-               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" "$file"
+               $XFS_IO_PROG -fc "falloc -k $(( (f - 1) * chunksizemb))m ${chunksizemb}m" $file
        done
 
        filesizemb=$((filesize / 1048576))
-       $XFS_IO_PROG -fc "falloc -k 0 ${filesizemb}m" "$file"
+       $XFS_IO_PROG -fc "falloc -k 0 ${filesizemb}m" $file
 
        # Try again anyway
        avail=`_get_available_space $SCRATCH_MNT`
-       $XFS_IO_PROG -fc "pwrite -S 0x65 0 $avail" "${file}.${i}"
+       $XFS_IO_PROG -fc "pwrite -S 0x65 0 $avail" ${file}.${i}
 
        # Punch out whatever we need
        seq 1 $((nr * 4)) | while read f; do
-               $XFS_IO_PROG -f -c "fpunch $((f * 2 * blksz)) $blksz" "$file"
+               $XFS_IO_PROG -f -c "fpunch $((f * 2 * blksz)) $blksz" $file
        done
 }
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=1024
-_pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * nr)) "$testdir/file2" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $filesize $testdir/file2 >> $seqres.full
 seq 0 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file1" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x61 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file1 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x61 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 seq 1 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file2" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x62 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 _scratch_remount
-_fragment_freesp "$testdir/bigfile" >> "$seqres.full" 2>&1
+_fragment_freesp $testdir/bigfile >> $seqres.full 2>&1
+filesize=$((blksz * nr))
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW with multiple extents?"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 86980cced4230ae1d958d6ad8129306b0328a989..7be10800512717ff8455149776e55f77e83a4370 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,36 +50,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "directio CoW across the transition"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 8f5a338ab2fabaf86d3dc469bbb2ed93fb96a5e8..5b409bede663566bcd56e1b51f63356dd6d74408 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,36 +50,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW across the transition"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 8edfeb7e6cf7ab0dd47e171bd3a0da87503736e8..a5c2137e2c7d728152d4566e06b3197275dbd796 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,36 +50,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "directio CoW across the transition"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index dd97baad3c39eec1f332ed9c7e2be25d75f1ced2..cfedcde33add65e37b783e1e25904c2488751d5a 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,36 +50,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW across the transition"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 82b310096fc3b2492c41fd400c1d58e694ba8265..69a3e6c494faee5f1ff8c05bbc3b2ff7a6253f25 100755 (executable)
@@ -26,8 +26,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -51,37 +51,39 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "directio CoW across the transition"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
 _weave_reflink_holes_delalloc $blksz $nr $testdir/file3 >> $seqres.full
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index ce4c0a9b9b844ba9da0bdba3b9bdfb46589cb3f5..51f10f3c830b42cdf03adfe97a4d4f66f86ee3fc 100755 (executable)
@@ -26,8 +26,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -51,37 +51,39 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW across the transition"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
 _weave_reflink_holes_delalloc $blksz $nr $testdir/file3 >> $seqres.full
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index a7a0035bf0769e997986f7f4365121f32c38ef9a..951079c55c972b3e7bb8aeef63ee438709d6d124 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,36 +50,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "directio CoW across the transition"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 84a14ffecb372e8595481d4fcef7fab82f1c6960..cfdbf1b3fbcf497659d84bf204391a7da2c8658d 100755 (executable)
@@ -25,8 +25,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -50,36 +50,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW across the transition"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 6a65533bf0b3509e2ec1b165e87b0a689d250c4a..f457245d58a76ab03a26f5596422db8ad833edd7 100755 (executable)
@@ -29,8 +29,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -56,38 +56,40 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "directio CoW across the transition"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
 _weave_reflink_rainbow_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 # now cow
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 541d16de74b5aa08a34a9c634a1794dcf5067689..ffb5869eb15dc77760180ba4509e2ec8b4bd4562 100755 (executable)
@@ -29,8 +29,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -56,38 +56,40 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
+filesize=$((blksz * nr))
 _weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "directio CoW across the transition"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
 _weave_reflink_rainbow_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 # now cow
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x63 $((blksz * nr / 4)) $((blksz * nr / 2)) "$testdir/file3.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+_pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 # success, all done
 status=0
index 90087ef2e6330f1cd8a5476fa24fe2c2300a2b37..634dec91806485e3adba55c18c5e6d120e6d1219 100755 (executable)
@@ -21,8 +21,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -46,36 +46,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
 nr=64
-_pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * nr)) "$testdir/file3" >> "$seqres.full"
-_pwrite_byte 0x62 0 $((blksz * nr)) "$testdir/file3.chk" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
+_pwrite_byte 0x62 0 $filesize $testdir/file3 >> $seqres.full
+_pwrite_byte 0x62 0 $filesize $testdir/file3.chk >> $seqres.full
 seq 0 2 $((nr-1)) | while read f; do
-       _reflink_range "$testdir/file1" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x61 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
+       _reflink_range $testdir/file1 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
+       _pwrite_byte 0x61 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file3.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file3.chk | _filter_scratch
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * nr / 2)) $((blksz * nr / 4)) $((blksz * nr / 2))" "$testdir/file3" >> "$seqres.full"
-rm "$testdir/file3"
+cowoff=$((filesize / 4))
+cowsz=$((filesize / 2))
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
+rm $testdir/file3
 
 # success, all done
 status=0
index e034e4e897345e73a4e629e25cb3b9486a4729d3..a7f40049f16e053e3c9892bc3d49a8aab453ccce 100755 (executable)
@@ -20,8 +20,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -45,37 +45,36 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz + 17)) "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_pwrite_byte 0x61 0 $((blksz + 17)) "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2
+_pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) 17" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) 17" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) 17" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) 17" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 # success, all done
 status=0
index 2b6db7e1215c6f01da20cdfa67e179f9ccedad5a..5d9bfc440aca0b511927ab5183a88d0f1b432bf0 100755 (executable)
@@ -20,8 +20,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -45,37 +45,36 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 echo "Create the original files"
 blksz=65536
-_pwrite_byte 0x61 0 $((blksz + 17)) "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_pwrite_byte 0x61 0 $((blksz + 17)) "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2
+_pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 $blksz $blksz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $blksz $blksz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $blksz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $blksz" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 # success, all done
 status=0
index 8955e677fd2f251d8382f2eb655a0e4f7fe018ed..683849e8958a51d42f79f42d432eabe5994a5cdc 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,50 +48,49 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index 12ad7455e25ea5de23aa818be35cb72e92f64f1f..405462652c739ee87a7cffb1dcbafa0c819584d9 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,50 +48,49 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index 3e0084e5aa6674909dd41a00957353d10db93a45..d9f7e21306c0c6cbd9fbe4baf0c82e56f4370682 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,50 +49,49 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "falloc -k $blksz $blksz" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x00 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "falloc -k $blksz $blksz" $testdir/file2 >> $seqres.full
+_pwrite_byte 0x00 $blksz $blksz $testdir/file2.chk >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "falloc -k $((blksz * 3)) $blksz" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 3)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "falloc -k $((blksz * 3)) $blksz" $testdir/file2 >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index 3470d257ab6348304d65ea741237702d7860265b..b1bd635edb911e49036b2e761c51da70ec1b7f22 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,50 +49,49 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "falloc -k $blksz $blksz" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x00 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "falloc -k $blksz $blksz" $testdir/file2 >> $seqres.full
+_pwrite_byte 0x00 $blksz $blksz $testdir/file2.chk >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "falloc -k $((blksz * 3)) $blksz" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x00 $((blksz * 3)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "falloc -k $((blksz * 3)) $blksz" $testdir/file2 >> $seqres.full
+_pwrite_byte 0x00 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index 220cda31ebd50c04b05b8062c5cf1ba5332c414f..ecc009a64dd942178d66d7337f36ae9cb757808e 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,44 +49,43 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index 151bf765d54076d5ebbd9aa2f1145b897d6fbfd0..edb843293e852e34c95e315f732343a2d1698eec 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,44 +49,43 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index c95a1d6ffce2e83f064a26a36cc90ef2bec17eab..58ca8f54132e06e0b2fafdb16a2814ee7a4b042d 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,50 +49,49 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index d62ab52f9efee0101cf621641b470625ee39ddd1..abaf8f7036da6feb57a5b532983ad7c409b10022 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,50 +49,49 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 echo "Create the original files"
-_pwrite_byte 0x61 0 $pagesz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $pagesz $testdir/file1 >> $seqres.full
 
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "truncate $pagesz" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
-_reflink_range "$testdir/file1" $blksz "$testdir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 2)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 echo "CoW and unmount"
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $blksz $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $blksz $blksz $testdir/file2.chk >> $seqres.full
 
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 $((blksz * 3)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || _fail "file1 and file2 don't match."
-cmp -s "$testdir/file2" "$testdir/file2.chk" || _fail "file2 and file2.chk don't match."
+! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
+cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't match."
 
 # success, all done
 status=0
index cc86b4e7419a307eb3af96adc11ba4c422052e06..b6359e8ef8677b172208e7dccb9995b6bf7d3c43 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,21 +49,20 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 runtest() {
        echo "runtest $1 $2"
@@ -72,20 +71,20 @@ runtest() {
        dir=$3
 
        echo "Create the original files"
-       mkdir -p "$dir"
-       _pwrite_byte 0x61 0 $pagesz "$dir/file1" >> "$seqres.full"
+       mkdir -p $dir
+       _pwrite_byte 0x61 0 $pagesz $dir/file1 >> $seqres.full
 
-       "$XFS_IO_PROG" -f -c "truncate $pagesz" "$dir/file2" >> "$seqres.full"
-       "$XFS_IO_PROG" -f -c "truncate $pagesz" "$dir/file2.chk" >> "$seqres.full"
+       $XFS_IO_PROG -f -c "truncate $pagesz" $dir/file2 >> $seqres.full
+       $XFS_IO_PROG -f -c "truncate $pagesz" $dir/file2.chk >> $seqres.full
 
-       case "$b2" in
+       case $b2 in
        "regular")
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2.chk" >> "$seqres.full"
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2.chk >> $seqres.full
                ;;
        "unwritten")
-               "$XFS_IO_PROG" -f -c "falloc -k $blksz $blksz" "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x00 $blksz $blksz "$dir/file2.chk" >> "$seqres.full"
+               $XFS_IO_PROG -f -c "falloc -k $blksz $blksz" $dir/file2 >> $seqres.full
+               _pwrite_byte 0x00 $blksz $blksz $dir/file2.chk >> $seqres.full
                ;;
        "hole")
                ;;
@@ -93,45 +92,45 @@ runtest() {
 
 
 
-       case "$b4" in
+       case $b4 in
        "regular")
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2.chk" >> "$seqres.full"
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2.chk >> $seqres.full
                ;;
        "unwritten")
-               "$XFS_IO_PROG" -f -c "falloc -k $((blksz * 3)) $blksz" "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x00 $((blksz * 3)) $blksz "$dir/file2.chk" >> "$seqres.full"
+               $XFS_IO_PROG -f -c "falloc -k $((blksz * 3)) $blksz" $dir/file2 >> $seqres.full
+               _pwrite_byte 0x00 $((blksz * 3)) $blksz $dir/file2.chk >> $seqres.full
                ;;
        "hole")
                ;;
        esac
 
-       _reflink_range "$dir/file1" $blksz "$dir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x61 $((blksz * 2)) $blksz "$dir/file2.chk" >> "$seqres.full"
+       _reflink_range $dir/file1 $blksz $dir/file2 $((blksz * 2)) $blksz >> $seqres.full
+       _pwrite_byte 0x61 $((blksz * 2)) $blksz $dir/file2.chk >> $seqres.full
        _scratch_remount
 
        echo "Compare files"
-       ! cmp -s "$dir/file1" "$dir/file2" || _fail "file1 and file2 don't match."
-       cmp -s "$dir/file2" "$dir/file2.chk" || _fail "file2 and file2.chk don't match."
+       ! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
+       cmp -s $dir/file2 $dir/file2.chk || _fail "file2 and file2.chk don't match."
 
        echo "CoW and unmount"
-       if [ "$b2" = "delalloc" ]; then
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2.chk" >> "$seqres.full"
+       if [ $b2 = "delalloc" ]; then
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2.chk >> $seqres.full
        fi
 
-       if [ "$b4" = "delalloc" ]; then
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2.chk" >> "$seqres.full"
+       if [ $b4 = "delalloc" ]; then
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2.chk >> $seqres.full
        fi
 
-       "$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$dir/file2" >> "$seqres.full"
-       "$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" "$dir/file2.chk" >> "$seqres.full"
+       $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $dir/file2 >> $seqres.full
+       $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $dir/file2.chk >> $seqres.full
        _scratch_remount
 
        echo "Compare files"
-       ! cmp -s "$dir/file1" "$dir/file2" || _fail "file1 and file2 don't match."
-       cmp -s "$dir/file2" "$dir/file2.chk" || _fail "file2 and file2.chk don't match."
+       ! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
+       cmp -s $dir/file2 $dir/file2.chk || _fail "file2 and file2.chk don't match."
 }
 
 runtest regular delalloc "$testdir/r-d"
index c726770b7017979574bb8cae72d6a79c36006d60..ce7408c4e5e7c03133cf9866fec33c514b569ce0 100755 (executable)
@@ -24,8 +24,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -49,21 +49,20 @@ _supported_os Linux
 _require_scratch_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 pagesz=$(getconf PAGE_SIZE)
 blksz=$((pagesz / 4))
 
 echo "Format and mount"
-_scratch_mkfs_blocksized $blksz > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs_blocksized $blksz > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 real_blksz=$(stat -f -c '%S' $testdir)
-test "$real_blksz" != "$blksz" && _notrun "Failed to format with small blocksize."
+test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
 
 runtest() {
        echo "runtest $1 $2"
@@ -72,20 +71,20 @@ runtest() {
        dir=$3
 
        echo "Create the original files"
-       mkdir -p "$dir"
-       _pwrite_byte 0x61 0 $pagesz "$dir/file1" >> "$seqres.full"
+       mkdir -p $dir
+       _pwrite_byte 0x61 0 $pagesz $dir/file1 >> $seqres.full
 
-       "$XFS_IO_PROG" -f -c "truncate $pagesz" "$dir/file2" >> "$seqres.full"
-       "$XFS_IO_PROG" -f -c "truncate $pagesz" "$dir/file2.chk" >> "$seqres.full"
+       $XFS_IO_PROG -f -c "truncate $pagesz" $dir/file2 >> $seqres.full
+       $XFS_IO_PROG -f -c "truncate $pagesz" $dir/file2.chk >> $seqres.full
 
-       case "$b2" in
+       case $b2 in
        "regular")
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2.chk" >> "$seqres.full"
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2.chk >> $seqres.full
                ;;
        "unwritten")
-               "$XFS_IO_PROG" -f -c "falloc -k $blksz $blksz" "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x00 $blksz $blksz "$dir/file2.chk" >> "$seqres.full"
+               $XFS_IO_PROG -f -c "falloc -k $blksz $blksz" $dir/file2 >> $seqres.full
+               _pwrite_byte 0x00 $blksz $blksz $dir/file2.chk >> $seqres.full
                ;;
        "hole")
                ;;
@@ -93,45 +92,45 @@ runtest() {
 
 
 
-       case "$b4" in
+       case $b4 in
        "regular")
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2.chk" >> "$seqres.full"
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2.chk >> $seqres.full
                ;;
        "unwritten")
-               "$XFS_IO_PROG" -f -c "falloc -k $((blksz * 3)) $blksz" "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x00 $((blksz * 3)) $blksz "$dir/file2.chk" >> "$seqres.full"
+               $XFS_IO_PROG -f -c "falloc -k $((blksz * 3)) $blksz" $dir/file2 >> $seqres.full
+               _pwrite_byte 0x00 $((blksz * 3)) $blksz $dir/file2.chk >> $seqres.full
                ;;
        "hole")
                ;;
        esac
 
-       _reflink_range "$dir/file1" $blksz "$dir/file2" $((blksz * 2)) $blksz >> "$seqres.full"
-       _pwrite_byte 0x61 $((blksz * 2)) $blksz "$dir/file2.chk" >> "$seqres.full"
+       _reflink_range $dir/file1 $blksz $dir/file2 $((blksz * 2)) $blksz >> $seqres.full
+       _pwrite_byte 0x61 $((blksz * 2)) $blksz $dir/file2.chk >> $seqres.full
        _scratch_remount
 
        echo "Compare files"
-       ! cmp -s "$dir/file1" "$dir/file2" || _fail "file1 and file2 don't match."
-       cmp -s "$dir/file2" "$dir/file2.chk" || _fail "file2 and file2.chk don't match."
+       ! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
+       cmp -s $dir/file2 $dir/file2.chk || _fail "file2 and file2.chk don't match."
 
        echo "CoW and unmount"
-       if [ "$b2" = "delalloc" ]; then
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $blksz $blksz "$dir/file2.chk" >> "$seqres.full"
+       if [ $b2 = "delalloc" ]; then
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $blksz $blksz $dir/file2.chk >> $seqres.full
        fi
 
-       if [ "$b4" = "delalloc" ]; then
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2" >> "$seqres.full"
-               _pwrite_byte 0x61 $((blksz * 3)) $blksz "$dir/file2.chk" >> "$seqres.full"
+       if [ $b4 = "delalloc" ]; then
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2 >> $seqres.full
+               _pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2.chk >> $seqres.full
        fi
 
-       "$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$dir/file2" >> "$seqres.full"
-       "$XFS_IO_PROG" -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" "$dir/file2.chk" >> "$seqres.full"
+       $XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $dir/file2 >> $seqres.full
+       $XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $dir/file2.chk >> $seqres.full
        _scratch_remount
 
        echo "Compare files"
-       ! cmp -s "$dir/file1" "$dir/file2" || _fail "file1 and file2 don't match."
-       cmp -s "$dir/file2" "$dir/file2.chk" || _fail "file2 and file2.chk don't match."
+       ! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
+       cmp -s $dir/file2 $dir/file2.chk || _fail "file2 and file2.chk don't match."
 }
 
 runtest regular delalloc "$testdir/r-d"
index 1141aa472004d1c28fd53f9c6e9ceb5a70675119..1f174df210742335fcd97f277b18d8ccfaad4915 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,47 +48,48 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 blksz=65536
 nr=6400
-bsz=1280
+filesize=$((blksz * nr))
+bufnr=1280
+bufsize=$((blksz * bufnr))
 
-free_blocks=$(stat -f -c '%a' "$testdir")
-real_blksz=$(stat -f -c '%S' "$testdir")
-space_needed=$(((blksz * nr * 3) * 5 / 4))
+free_blocks=$(stat -f -c '%a' $testdir)
+real_blksz=$(stat -f -c '%S' $testdir)
+space_needed=$(((filesize * 3) * 5 / 4))
 space_avail=$((free_blocks * real_blksz))
 test $space_needed -gt $space_avail && _notrun "Not enough space. $space_avail < $space_needed"
 
 echo "Create the original files"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x61 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x61 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 # success, all done
 status=0
index a5145915294f9c0eca435101c92d2b326e496618..127070eef298a2e92fe70fd715415852bd56325c 100755 (executable)
@@ -23,8 +23,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -48,47 +48,48 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf $testdir
+testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
 
 blksz=65536
 nr=6400
-bsz=1280
+filesize=$((blksz * nr))
+bufnr=1280
+bufsize=$((blksz * bufnr))
 
-free_blocks=$(stat -f -c '%a' "$testdir")
-real_blksz=$(stat -f -c '%S' "$testdir")
-space_needed=$(((blksz * nr * 3) * 5 / 4))
+free_blocks=$(stat -f -c '%a' $testdir)
+real_blksz=$(stat -f -c '%S' $testdir)
+space_needed=$(((filesize * 3) * 5 / 4))
 space_avail=$((free_blocks * real_blksz))
 test $space_needed -gt $space_avail && _notrun "Not enough space. $space_avail < $space_needed"
 
 echo "Create the original files"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x61 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x61 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
-"$XFS_IO_PROG" -d -f -c "pwrite -S 0x63 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file2" >> "$seqres.full"
-"$XFS_IO_PROG" -f -c "pwrite -S 0x63 -b $((blksz * bsz)) 0 $((blksz * nr))" "$testdir/file2.chk" >> "$seqres.full"
+$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file2.chk" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file2.chk | _filter_scratch
 
 # success, all done
 status=0
index 392e63c5aa14e528a474bdc02de84a71d6b425e0..67a8c96ee099d817308c8f2f10cacee7debde259 100755 (executable)
@@ -21,8 +21,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f "$tmp".*
+    rm -f $tmp.*
 }
 
 # get standard environment, filters and checks
@@ -48,27 +48,26 @@ _require_scratch_reflink
 _require_cp_reflink
 
 echo "Format and mount"
-_scratch_mkfs -d size=$((2 * 4096 * 4096)) -l size=4194304 > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs -d size=$((2 * 4096 * 4096)) -l size=4194304 > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 echo "Create the original file and reflink to copy1, copy2"
-blksz="$(stat -f "$testdir" -c '%S')"
-_pwrite_byte 0x61 0 $((blksz * 14 + 71)) "$testdir/original" >> "$seqres.full"
-_cp_reflink "$testdir/original" "$testdir/copy1"
-_cp_reflink "$testdir/copy1" "$testdir/copy2"
+blksz="$(stat -f $testdir -c '%S')"
+_pwrite_byte 0x61 0 $((blksz * 14 + 71)) $testdir/original >> $seqres.full
+_cp_reflink $testdir/original $testdir/copy1
+_cp_reflink $testdir/copy1 $testdir/copy2
 
 echo "Grow fs"
-"$XFS_GROWFS_PROG" "$SCRATCH_MNT" 2>&1 |  _filter_growfs >> "$seqres.full"
+$XFS_GROWFS_PROG $SCRATCH_MNT 2>&1 |  _filter_growfs >> $seqres.full
 _scratch_remount
 
 echo "Create more reflink copies"
-_cp_reflink "$testdir/original" "$testdir/copy3"
+_cp_reflink $testdir/original $testdir/copy3
 
-xfs_info "$SCRATCH_MNT" >> "$seqres.full"
+xfs_info $SCRATCH_MNT >> $seqres.full
 
 # success, all done
 status=0
index f230adf681b475225caf9d99d9bbde2232d7c24d..56778fc07e775d9de844bcb21079896c946c49e2 100755 (executable)
@@ -21,8 +21,8 @@
 #-----------------------------------------------------------------------
 #
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f "$tmp".*
+    rm -f $tmp.*
 }
 
 # get standard environment, filters and checks
@@ -49,13 +49,12 @@ _require_scratch_reflink
 _require_cp_reflink
 
 echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
-free_blocks0=$(stat -f "$testdir" -c '%f')
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+free_blocks0=$(stat -f $testdir -c '%f')
 
 echo "Create the original file and reflink to file2, file3"
 blks=2000
@@ -63,57 +62,57 @@ margin=160
 blksz=65536
 real_blksz="$(stat -f $testdir -c '%S')"
 blksz_factor=$((blksz / real_blksz))
-_pwrite_byte 0x61 0 $((blks * blksz)) "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2"
-_cp_reflink "$testdir/file2" "$testdir/file3"
-_cp_reflink "$testdir/file3" "$testdir/file4"
+_pwrite_byte 0x61 0 $((blks * blksz)) $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2
+_cp_reflink $testdir/file2 $testdir/file3
+_cp_reflink $testdir/file3 $testdir/file4
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file4" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file4 | _filter_scratch
 
-c01=$(_md5_checksum "$testdir/file1")
-c02=$(_md5_checksum "$testdir/file2")
-c03=$(_md5_checksum "$testdir/file3")
-c04=$(_md5_checksum "$testdir/file4")
+c01=$(_md5_checksum $testdir/file1)
+c02=$(_md5_checksum $testdir/file2)
+c03=$(_md5_checksum $testdir/file3)
+c04=$(_md5_checksum $testdir/file4)
 
 echo "CoW the reflink copies"
-_pwrite_byte 0x62 $blksz $blksz "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x63 $(( blksz * (blks - 1) )) $blksz "$testdir/file3" >> "$seqres.full"
+_pwrite_byte 0x62 $blksz $blksz $testdir/file2 >> $seqres.full
+_pwrite_byte 0x63 $(( blksz * (blks - 1) )) $blksz $testdir/file3 >> $seqres.full
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file4" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file4 | _filter_scratch
 
-c11=$(_md5_checksum "$testdir/file1")
-c12=$(_md5_checksum "$testdir/file2")
-c13=$(_md5_checksum "$testdir/file3")
-c14=$(_md5_checksum "$testdir/file4")
+c11=$(_md5_checksum $testdir/file1)
+c12=$(_md5_checksum $testdir/file2)
+c13=$(_md5_checksum $testdir/file3)
+c14=$(_md5_checksum $testdir/file4)
 
 echo "Defragment"
-lsattr -l "$testdir/" | _filter_scratch | _filter_spaces
-xfs_fsr -v -d "$testdir/file1" >> "$seqres.full"
-xfs_fsr -v -d "$testdir/file2" >> "$seqres.full" # fsr probably breaks the link
-xfs_fsr -v -d "$testdir/file3" >> "$seqres.full" # fsr probably breaks the link
-xfs_fsr -v -d "$testdir/file4" >> "$seqres.full" # fsr probably ignores this file
+lsattr -l $testdir/ | _filter_scratch | _filter_spaces
+xfs_fsr -v -d $testdir/file1 >> $seqres.full
+xfs_fsr -v -d $testdir/file2 >> $seqres.full # fsr probably breaks the link
+xfs_fsr -v -d $testdir/file3 >> $seqres.full # fsr probably breaks the link
+xfs_fsr -v -d $testdir/file4 >> $seqres.full # fsr probably ignores this file
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-md5sum "$testdir/file3" | _filter_scratch
-md5sum "$testdir/file4" | _filter_scratch
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+md5sum $testdir/file3 | _filter_scratch
+md5sum $testdir/file4 | _filter_scratch
 
-c21=$(_md5_checksum "$testdir/file1")
-c22=$(_md5_checksum "$testdir/file2")
-c23=$(_md5_checksum "$testdir/file3")
-c24=$(_md5_checksum "$testdir/file4")
+c21=$(_md5_checksum $testdir/file1)
+c22=$(_md5_checksum $testdir/file2)
+c23=$(_md5_checksum $testdir/file3)
+c24=$(_md5_checksum $testdir/file4)
 
 echo "Check files"
 test $c01 = $c02 || echo "Files 1-2 do not match"
index 8d608f2b75e4af681092488e99c651fe45af5fa4..d29f842dfbd950433e487ba5ad37e3489e2c0ba9 100755 (executable)
@@ -22,7 +22,7 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
+seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
@@ -34,8 +34,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    umount "$SCRATCH_MNT" > /dev/null 2>&1
-    rm -rf "$tmp".* "$testdir" "$metadump_file" "$TEST_DIR/image"
+    umount $SCRATCH_MNT > /dev/null 2>&1
+    rm -rf $tmp.* $testdir $metadump_file $TEST_DIR/image
 }
 
 # get standard environment, filters and checks
@@ -49,39 +49,38 @@ _supported_fs xfs
 _require_loop
 _require_scratch_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 _scratch_mkfs >/dev/null 2>&1
 _scratch_mount
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
-metadump_file="$TEST_DIR/${seq}_metadump"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+metadump_file=$TEST_DIR/${seq}_metadump
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 nr_blks=$((4 * blksz / 12))
-_pwrite_byte 0x61 0 $((blksz * nr_blks)) "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/file1 >> $seqres.full
 
 echo "Reflink every other block"
 seq 1 2 $((nr_blks - 1)) | while read nr; do
-       _reflink_range  "$testdir/file1" $((nr * blksz)) \
-                       "$testdir/file2" $((nr * blksz)) $blksz >> "$seqres.full"
+       _reflink_range  $testdir/file1 $((nr * blksz)) \
+                       $testdir/file2 $((nr * blksz)) $blksz >> $seqres.full
 done
 
 echo "Create metadump file"
 _scratch_unmount
-_scratch_metadump "$metadump_file"
+_scratch_metadump $metadump_file
 
 # Now restore the obfuscated one back and take a look around
 echo "Restore metadump"
-xfs_mdrestore "$metadump_file" "$TEST_DIR/image"
-_mount -t $FSTYP "$TEST_DIR/image" "$SCRATCH_MNT"
-umount "$SCRATCH_MNT"
+xfs_mdrestore $metadump_file $TEST_DIR/image
+_mount -t $FSTYP $TEST_DIR/image $SCRATCH_MNT
+umount $SCRATCH_MNT
 
 echo "Check restored fs"
-_check_generic_filesystem "$metadump_file"
+_check_generic_filesystem $metadump_file
 
 # success, all done
 status=0
index f553a44c088b821e061dabd7d25c3b9247ce07e5..8df77fff8ab58d4fb1e2f7040b801aacd8420946 100755 (executable)
@@ -20,7 +20,7 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
+seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
@@ -32,8 +32,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    umount "$SCRATCH_MNT" > /dev/null 2>&1
-    rm -rf "$tmp".* "$testdir" "$metadump_file"
+    umount $SCRATCH_MNT > /dev/null 2>&1
+    rm -rf $tmp.* $testdir $metadump_file
 }
 
 # get standard environment, filters and checks
@@ -48,24 +48,23 @@ _require_realtime
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount scratch device"
-_scratch_mkfs >> "$seqres.full"
+_scratch_mkfs >> $seqres.full
 _scratch_mount
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
 
 echo "Create the original file blocks"
 blksz=65536
-$XFS_IO_PROG -R -f -c "truncate $blksz" "$testdir/file1"
+$XFS_IO_PROG -R -f -c "truncate $blksz" $testdir/file1
 
 echo "Reflink every block"
-_cp_reflink "$testdir/file1" "$testdir/file2" 2>&1 | _filter_scratch
+_cp_reflink $testdir/file1 $testdir/file2 2>&1 | _filter_scratch
 
-test -s "$testdir/file2" && _fail "Should not be able to reflink a realtime file."
+test -s $testdir/file2 && _fail "Should not be able to reflink a realtime file."
 
 # success, all done
 status=0
index 9c57c3b809c3c00f30c074dbe6a894ff08f61f44..cf3d64583c6702a151366413a81adc518bc81485 100755 (executable)
@@ -37,8 +37,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -49,7 +49,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -65,53 +65,54 @@ _require_test_lsattr
 _require_cp_reflink
 _require_xfs_io_command "falloc"
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
-testdir="$TEST_DIR/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
+testdir=$TEST_DIR/test-$seq
+rm -rf $testdir
+mkdir $testdir
 
 echo "Create the original file blocks"
-blksz="$(stat -f "$testdir" -c '%S')"
+blksz="$(stat -f $testdir -c '%S')"
 blks=2000
 margin=100
 sz=$((blksz * blks))
-free_blocks0=$(stat -f "$testdir" -c '%f')
+free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
+filesize=$((blksz * nr))
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
-       _cp_reflink "$testdir/file1" "$testdir/file$i"
+       _cp_reflink $testdir/file1 $testdir/file$i
 done
 _test_remount
-free_blocks1=$(stat -f "$testdir" -c '%f')
+free_blocks1=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "funshare part of a file"
-"$XFS_IO_PROG" -f -c "falloc 0 $((sz / 2))" "$testdir/file2"
+$XFS_IO_PROG -f -c "falloc 0 $((sz / 2))" $testdir/file2
 _test_remount
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "funshare some of the copies"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file2"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file3"
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file2
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file3
 _test_remount
-free_blocks2=$(stat -f "$testdir" -c '%f')
+free_blocks2=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "funshare the rest of the files"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file4"
-"$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file1"
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file4
+$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file1
 _test_remount
-free_blocks3=$(stat -f "$testdir" -c '%f')
+free_blocks3=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "Rewrite the original file"
-_pwrite_byte 0x65 0 $sz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
 _test_remount
-free_blocks4=$(stat -f "$testdir" -c '%f')
+free_blocks4=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
 
index 55dd7d0a58aaeccce5268137b927e60307a13f17..ecd88e6f519e308578df84c53bdcfb81dc9af722 100755 (executable)
@@ -21,8 +21,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -46,32 +46,31 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs -d agsize=$((32 * 1048576)) > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs -d agsize=$((32 * 1048576)) > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
-blksz="$(stat -f "$testdir" -c '%S')"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+blksz="$(stat -f $testdir -c '%S')"
 
 echo "Create the original files"
 sz=$((48 * 1048576))
 nr=$((sz / blksz))
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2" >> "$seqres.full"
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _scratch_remount
 
 echo "CoW every other block"
-_pwrite_byte 0x62 0 $sz "$testdir/file1" >> "$seqres.full"
+_pwrite_byte 0x62 0 $sz $testdir/file1 >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-md5sum "$testdir/file1" | _filter_scratch
-md5sum "$testdir/file2" | _filter_scratch
-#filefrag -v "$testdir/file1" "$testdir/file2"
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+#filefrag -v $testdir/file1 $testdir/file2
 
 # success, all done
 status=0
index a379ca79dacfd3b8d5ae901054192c7ed8eaad04..6dfe58118f9583683552f4a14e91eed6e103e0d0 100644 (file)
@@ -21,8 +21,8 @@
 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #-----------------------------------------------------------------------
 
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -33,7 +33,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -rf "$tmp".* "$testdir"
+    rm -rf $tmp.* $testdir
 }
 
 # get standard environment, filters and checks
@@ -46,39 +46,38 @@ _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
 
-rm -f "$seqres.full"
+rm -f $seqres.full
 
 echo "Format and mount"
-_scratch_mkfs -d agsize=$((32 * 1048576)) > "$seqres.full" 2>&1
-_scratch_mount >> "$seqres.full" 2>&1
+_scratch_mkfs -d agsize=$((32 * 1048576)) > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
 
-testdir="$SCRATCH_MNT/test-$seq"
-rm -rf "$testdir"
-mkdir "$testdir"
-blksz="$(stat -f -c '%S' "$testdir")"
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+blksz=$(stat -f -c '%S' $testdir)
 
 echo "Create the original files"
 sz=$((48 * 1048576))
 nr=$((sz / blksz))
-_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
-_cp_reflink "$testdir/file1" "$testdir/file2" >> "$seqres.full"
-_pwrite_byte 0x61 0 $sz "$testdir/file2.chk" >> "$seqres.full"
+_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_pwrite_byte 0x61 0 $sz $testdir/file2.chk >> $seqres.full
 _scratch_remount
 
 echo "Compare files"
-cmp -s "$testdir/file1" "$testdir/file2" || echo "file1 and file2 do not match"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+cmp -s $testdir/file1 $testdir/file2 || echo "file1 and file2 do not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 echo "CoW every other block"
 seq 1 2 $((nr - 1)) | while read f; do
-       _pwrite_byte 0x62 $((f * blksz)) $blksz "$testdir/file2" >> "$seqres.full"
-       _pwrite_byte 0x62 $((f * blksz)) $blksz "$testdir/file2.chk" >> "$seqres.full"
+       _pwrite_byte 0x62 $((f * blksz)) $blksz $testdir/file2 >> $seqres.full
+       _pwrite_byte 0x62 $((f * blksz)) $blksz $testdir/file2.chk >> $seqres.full
 done
 _scratch_remount
 
 echo "Compare files"
-! cmp -s "$testdir/file1" "$testdir/file2" || echo "file1 and file2 must not match"
-cmp -s "$testdir/file2" "$testdir/file2.chk" || echo "file2 and file2.chk do not match"
+! cmp -s $testdir/file1 $testdir/file2 || echo "file1 and file2 must not match"
+cmp -s $testdir/file2 $testdir/file2.chk || echo "file2 and file2.chk do not match"
 
 # success, all done
 status=0