* [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs
@ 2013-03-13 16:01 Eric Sandeen
2013-03-15 17:07 ` Rich Johnston
2013-03-15 17:11 ` Rich Johnston
0 siblings, 2 replies; 5+ messages in thread
From: Eric Sandeen @ 2013-03-13 16:01 UTC (permalink / raw)
To: xfs-oss, linux-btrfs
Now that btrfs has an "-f" arg, we can test that it doesn't
improperly overwrite other filesystems in 032 like we do
for xfs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/032 b/032
index bf88492..89fb225 100755
--- a/032
+++ b/032
@@ -38,12 +38,18 @@ rm -f $seq.full
. ./common.filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs xfs btrfs
_supported_os Linux
_require_nobigloopfs
_require_scratch
+# mkfs.btrfs did not have overwrite detection at first
+if [ "$FSTYP" == "btrfs" ]; then
+ grep -q 'force overwrite' `echo $MKFS_BTRFS_PROG | awk '{print $1}'` || \
+ _notrun "Installed mkfs.btrfs does not support -f option"
+fi
+
echo "Silence is golden."
for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
do
@@ -61,7 +67,7 @@ do
[ $fs = gfs2 ] && preop="echo y |" && preargs="-p lock_nolock -j 1"
[ $fs = reiserfs ] && preop="echo y |" && preargs="-f"
# cramfs mkfs requires a directory argument
- [ $fs = cramfs ] && preargs=/proc/fs/xfs
+ [ $fs = cramfs ] && preargs=/proc/fs
[ $fs = ext2 ] && preargs="-F"
[ $fs = ext3 ] && preargs="-F"
[ $fs = ext4 ] && preargs="-F"
@@ -77,8 +83,8 @@ do
if [ $? -eq 0 ] ; then
# next, ensure we don't overwrite it
- echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
- ${MKFS_PROG}.xfs $SCRATCH_DEV >>$seq.full 2>&1
+ echo "=== Attempting $FSTYP overwrite of $fs..." >>$seq.full
+ ${MKFS_PROG}.$FSTYP $SCRATCH_DEV >>$seq.full 2>&1
[ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
else
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs
2013-03-13 16:01 [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs Eric Sandeen
@ 2013-03-15 17:07 ` Rich Johnston
2013-03-15 17:12 ` Eric Sandeen
2013-03-15 17:11 ` Rich Johnston
1 sibling, 1 reply; 5+ messages in thread
From: Rich Johnston @ 2013-03-15 17:07 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss, linux-btrfs
Eric,
Thanks once more for the patch. Once I finally got the correct version
of mkfs.btrfs this looks good.
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Interesting that the default make install of btrfs-progs did not install
over my btrfsprogs rpm.
Was running SLES11 SP2 with btrfsprogs-0.19-5.31.1.x86_64.
It did not put mkfs.btrfs in /sbin. This did however, validate all the
error paths ;).
--Rich
On 03/13/2013 11:01 AM, Eric Sandeen wrote:
> Now that btrfs has an "-f" arg, we can test that it doesn't
> improperly overwrite other filesystems in 032 like we do
> for xfs.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/032 b/032
> index bf88492..89fb225 100755
> --- a/032
> +++ b/032
> @@ -38,12 +38,18 @@ rm -f $seq.full
> . ./common.filter
>
> # real QA test starts here
> -_supported_fs xfs
> +_supported_fs xfs btrfs
> _supported_os Linux
>
> _require_nobigloopfs
> _require_scratch
>
> +# mkfs.btrfs did not have overwrite detection at first
> +if [ "$FSTYP" == "btrfs" ]; then
> + grep -q 'force overwrite' `echo $MKFS_BTRFS_PROG | awk '{print $1}'` || \
> + _notrun "Installed mkfs.btrfs does not support -f option"
> +fi
> +
> echo "Silence is golden."
> for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
> do
> @@ -61,7 +67,7 @@ do
> [ $fs = gfs2 ] && preop="echo y |" && preargs="-p lock_nolock -j 1"
> [ $fs = reiserfs ] && preop="echo y |" && preargs="-f"
> # cramfs mkfs requires a directory argument
> - [ $fs = cramfs ] && preargs=/proc/fs/xfs
> + [ $fs = cramfs ] && preargs=/proc/fs
> [ $fs = ext2 ] && preargs="-F"
> [ $fs = ext3 ] && preargs="-F"
> [ $fs = ext4 ] && preargs="-F"
> @@ -77,8 +83,8 @@ do
>
> if [ $? -eq 0 ] ; then
> # next, ensure we don't overwrite it
> - echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
> - ${MKFS_PROG}.xfs $SCRATCH_DEV >>$seq.full 2>&1
> + echo "=== Attempting $FSTYP overwrite of $fs..." >>$seq.full
> + ${MKFS_PROG}.$FSTYP $SCRATCH_DEV >>$seq.full 2>&1
>
> [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
> else
>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs
2013-03-13 16:01 [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs Eric Sandeen
2013-03-15 17:07 ` Rich Johnston
@ 2013-03-15 17:11 ` Rich Johnston
1 sibling, 0 replies; 5+ messages in thread
From: Rich Johnston @ 2013-03-15 17:11 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss, linux-btrfs
This patch has been commited.
Thanks
--Rich
commit 99eb53da9c08148132cdf3cd401b248e6a0d96c5
Author: Eric Sandeen <sandeen@redhat.com>
Date: Wed Mar 13 16:01:00 2013 +0000
xfstests: enable test 032 (mkfs overwrite) for btrfs
Now that btrfs has an "-f" arg, we can test that it doesn't
improperly overwrite other filesystems in 032 like we do
for xfs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs
2013-03-15 17:07 ` Rich Johnston
@ 2013-03-15 17:12 ` Eric Sandeen
2013-03-16 12:14 ` Linda Walsh
0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2013-03-15 17:12 UTC (permalink / raw)
To: Rich Johnston; +Cc: xfs-oss, linux-btrfs
On 3/15/13 12:07 PM, Rich Johnston wrote:
> Eric,
>
> Thanks once more for the patch. Once I finally got the correct version of mkfs.btrfs this looks good.
>
> Reviewed-by: Rich Johnston <rjohnston@sgi.com>
>
> Interesting that the default make install of btrfs-progs did not install over my btrfsprogs rpm.
>
> Was running SLES11 SP2 with btrfsprogs-0.19-5.31.1.x86_64.
>
> It did not put mkfs.btrfs in /sbin. This did however, validate all the error paths ;).
Heh ;)
Well, mixing & matching upstream installs from source w/ rpm-packaged binaries is usually asking for trouble.
I don't think it's a bug, just bad administrative practice ;)
-Eric
> --Rich
>
>
>
>
> On 03/13/2013 11:01 AM, Eric Sandeen wrote:
>> Now that btrfs has an "-f" arg, we can test that it doesn't
>> improperly overwrite other filesystems in 032 like we do
>> for xfs.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> diff --git a/032 b/032
>> index bf88492..89fb225 100755
>> --- a/032
>> +++ b/032
>> @@ -38,12 +38,18 @@ rm -f $seq.full
>> . ./common.filter
>>
>> # real QA test starts here
>> -_supported_fs xfs
>> +_supported_fs xfs btrfs
>> _supported_os Linux
>>
>> _require_nobigloopfs
>> _require_scratch
>>
>> +# mkfs.btrfs did not have overwrite detection at first
>> +if [ "$FSTYP" == "btrfs" ]; then
>> + grep -q 'force overwrite' `echo $MKFS_BTRFS_PROG | awk '{print $1}'` || \
>> + _notrun "Installed mkfs.btrfs does not support -f option"
>> +fi
>> +
>> echo "Silence is golden."
>> for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
>> do
>> @@ -61,7 +67,7 @@ do
>> [ $fs = gfs2 ] && preop="echo y |" && preargs="-p lock_nolock -j 1"
>> [ $fs = reiserfs ] && preop="echo y |" && preargs="-f"
>> # cramfs mkfs requires a directory argument
>> - [ $fs = cramfs ] && preargs=/proc/fs/xfs
>> + [ $fs = cramfs ] && preargs=/proc/fs
>> [ $fs = ext2 ] && preargs="-F"
>> [ $fs = ext3 ] && preargs="-F"
>> [ $fs = ext4 ] && preargs="-F"
>> @@ -77,8 +83,8 @@ do
>>
>> if [ $? -eq 0 ] ; then
>> # next, ensure we don't overwrite it
>> - echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
>> - ${MKFS_PROG}.xfs $SCRATCH_DEV >>$seq.full 2>&1
>> + echo "=== Attempting $FSTYP overwrite of $fs..." >>$seq.full
>> + ${MKFS_PROG}.$FSTYP $SCRATCH_DEV >>$seq.full 2>&1
>>
>> [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
>> else
>>
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs
2013-03-15 17:12 ` Eric Sandeen
@ 2013-03-16 12:14 ` Linda Walsh
0 siblings, 0 replies; 5+ messages in thread
From: Linda Walsh @ 2013-03-16 12:14 UTC (permalink / raw)
Cc: linux-btrfs, xfs-oss
Eric Sandeen wrote:
>>
>> It did not put mkfs.btrfs in /sbin. This did however, validate all the error paths ;).
> Heh ;)
> Well, mixing & matching upstream installs from source w/ rpm-packaged binaries is usually asking for trouble.
> I don't think it's a bug, just bad administrative practice ;)
----
SuSE is moving most if not all of their boot-related binaries off of "/" and
putting
them in /usr, requiring that you either have 1 partition for / and /usr or you run
their initrd that will pre-mount /usr on "/". Supposedly this is a requirement
of moving the the MS-compat boot architecture, "systemd" and is being done by all
the distros... (supposedly)... At least RedHat and SuSE are going that way...
It's great to boot up in single-user from your hard disk and be told mount
needs libs on a yet-to-be mounted partition...
;-/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-16 12:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 16:01 [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs Eric Sandeen
2013-03-15 17:07 ` Rich Johnston
2013-03-15 17:12 ` Eric Sandeen
2013-03-16 12:14 ` Linda Walsh
2013-03-15 17:11 ` Rich Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).