Skip to contentSkip to conversation

xfstests: generic/314 filter out total from ls -l output

PATCH In review Josef Bacik 2 participants 2 messages Jul 26, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: generic/314 filter out total from ls -l output

ls -l will show the nblocks for the directory, and this made it into the golden output for 314. The problem is nblocks is 0 for btrfs directories because we're awesome, which makes us fail this test. So filter out the "total blah" line of ls -l so btrfs can pass this test too. Thanks,

---
 tests/generic/314     |    2 +-
 tests/generic/314.out |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)
tests/generic/314 +1 -1
index 2d34ea8..0dd98a3 100644
@@ -62,7 +62,7 @@ su $qa_user -c "setfacl -m u:$qa_user:rwx,d:u:$qa_user:rwx $TEST_DIR/$seq-dir"
 su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir2"
 
 # Both subdirs should have inherited sgid
-_ls_l $TEST_DIR/$seq-dir/ | _filter_test_dir | awk '{print $1,$NF}'
+_ls_l $TEST_DIR/$seq-dir/ | grep -v total | _filter_test_dir | awk '{print $1,$NF}'
 
 status=0
 exit
tests/generic/314.out +0 -1
index 180be80..b2db82b 100644
@@ -1,4 +1,3 @@
 QA output created by 314
-total 4
 drwxr-sr-x subdir
 drwxrwsr-x+ subdir2
Signature · 1 line
1.7.7.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Josef Bacik

ls -l will show the nblocks for the directory, and this made it into the golden output for 314. The problem is nblocks is 0 for btrfs directories because we're awesome, which makes us fail this test. So filter out the "total blah" line of ls -l so btrfs can pass this test too. Thanks,

I don't know for sure that that makes brtfs awesome ;), but its' not what we're testing here, so ignoring it seems reasonable.

Quoted 24 lines
---
 tests/generic/314     |    2 +-
 tests/generic/314.out |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)
tests/generic/314 +1 -1
index 2d34ea8..0dd98a3 100644
@@ -62,7 +62,7 @@ su $qa_user -c "setfacl -m u:$qa_user:rwx,d:u:$qa_user:rwx $TEST_DIR/$seq-dir"
 su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir2"
 
 # Both subdirs should have inherited sgid
-_ls_l $TEST_DIR/$seq-dir/ | _filter_test_dir | awk '{print $1,$NF}'
+_ls_l $TEST_DIR/$seq-dir/ | grep -v total | _filter_test_dir | awk '{print $1,$NF}'
 
 status=0
 exit
tests/generic/314.out +0 -0
index 180be80..b2db82b 100644

tests/generic/314.out line 3

Quoted 4 lines
tests/generic/314.out +0 -1
@@ -1,4 +1,3 @@
 QA output created by 314
-total 4
 drwxr-sr-x subdir
 drwxrwsr-x+ subdir2

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs