linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] common: set _fs_has_crcs=0 as default in _filter_mkfs()
@ 2014-04-17  4:16 Eryu Guan
  2014-04-17  4:16 ` [PATCH 2/3] generic/009: fix _require_xfs_io_command Eryu Guan
  2014-04-17  4:16 ` [PATCH 3/3] generic/009: get the correct dev name when testing ext4 Eryu Guan
  0 siblings, 2 replies; 4+ messages in thread
From: Eryu Guan @ 2014-04-17  4:16 UTC (permalink / raw)
  To: xfs; +Cc: Eryu Guan

xfsprogs without crc support won't print crc=0/crc=1, so
_filter_mkfs() leaves _fs_has_crcs variable unset, and xfs/033 fails
because of that.

xfs/033 4s ... - output mismatch (see /root/xfstests/results//xfs/033.out.bad)
    --- tests/xfs/033.out       2014-04-16 22:31:49.818350450 -0400
    +++ /root/xfstests/results//xfs/033.out.bad 2014-04-16 22:35:08.264401190 -0400
    @@ -5,6 +5,7 @@
     naming   =VERN bsize=XXX
     log      =LDEV bsize=XXX blocks=XXX
     realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
    +./tests/xfs/033: line 87: [: -eq: unary operator expected
     Corrupting root inode - setting bits to 0
     Wrote X.XXKb (value 0x0)
     Phase 1 - find and verify superblock...

Print _fs_has_crcs=0 to stderr by default, so old xfsprogs could have
this variable set too, and a latter _fs_has_crcs=1 could overwrite it
if the fs does have crc support.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 common/filter | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/filter b/common/filter
index a7d2aa9..05dbae6 100644
--- a/common/filter
+++ b/common/filter
@@ -143,6 +143,7 @@ _filter_mkfs()
 	return ;;
     esac
 
+    echo "_fs_has_crcs=0" >&2
     set -
     perl -ne '
     if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) {
-- 
1.9.0

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

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

* [PATCH 2/3] generic/009: fix _require_xfs_io_command
  2014-04-17  4:16 [PATCH 1/3] common: set _fs_has_crcs=0 as default in _filter_mkfs() Eryu Guan
@ 2014-04-17  4:16 ` Eryu Guan
  2014-04-17  4:16 ` [PATCH 3/3] generic/009: get the correct dev name when testing ext4 Eryu Guan
  1 sibling, 0 replies; 4+ messages in thread
From: Eryu Guan @ 2014-04-17  4:16 UTC (permalink / raw)
  To: xfs; +Cc: Eryu Guan

_require_xfs_io_falloc "fzero" should be a typo, it requires falloc command.
Use the correct _require_xfs_io_command "fzero".

fiemap is also needed, add that too.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/generic/009 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/generic/009 b/tests/generic/009
index b7b0b3f..1e487b4 100644
--- a/tests/generic/009
+++ b/tests/generic/009
@@ -44,7 +44,8 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 
 # real QA test starts here
 _supported_os Linux
-_require_xfs_io_falloc "fzero"
+_require_xfs_io_fiemap
+_require_xfs_io_command "fzero"
 
 testfile=$TEST_DIR/009.$$
 
-- 
1.9.0

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

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

* [PATCH 3/3] generic/009: get the correct dev name when testing ext4
  2014-04-17  4:16 [PATCH 1/3] common: set _fs_has_crcs=0 as default in _filter_mkfs() Eryu Guan
  2014-04-17  4:16 ` [PATCH 2/3] generic/009: fix _require_xfs_io_command Eryu Guan
@ 2014-04-17  4:16 ` Eryu Guan
  2014-04-22  0:07   ` Dave Chinner
  1 sibling, 1 reply; 4+ messages in thread
From: Eryu Guan @ 2014-04-17  4:16 UTC (permalink / raw)
  To: xfs; +Cc: Eryu Guan

If TEST_DEV is a symlink(usually a lvm), we get the wrong DEV
name. Follow link and get the correct dev name.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/generic/009 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/009 b/tests/generic/009
index 1e487b4..7675c69 100644
--- a/tests/generic/009
+++ b/tests/generic/009
@@ -51,7 +51,7 @@ testfile=$TEST_DIR/009.$$
 
 # Disable extent zeroing for ext4 as that change where holes are created
 if [ "$FSTYP" = "ext4" ]; then
-	DEV=`basename $TEST_DEV`
+	DEV=`basename $(readlink -f $TEST_DEV)`
 	echo 0 >/sys/fs/ext4/$DEV/extent_max_zeroout_kb
 fi
 
-- 
1.9.0

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

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

* Re: [PATCH 3/3] generic/009: get the correct dev name when testing ext4
  2014-04-17  4:16 ` [PATCH 3/3] generic/009: get the correct dev name when testing ext4 Eryu Guan
@ 2014-04-22  0:07   ` Dave Chinner
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2014-04-22  0:07 UTC (permalink / raw)
  To: Eryu Guan; +Cc: xfs

On Thu, Apr 17, 2014 at 12:16:54PM +0800, Eryu Guan wrote:
> If TEST_DEV is a symlink(usually a lvm), we get the wrong DEV
> name. Follow link and get the correct dev name.
> 
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
>  tests/generic/009 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/009 b/tests/generic/009
> index 1e487b4..7675c69 100644
> --- a/tests/generic/009
> +++ b/tests/generic/009
> @@ -51,7 +51,7 @@ testfile=$TEST_DIR/009.$$
>  
>  # Disable extent zeroing for ext4 as that change where holes are created
>  if [ "$FSTYP" = "ext4" ]; then
> -	DEV=`basename $TEST_DEV`
> +	DEV=`basename $(readlink -f $TEST_DEV)`
>  	echo 0 >/sys/fs/ext4/$DEV/extent_max_zeroout_kb
>  fi

We've made this mistake several times now. Can you add a function
in common/rc that does this. e.g. "_real_dev()" and replace
all the current 'readlink -f $DEV' calls with that function?
i.e. something like:

_real_dev()
{
	local _dev=$1
	if [ -L "$_dev" ]; then
		_dev=`readlink -f $_dev`
	fi
	echo $_dev
}

_short_dev()
{
	echo `basename $(_real_dev $1)`
}

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

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

end of thread, other threads:[~2014-04-22  0:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-17  4:16 [PATCH 1/3] common: set _fs_has_crcs=0 as default in _filter_mkfs() Eryu Guan
2014-04-17  4:16 ` [PATCH 2/3] generic/009: fix _require_xfs_io_command Eryu Guan
2014-04-17  4:16 ` [PATCH 3/3] generic/009: get the correct dev name when testing ext4 Eryu Guan
2014-04-22  0:07   ` Dave Chinner

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).