All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: Assume yes when test device is not partitioned
@ 2011-09-03  8:33 ` Prasad Joshi
  0 siblings, 0 replies; 8+ messages in thread
From: Prasad Joshi @ 2011-09-03  8:33 UTC (permalink / raw)
  To: prasadjoshi.linux; +Cc: Chaitanya Kulkarni, xfs, linux-ext4

If an entire device used for file system creation, the mkfs.ext2/3/4
asks for confirmation before proceeding. Since the device is
configured for testing it is safe to assume positive response
during mkfs.

The patch also replaces hard coded mkfs path with MKFS_PROG variable.

Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
---
 032       |    4 ++--
 049       |    2 +-
 073       |    2 +-
 common.rc |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/032 b/032
index 4261ca2..bf88492 100755
--- a/032
+++ b/032
@@ -45,7 +45,7 @@ _require_nobigloopfs
 _require_scratch
 
 echo "Silence is golden."
-for fs in `echo /sbin/mkfs.* | sed -e 's/.sbin.mkfs.//g'`
+for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
 do
 	preop=""	# for special input needs
 	preargs=""	# for any special pre-device options
@@ -78,7 +78,7 @@ do
 	if [ $? -eq 0 ] ; then
 		# next, ensure we don't overwrite it
 		echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
-		/sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
+		${MKFS_PROG}.xfs $SCRATCH_DEV >>$seq.full 2>&1
 
 		[ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
 	else
diff --git a/049 b/049
index c6c4faa..8d4a22f 100755
--- a/049
+++ b/049
@@ -83,7 +83,7 @@ mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seq.full 2>&1 \
     || _fail "!!! failed to mount"
 
 _log "Create xfs fs in file on scratch"
-/sbin/mkfs.xfs -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
+${MKFS_PROG}.xfs -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
     >> $seq.full 2>&1 \
     || _fail "!!! failed to mkfs xfs"
 
diff --git a/073 b/073
index 18257d4..fc0951f 100755
--- a/073
+++ b/073
@@ -155,7 +155,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
 
 echo 
 echo === copying scratch device to single target, large ro device
-/sbin/mkfs.xfs -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
+${MKFS_PROG}.xfs -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
 rmdir $imgs.source_dir 2>/dev/null
 mkdir $imgs.source_dir
 
diff --git a/common.rc b/common.rc
index 35f782b..a356c02 100644
--- a/common.rc
+++ b/common.rc
@@ -314,7 +314,7 @@ _scratch_mkfs()
         $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null
 	;;
     *)
-	/sbin/mkfs -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
+	yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
 	;;
     esac
 }
@@ -333,7 +333,7 @@ _scratch_mkfs_sized()
 	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
 	;;
     ext2|ext3|ext4|ext4dev)
-	/sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
+	yes | ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
 	;;
     btrfs)
 	$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] xfstests: Assume yes when test device is not partitioned
@ 2011-09-03  8:33 ` Prasad Joshi
  0 siblings, 0 replies; 8+ messages in thread
From: Prasad Joshi @ 2011-09-03  8:33 UTC (permalink / raw)
  To: prasadjoshi.linux; +Cc: linux-ext4, Chaitanya Kulkarni, xfs

If an entire device used for file system creation, the mkfs.ext2/3/4
asks for confirmation before proceeding. Since the device is
configured for testing it is safe to assume positive response
during mkfs.

The patch also replaces hard coded mkfs path with MKFS_PROG variable.

Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
---
 032       |    4 ++--
 049       |    2 +-
 073       |    2 +-
 common.rc |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/032 b/032
index 4261ca2..bf88492 100755
--- a/032
+++ b/032
@@ -45,7 +45,7 @@ _require_nobigloopfs
 _require_scratch
 
 echo "Silence is golden."
-for fs in `echo /sbin/mkfs.* | sed -e 's/.sbin.mkfs.//g'`
+for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
 do
 	preop=""	# for special input needs
 	preargs=""	# for any special pre-device options
@@ -78,7 +78,7 @@ do
 	if [ $? -eq 0 ] ; then
 		# next, ensure we don't overwrite it
 		echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
