Skip to contentSkip to conversation

common: Filter out lost+found directory from _ls_l() output

PATCH In review Lukas Czerner 2 participants 4 messages Dec 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 common: Filter out lost+found directory from _ls_l() output

---
 common/rc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/rc +2 -1
index 5f61d57..7a168e9 100644
@@ -74,10 +74,11 @@ _md5_checksum()
 
 # ls -l w/ selinux sometimes puts a dot at the end:
 # -rwxrw-r--. id1 id2 file1
+# Also filter out lost+found directory on extN file system if present
 
 _ls_l()
 {
-	ls -l $* | sed "s/\(^[-rwxdlbcpsStT]*\)\. /\1 /"
+	ls -l $* | sed "s/\(^[-rwxdlbcpsStT]*\)\. /\1 /" | grep -v 'lost+found'
 }
 
 _mount_opts()
Signature · 6 lines
1.8.3.1

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

PATCH 2/3 xfstests 322: use _filter_scratch()

---
 tests/generic/322     | 8 ++++----
 tests/generic/322.out | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
tests/generic/322 +4 -4
index 1cea133..94f8f68 100644
@@ -65,12 +65,12 @@ _rename_test()
 	mv $SCRATCH_MNT/foo $SCRATCH_MNT/bar
 	$XFS_IO_PROG -c "fsync" $SCRATCH_MNT/bar
 	_load_flakey_table $FLAKEY_DROP_WRITES
-	md5sum $SCRATCH_MNT/bar
+	md5sum $SCRATCH_MNT/bar | _filter_scratch
 	_unmount_flakey
 
 	_load_flakey_table $FLAKEY_ALLOW_WRITES
 	_mount_flakey
-	md5sum $SCRATCH_MNT/bar
+	md5sum $SCRATCH_MNT/bar | _filter_scratch
 	_unmount_flakey
 	_check_scratch_fs $FLAKEY_DEV
 	[ $? -ne 0 ] && _fatal "fsck failed"
@@ -87,12 +87,12 @@ _write_after_fsync_rename_test()
 	mv $SCRATCH_MNT/foo $SCRATCH_MNT/bar
 	$XFS_IO_PROG -c "fsync" $SCRATCH_MNT/bar
 	_load_flakey_table $FLAKEY_DROP_WRITES
-	md5sum $SCRATCH_MNT/bar
+	md5sum $SCRATCH_MNT/bar | _filter_scratch
 	_unmount_flakey
 
 	_load_flakey_table $FLAKEY_ALLOW_WRITES
 	_mount_flakey
-	md5sum $SCRATCH_MNT/bar
+	md5sum $SCRATCH_MNT/bar | _filter_scratch
 	_unmount_flakey
 	_check_scratch_fs $FLAKEY_DEV
 	[ $? -ne 0 ] && _fatal "fsck failed"
tests/generic/322.out +4 -4
index 0d9f274..a23f890 100644
@@ -1,7 +1,7 @@
 QA output created by 322
 fsync rename test
-ca539970d4b1fa1f34213ba675007381  /mnt/scratch/bar
-ca539970d4b1fa1f34213ba675007381  /mnt/scratch/bar
+ca539970d4b1fa1f34213ba675007381  SCRATCH_MNT/bar
+ca539970d4b1fa1f34213ba675007381  SCRATCH_MNT/bar
 fsync rename test
-d34ff04c17ef7068d78d0c4be49cfe57  /mnt/scratch/bar
-d34ff04c17ef7068d78d0c4be49cfe57  /mnt/scratch/bar
+d34ff04c17ef7068d78d0c4be49cfe57  SCRATCH_MNT/bar
+d34ff04c17ef7068d78d0c4be49cfe57  SCRATCH_MNT/bar
Signature · 6 lines
1.8.3.1

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

PATCH 3/3 xfstests 321, 322: do not remove lost+found

In reply to Lukas Czerner
---
 tests/generic/321 | 2 +-
 tests/generic/322 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/generic/321 +1 -1
index 1d17147..345416c 100644
@@ -51,7 +51,7 @@ rm -f $seqres.full
 _clean_working_dir()
 {
 	_mount_flakey
-	rm -rf $SCRATCH_MNT/*
+	rm -rf $SCRATCH_MNT/foo $SCRATCH_MNT/bar
 	_unmount_flakey
 }
 
tests/generic/322 +1 -1
index 94f8f68..c43fcb1 100644
@@ -51,7 +51,7 @@ rm -f $seqres.full
 _clean_working_dir()
 {
 	_mount_flakey
-	rm -rf $SCRATCH_MNT/*
+	rm -rf $SCRATCH_MNT/foo $SCRATCH_MNT/bar
 	_unmount_flakey
 }
 
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw
In reply to Lukas Czerner

Hi Lukas,

I guess this patchset lacks a cover letter you might have forgotten to add? despite the first patch which is easier to understand the reason due the comment you added to the own patch, the purpose of the remaining patches are not clear.

Quoted 29 lines · Lukas Czerner
---
 common/rc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/rc +2 -1
index 5f61d57..7a168e9 100644
@@ -74,10 +74,11 @@ _md5_checksum()
 
 # ls -l w/ selinux sometimes puts a dot at the end:
 # -rwxrw-r--. id1 id2 file1
+# Also filter out lost+found directory on extN file system if present
 
 _ls_l()
 {
-	ls -l $* | sed "s/\(^[-rwxdlbcpsStT]*\)\. /\1 /"
+	ls -l $* | sed "s/\(^[-rwxdlbcpsStT]*\)\. /\1 /" | grep -v 'lost+found'
 }
 
 _mount_opts()
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Signature · 6 lines
Carlos

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