Skip to contentSkip to conversation

xfstests README: added 'make install' to building steps

PATCH Superseded Tom Marek 2 participants 4 messages Apr 25, 2012 – May 15, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tom Marek

author
#0 lore raw

PATCH 1/2 xfstests README: added 'make install' to building steps

There was no mention of 'make install' step in the README file. Run make install added to section 'Building Linux'.

---
 README |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
README +3 -1
index 0f52f02..d81ede9 100644
@@ -3,7 +3,9 @@ BUILDING THE FSQA SUITE
 _______________________
 
 Building Linux:
-	- cd into the xfstests directory and run make.
+	- cd into the xfstests directory
+	- run make
+	- run make install
 	
 Building IRIX:
 	- cd into the xfstests directory 
Signature · 6 lines
1.7.7.6

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

PATCH 2/2 xfstests 273: fix of reading scratch size and removing lost+found

There were two reasons why test 273 was failing. Firstrly, when running on ext4 fs it was removing everything from SCRATCH_MNT directory at the beginning of tests including the lost+found directory. This caused error while checking scratch fs after finishing test. Secondly, obtaining of the partition size was not counting with with behaviour of df utility which may split the line containg informations about one partition when it is too long thus it may have returned nothing.

First problem was solved with removing all rm -rf commands and the second one was fixed with alternative awk script which is able to deal with any line splitting possible. Also 'umount $SCRATCH_DEV' was substituted for '_scratch_unmount'.

---
 273 |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
273 +3 -5
index 2965132..8636241 100755
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
 	cd /
-	rm -rf $SCRATCH_MNT/* $tmp.*
+	rm -rf $tmp.* $SCRATCH_MNT/origin $SCRATCH_MNT/sub*
 	_scratch_unmount
 }
 
@@ -68,7 +68,7 @@ _file_create()
 
 	cd $SCRATCH_MNT/origin
 
-	_disksize=`df --block-size=1 | grep $SCRATCH_DEV | awk '{print $2}'`
+	_disksize=`df --block-size=1 $SCRATCH_DEV | awk -v sd=$SCRATCH_DEV 'BEGIN{c=0}{for(i=1;i<=NF;++i){a[c]=$i;++c}}END{for(entry in a){if(a[entry] ~ sd){print a[entry + 3]; break}}}'`
 	_disksize=$(($_disksize / 3))
 	_num=$(($_disksize / $count / $threads / 4096))
 	_count=$count
@@ -106,8 +106,6 @@ _do_workload()
 	_pids=""
 	_pid=1
 	
-	rm -rf $SCRATCH_MNT/*
-
 	_threads_set
 	_file_create
 
@@ -134,7 +132,7 @@ echo "------------------------------"
 
 rm -f $seq.full
 
-umount $SCRATCH_DEV 2>/dev/null
+_scratch_unmount 2>/dev/null
 _scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seq.full 2>&1
 _scratch_mount
 
Signature · 6 lines
1.7.7.6

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

Re: [PATCH 2/2] xfstests 273: fix of reading scratch size and removing lost+found

Quoted 23 lines · Tom Marek

There were two reasons why test 273 was failing. Firstrly, when running on ext4 fs it was removing everything from SCRATCH_MNT directory at the beginning of tests including the lost+found directory. This caused error while checking scratch fs after finishing test. Secondly, obtaining of the partition size was not counting with with behaviour of df utility which may split the line containg informations about one partition when it is too long thus it may have returned nothing.

First problem was solved with removing all rm -rf commands and the second one was fixed with alternative awk script which is able to deal with any line splitting possible. Also 'umount $SCRATCH_DEV' was substituted for '_scratch_unmount'.

---
 273 |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
273 +0 -0
index 2965132..8636241 100755

273 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 38

Quoted 5 lines
273 +1 -1
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
 	cd /
-	rm -rf $SCRATCH_MNT/* $tmp.*
+	rm -rf $tmp.* $SCRATCH_MNT/origin $SCRATCH_MNT/sub*

Why remove anything at all from $SCRATCH_MNT? It'll get re-mkfs'd next time it's used anyway.

Other than that, patch seems fine.

Quoted 22 lines
273 +1 -3
 	_scratch_unmount
 }
 
@@ -68,7 +68,7 @@ _file_create()
 
 	cd $SCRATCH_MNT/origin
 
-	_disksize=`df --block-size=1 | grep $SCRATCH_DEV | awk '{print $2}'`
+	_disksize=`df --block-size=1 $SCRATCH_DEV | awk -v sd=$SCRATCH_DEV 'BEGIN{c=0}{for(i=1;i<=NF;++i){a[c]=$i;++c}}END{for(entry in a){if(a[entry] ~ sd){print a[entry + 3]; break}}}'`
 	_disksize=$(($_disksize / 3))
 	_num=$(($_disksize / $count / $threads / 4096))
 	_count=$count
@@ -106,8 +106,6 @@ _do_workload()
 	_pids=""
 	_pid=1
 
-	rm -rf $SCRATCH_MNT/*
-
 	_threads_set
 	_file_create
 

273 echo "------------------------------" · line 138

Quoted 8 lines
273 +1 -1
@@ -134,7 +132,7 @@ echo "------------------------------"
 
 rm -f $seq.full
 
-umount $SCRATCH_DEV 2>/dev/null
+_scratch_unmount 2>/dev/null
 _scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seq.full 2>&1
 _scratch_mount
 

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

#3 lore raw
In reply to Tom Marek
Quoted 2 lines · Tom Marek

There was no mention of 'make install' step in the README file. Run make install added to section 'Building Linux'.

Ok, I'll merge this. TBH I've never run "make install" ;)

-Eric

Quoted 10 lines
---
 README |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
README +0 -0
index 0f52f02..d81ede9 100644

README BUILDING THE FSQA SUITE · line 11

Quoted 10 lines
README +3 -1
@@ -3,7 +3,9 @@ BUILDING THE FSQA SUITE
 _______________________
 
 Building Linux:
-	- cd into the xfstests directory and run make.
+	- cd into the xfstests directory
+	- run make
+	- run make install
 
 Building IRIX:
 	- cd into the xfstests directory 

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