-		/sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
+		${MKFS_PROG}.xfs $SCRATCH_DEV >>$seq.full 2>&1
 
 		[ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
 	else
diff --git a/049 b/049
index c6c4faa..8d4a22f 100755
--- a/049
+++ b/049
@@ -83,7 +83,7 @@ mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seq.full 2>&1 \
     || _fail "!!! failed to mount"
 
 _log "Create xfs fs in file on scratch"
-/sbin/mkfs.xfs -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
+${MKFS_PROG}.xfs -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
     >> $seq.full 2>&1 \
     || _fail "!!! failed to mkfs xfs"
 
diff --git a/073 b/073
index 18257d4..fc0951f 100755
--- a/073
+++ b/073
@@ -155,7 +155,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
 
 echo 
 echo === copying scratch device to single target, large ro device
-/sbin/mkfs.xfs -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
+${MKFS_PROG}.xfs -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
 rmdir $imgs.source_dir 2>/dev/null
 mkdir $imgs.source_dir
 
diff --git a/common.rc b/common.rc
index 35f782b..a356c02 100644
--- a/common.rc
+++ b/common.rc
@@ -314,7 +314,7 @@ _scratch_mkfs()
         $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null
 	;;
     *)
-	/sbin/mkfs -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
+	yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
 	;;
     esac
 }
@@ -333,7 +333,7 @@ _scratch_mkfs_sized()
 	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
 	;;
     ext2|ext3|ext4|ext4dev)
-	/sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
+	yes | ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
 	;;
     btrfs)
 	$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
-- 
1.7.4.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: Assume yes when test device is not partitioned
  2011-09-03  8:33 ` Prasad Joshi
@ 2011-09-22 21:14   ` Alex Elder
  -1 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2011-09-22 21:14 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: linux-ext4, Chaitanya Kulkarni, xfs

On Sat, 2011-09-03 at 14:03 +0530, Prasad Joshi wrote:
> If an entire device used for file system creation, the mkfs.ext2/3/4
> asks for confirmation before proceeding. Since the device is
> configured for testing it is safe to assume positive response
> during mkfs.
> 
> The patch also replaces hard coded mkfs path with MKFS_PROG variable.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>

Thanks for submitting a patch, Prasad (and Chaitanya).

Can you please re-submit this?  Based on feedback what
we're looking for would be:
[PATCH 0/2] description e-mail
[PATCH 1/2] patch that substitutes /sbin/mkfs with ${MKFS_PROG}
[PATCH 2/2] patch that adds a '-f' flag to ${MKFS_PROG}.${FSTYP}
            for all ext* filesystem types.

Thanks.

					-Alex



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: Assume yes when test device is not partitioned
@ 2011-09-22 21:14   ` Alex Elder
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2011-09-22 21:14 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: linux-ext4, Chaitanya Kulkarni, xfs

On Sat, 2011-09-03 at 14:03 +0530, Prasad Joshi wrote:
> If an entire device used for file system creation, the mkfs.ext2/3/4
> asks for confirmation before proceeding. Since the device is
> configured for testing it is safe to assume positive response
> during mkfs.
> 
> The patch also replaces hard coded mkfs path with MKFS_PROG variable.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>

Thanks for submitting a patch, Prasad (and Chaitanya).

Can you please re-submit this?  Based on feedback what
we're looking for would be:
[PATCH 0/2] description e-mail
[PATCH 1/2] patch that substitutes /sbin/mkfs with ${MKFS_PROG}
[PATCH 2/2] patch that adds a '-f' flag to ${MKFS_PROG}.${FSTYP}
            for all ext* filesystem types.

Thanks.

					-Alex


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: Assume yes when test device is not partitioned
  2011-09-22 21:14   ` Alex Elder
@ 2011-09-22 22:02     ` Alex Elder
  -1 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2011-09-22 22:02 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: linux-ext4, Chaitanya Kulkarni, xfs

On Thu, 2011-09-22 at 16:14 -0500, Alex Elder wrote:
> On Sat, 2011-09-03 at 14:03 +0530, Prasad Joshi wrote:
> > If an entire device used for file system creation, the mkfs.ext2/3/4
> > asks for confirmation before proceeding. Since the device is
> > configured for testing it is safe to assume positive response
> > during mkfs.
> > 
> > The patch also replaces hard coded mkfs path with MKFS_PROG variable.
> > 
> > Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
> > Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
> 
> Thanks for submitting a patch, Prasad (and Chaitanya).
> 
> Can you please re-submit this?  Based on feedback what
> we're looking for would be:
> [PATCH 0/2] description e-mail
> [PATCH 1/2] patch that substitutes /sbin/mkfs with ${MKFS_PROG}
> [PATCH 2/2] patch that adds a '-f' flag to ${MKFS_PROG}.${FSTYP}
>             for all ext* filesystem types.


Oh, and while I'm thinking about it...

/sbin/mkfs.${FSTYP} and ${MKFS_PROG}.${FSTYP} are most likely
incorrect.  The switch to MKFS_PROG at least finds where the
mkfs executable lies, but in theory anyway there is no guarantee
that, for example, the mkfs.xfs program lies in the same directory.
The mkfs executable uses the PATH (via execvp()) to find the
filesystem-specific mkfs program to use, and I expect we should
work the same way.

					-Alex




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: Assume yes when test device is not partitioned
@ 2011-09-22 22:02     ` Alex Elder
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2011-09-22 22:02 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: linux-ext4, Chaitanya Kulkarni, xfs

