xfstests: filter whitespace in 128 and 132
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 3 Feb 2016 20:59:48 +0000 (12:59 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 12 Feb 2016 17:39:04 +0000 (09:39 -0800)
Seems either I have a different lsattr version, or different mount points
cause differences in the golden output.  Send the lsattr output through
the whitespaces filter so that it works everywhere.

The lsattr output /does/ change depending on mountpoints.  Ick.  I'd
actually changed it to the long format output because line length in
the short format changes every time the flags change.

Signed-off-by: Christoph Hellwig <hch@lst.de>
[darrick.wong@oracle.com: update changelog]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
tests/xfs/128
tests/xfs/128.out
tests/xfs/132
tests/xfs/132.out

index a96291ac318b3ecf4beefdbd0aa0a2f02456c3c4..c9547fbead46379071f49ffcce338dbe7e42a8af 100755 (executable)
@@ -97,7 +97,7 @@ c13=$(_md5_checksum "$testdir/file3")
 c14=$(_md5_checksum "$testdir/file4")
 
 echo "Defragment"
-lsattr -l "$testdir/" | _filter_scratch
+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
index 7e72dcda2b872acafe12ad23e4c245619f7e895d..0ac06db2486f11a1815c4fe34100afa25657529a 100644 (file)
@@ -11,10 +11,10 @@ c650f1cf6c9f07b22e3e21ec7d49ded5  SCRATCH_MNT/test-128/file2
 56ed2f712c91e035adeeb26ed105a982  SCRATCH_MNT/test-128/file3
 b81534f439aac5c34ce3ed60a03eba70  SCRATCH_MNT/test-128/file4
 Defragment
-SCRATCH_MNT/test-128/file1          ---
-SCRATCH_MNT/test-128/file2          ---
-SCRATCH_MNT/test-128/file3          ---
-SCRATCH_MNT/test-128/file4          ---
+SCRATCH_MNT/test-128/file1 ---
+SCRATCH_MNT/test-128/file2 ---
+SCRATCH_MNT/test-128/file3 ---
+SCRATCH_MNT/test-128/file4 ---
 b81534f439aac5c34ce3ed60a03eba70  SCRATCH_MNT/test-128/file1
 c650f1cf6c9f07b22e3e21ec7d49ded5  SCRATCH_MNT/test-128/file2
 56ed2f712c91e035adeeb26ed105a982  SCRATCH_MNT/test-128/file3
index 79a6d5733799462da58eec527d655dedbc89596f..9c57c3b809c3c00f30c074dbe6a894ff08f61f44 100755 (executable)
@@ -87,32 +87,32 @@ for i in `seq 2 $nr`; do
 done
 _test_remount
 free_blocks1=$(stat -f "$testdir" -c '%f')
-lsattr -l $testdir/ | _filter_test_dir
+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"
 _test_remount
-lsattr -l $testdir/ | _filter_test_dir
+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"
 _test_remount
 free_blocks2=$(stat -f "$testdir" -c '%f')
-lsattr -l $testdir/ | _filter_test_dir
+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"
 _test_remount
 free_blocks3=$(stat -f "$testdir" -c '%f')
-lsattr -l $testdir/ | _filter_test_dir
+lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "Rewrite the original file"
 _pwrite_byte 0x65 0 $sz "$testdir/file1" >> "$seqres.full"
 _test_remount
 free_blocks4=$(stat -f "$testdir" -c '%f')
-lsattr -l $testdir/ | _filter_test_dir
+lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 #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 fd2b7bd51daed0a7acb262a7092cd87c39d7b649..f32db7dcd4e52c97fff5d0c765f71d6e6ee7318a 100644 (file)
@@ -1,30 +1,30 @@
 QA output created by 132
 Create the original file blocks
 Create the reflink copies
-TEST_DIR/test-132/file1          ---
-TEST_DIR/test-132/file2          ---
-TEST_DIR/test-132/file3          ---
-TEST_DIR/test-132/file4          ---
+TEST_DIR/test-132/file1 ---
+TEST_DIR/test-132/file2 ---
+TEST_DIR/test-132/file3 ---
+TEST_DIR/test-132/file4 ---
 funshare part of a file
-TEST_DIR/test-132/file1          ---
-TEST_DIR/test-132/file2          ---
-TEST_DIR/test-132/file3          ---
-TEST_DIR/test-132/file4          ---
+TEST_DIR/test-132/file1 ---
+TEST_DIR/test-132/file2 ---
+TEST_DIR/test-132/file3 ---
+TEST_DIR/test-132/file4 ---
 funshare some of the copies
-TEST_DIR/test-132/file1          ---
-TEST_DIR/test-132/file2          No_COW
-TEST_DIR/test-132/file3          No_COW
-TEST_DIR/test-132/file4          ---
+TEST_DIR/test-132/file1 ---
+TEST_DIR/test-132/file2 No_COW
+TEST_DIR/test-132/file3 No_COW
+TEST_DIR/test-132/file4 ---
 funshare the rest of the files
-TEST_DIR/test-132/file1          No_COW
-TEST_DIR/test-132/file2          No_COW
-TEST_DIR/test-132/file3          No_COW
-TEST_DIR/test-132/file4          No_COW
+TEST_DIR/test-132/file1 No_COW
+TEST_DIR/test-132/file2 No_COW
+TEST_DIR/test-132/file3 No_COW
+TEST_DIR/test-132/file4 No_COW
 Rewrite the original file
-TEST_DIR/test-132/file1          No_COW
-TEST_DIR/test-132/file2          No_COW
-TEST_DIR/test-132/file3          No_COW
-TEST_DIR/test-132/file4          No_COW
+TEST_DIR/test-132/file1 No_COW
+TEST_DIR/test-132/file2 No_COW
+TEST_DIR/test-132/file3 No_COW
+TEST_DIR/test-132/file4 No_COW
 free blocks after reflinking is in range
 free blocks after nocow'ing some copies is in range
 free blocks after nocow'ing all copies is in range