Skip to contentSkip to conversation

xfstests 224: Use $SCRATCH_MNT variable

PATCH In review Lukas Czerner 4 participants 6 messages Sep 29, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xfstests 224: Use $SCRATCH_MNT variable

Use $SCRATCH_MNT variable instead of hard-coded path (/mnt/scratch) in test 224.

---
 224 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
224 +1 -1
index 21be9af..00ebd2e 100644
@@ -60,7 +60,7 @@ _scratch_mount >> $seq.full 2>&1
 
 # set the reserved block pool to almost empty for XFS
 if [ "$FSTYP" = "xfs" ]; then
-	xfs_io -x -c "resblks 4" /mnt/scratch/ >> $seq.full 2>&1
+	xfs_io -x -c "resblks 4" $SCRATCH_MNT >> $seq.full 2>&1
 fi
 
 FILES=1000
Signature · 6 lines
1.7.2.3

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

PATCH 2/2 xfstests: Use $MKFS_OPTIONS in _scratch_mkfs_*()

Pass MKFS_OPTIONS to mkfs.$FSTYP in _scratch_mkfs_sized(). Preserve user defined MKFS_OPTIONS in _scratch_mkfs_geom().

---
 common.rc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
common.rc +3 -3
index 65989c1..52b7125 100644
@@ -327,7 +327,7 @@ _scratch_mkfs_sized()
 	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
 	;;
     ext2|ext3|ext4)
-	/sbin/mkfs.$FSTYP -b $blocksize $SCRATCH_DEV $blocks
+	/sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
 	;;
     *)
 	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
@@ -349,10 +349,10 @@ _scratch_mkfs_geom()
 
     case $FSTYP in
     xfs)
-	MKFS_OPTIONS="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
+	MKFS_OPTIONS+="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
 	;;
     ext4)
-	MKFS_OPTIONS="-b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks"
+	MKFS_OPTIONS+="-b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks"
 	;;
     *)
 	_notrun "can't mkfs $FSTYP with geometry"
Signature · 6 lines
1.7.2.3

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

Re: [PATCH 2/2] xfstests: Use $MKFS_OPTIONS in _scratch_mkfs_*()

Quoted 3 lines · Lukas Czerner

Pass MKFS_OPTIONS to mkfs.$FSTYP in _scratch_mkfs_sized(). Preserve user defined MKFS_OPTIONS in _scratch_mkfs_geom().
---

thanks, this looks good too. both are committed now.

-Eric

Quoted 19 lines
 common.rc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
common.rc +1 -1
index 65989c1..52b7125 100644
@@ -327,7 +327,7 @@ _scratch_mkfs_sized()
 	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
 	;;
     ext2|ext3|ext4)
-	/sbin/mkfs.$FSTYP -b $blocksize $SCRATCH_DEV $blocks
+	/sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
 	;;
     *)
 	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
@@ -349,10 +349,10 @@ _scratch_mkfs_geom()
 
     case $FSTYP in

common.rc _scratch_mkfs_geom() · line 358

Quoted 10 lines
common.rc +2 -2
     xfs)
-	MKFS_OPTIONS="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
+	MKFS_OPTIONS+="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
 	;;
     ext4)
-	MKFS_OPTIONS="-b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks"
+	MKFS_OPTIONS+="-b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks"
 	;;
     *)
 	_notrun "can't mkfs $FSTYP with geometry"

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

#3 lore raw

Re: [PATCH 2/2] xfstests: Use $MKFS_OPTIONS in _scratch_mkfs_*()

In reply to Lukas Czerner
Quoted 7 lines · Lukas Czerner

Pass MKFS_OPTIONS to mkfs.$FSTYP in _scratch_mkfs_sized(). Preserve user defined MKFS_OPTIONS in _scratch_mkfs_geom().

---
 common.rc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
common.rc +0 -0

[...]

common.rc _scratch_mkfs_geom() · line 352

Quoted 4 lines

case $FSTYP in
xfs)

common.rc +1 -1
-	MKFS_OPTIONS="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
+	MKFS_OPTIONS+="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"

common.rc uses /bin/sh and += notation is a bashizm. Won't work on strict posix shells.

Signature · 7 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

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

Re: [PATCH 2/2] xfstests: Use $MKFS_OPTIONS in _scratch_mkfs_*()

Quoted 9 lines · Arkadiusz Miskiewicz
Quoted 7 lines · Lukas Czerner

Pass MKFS_OPTIONS to mkfs.$FSTYP in _scratch_mkfs_sized(). Preserve user defined MKFS_OPTIONS in _scratch_mkfs_geom().

---
 common.rc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
common.rc +0 -0

[...]

Quoted 7 lines

common.rc _scratch_mkfs_geom() · line 352

Quoted 4 lines

case $FSTYP in
xfs)

common.rc +1 -1
-	MKFS_OPTIONS="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
+	MKFS_OPTIONS+="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"

common.rc uses /bin/sh and += notation is a bashizm. Won't work on strict posix shells.

We've converted all of xfstests to use bash rather than bin/sh because of all the bashisms in the code, so this is fine.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/2
#5 lore raw
In reply to Lukas Czerner
Quoted 2 lines · Lukas Czerner

Use $SCRATCH_MNT variable instead of hard-coded path (/mnt/scratch) in test 224.

heh, whoops!

I'll commit it.

Quoted 9 lines
---
 224 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
224 +0 -0
index 21be9af..00ebd2e 100644

224 _scratch_mount >> $seq.full 2>&1 · line 66

Quoted 8 lines
224 +1 -1
@@ -60,7 +60,7 @@ _scratch_mount >> $seq.full 2>&1
 
 # set the reserved block pool to almost empty for XFS
 if [ "$FSTYP" = "xfs" ]; then
-	xfs_io -x -c "resblks 4" /mnt/scratch/ >> $seq.full 2>&1
+	xfs_io -x -c "resblks 4" $SCRATCH_MNT >> $seq.full 2>&1
 fi
 
 FILES=1000

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