On Thu, 2011-09-22 at 16:14 -0500, Alex Elder wrote:
> On Sat, 2011-09-03 at 14:03 +0530, Prasad Joshi wrote:
> > If an entire device used for file system creation, the mkfs.ext2/3/4
> > asks for confirmation before proceeding. Since the device is
> > configured for testing it is safe to assume positive response
> > during mkfs.
> > 
> > The patch also replaces hard coded mkfs path with MKFS_PROG variable.
> > 
> > Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
> > Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
> 
> Thanks for submitting a patch, Prasad (and Chaitanya).
> 
> Can you please re-submit this?  Based on feedback what
> we're looking for would be:
> [PATCH 0/2] description e-mail
> [PATCH 1/2] patch that substitutes /sbin/mkfs with ${MKFS_PROG}
> [PATCH 2/2] patch that adds a '-f' flag to ${MKFS_PROG}.${FSTYP}
>             for all ext* filesystem types.


Oh, and while I'm thinking about it...

/sbin/mkfs.${FSTYP} and ${MKFS_PROG}.${FSTYP} are most likely
incorrect.  The switch to MKFS_PROG at least finds where the
mkfs executable lies, but in theory anyway there is no guarantee
that, for example, the mkfs.xfs program lies in the same directory.
The mkfs executable uses the PATH (via execvp()) to find the
filesystem-specific mkfs program to use, and I expect we should
work the same way.

					-Alex



_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: xfstests: Assume yes when test device is not partitioned
  2011-09-03  8:33 ` Prasad Joshi
@ 2012-10-26 15:54   ` Rich Johnston
  -1 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2012-10-26 15:54 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: linux-ext4, Chaitanya Kulkarni, xfs

On 09/03/2011 03:33 AM, Prasad Joshi wrote:
> If an entire device used for file system creation, the mkfs.ext2/3/4
> asks for confirmation before proceeding. Since the device is
> configured for testing it is safe to assume positive response
> during mkfs.
>
> The patch also replaces hard coded mkfs path with MKFS_PROG variable.
>
> Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
>
> ---
> 032       |    4 ++--
>   049       |    2 +-
>   073       |    2 +-
>   common.rc |    4 ++--
>   4 files changed, 6 insertions(+), 6 deletions(-)
>
Looks good

Reviewed-by: Rich Johnston <rjohnston@sgi.com>

Prasad,

This patch has been committed to git://oss.sgi.com/xfs/cmds/xfstests, 
master branch, commit ID 9ea06dce.

Thanks
--Rich

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: xfstests: Assume yes when test device is not partitioned
@ 2012-10-26 15:54   ` Rich Johnston
  0 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2012-10-26 15:54 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: linux-ext4, Chaitanya Kulkarni, xfs

On 09/03/2011 03:33 AM, Prasad Joshi wrote:
> If an entire device used for file system creation, the mkfs.ext2/3/4
> asks for confirmation before proceeding. Since the device is
> configured for testing it is safe to assume positive response
> during mkfs.
>
> The patch also replaces hard coded mkfs path with MKFS_PROG variable.
>
> Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
>
> ---
> 032       |    4 ++--
>   049       |    2 +-
>   073       |    2 +-
>   common.rc |    4 ++--
>   4 files changed, 6 insertions(+), 6 deletions(-)
>
Looks good

Reviewed-by: Rich Johnston <rjohnston@sgi.com>

Prasad,

This patch has been committed to git://oss.sgi.com/xfs/cmds/xfstests, 
master branch, commit ID 9ea06dce.

Thanks
--Rich

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-26 15:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-03  8:33 [PATCH] xfstests: Assume yes when test device is not partitioned Prasad Joshi
2011-09-03  8:33 ` Prasad Joshi
2011-09-22 21:14 ` Alex Elder
2011-09-22 21:14   ` Alex Elder
2011-09-22 22:02   ` Alex Elder
2011-09-22 22:02     ` Alex Elder
2012-10-26 15:54 ` Rich Johnston
2012-10-26 15:54   ` Rich Johnston

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.