* [PATCH v2] xfstests: use right defrag program path
@ 2013-03-01 14:17 Zheng Liu
2013-03-01 15:48 ` Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Zheng Liu @ 2013-03-01 14:17 UTC (permalink / raw)
To: xfs; +Cc: linux-ext4, Zheng Liu, Dave Chinner
From: Zheng Liu <wenqing.lz@taobao.com>
In _require_defrag defragmentation command path is fixed. That will
cause that this test case is skipped in some distributions.
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Cc: Dave Chinner <david@fromorbit.com>
---
[*NOTE*: this patch is Cc'ed to linux-ext4 mailing list because after
applied it xfstests #218 will fail against 3.8 and dev branch.]
v2 <- v1:
* Define 'E4DEFRAG_PROG' and 'FILEFRAG_PROG' in common.config with
set_prog_path
common.config | 2 ++
common.defrag | 10 +++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/common.config b/common.config
index 7174127..9c99bfe 100644
--- a/common.config
+++ b/common.config
@@ -160,6 +160,8 @@ export INDENT_PROG="`set_prog_path indent`"
export XFS_COPY_PROG="`set_prog_path xfs_copy`"
export FSTRIM_PROG="`set_prog_path fstrim`"
export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
+export FILEFRAG_PROG="`set_prog_path filefrag`"
+export E4DEFRAG_PROG="`set_prog_path e4defrag`"
# Generate a comparable xfsprogs version number in the form of
# major * 10000 + minor * 100 + release
diff --git a/common.defrag b/common.defrag
index ea6c14c..9c9eb9b 100644
--- a/common.defrag
+++ b/common.defrag
@@ -24,10 +24,10 @@ _require_defrag()
{
case "$FSTYP" in
xfs)
- DEFRAG_PROG=/usr/sbin/xfs_fsr
+ DEFRAG_PROG="$XFS_FSR_PROG"
;;
ext4|ext4dev)
- DEFRAG_PROG=/usr/bin/e4defrag
+ DEFRAG_PROG="$E4DEFRAG_PROG"
;;
btrfs)
DEFRAG_PROG="$BTRFS_UTIL_PROG filesystem defragment"
@@ -38,13 +38,13 @@ _require_defrag()
esac
_require_command $DEFRAG_PROG
- _require_command /usr/sbin/filefrag
+ _require_command $FILEFRAG_PROG
}
_extent_count()
{
- filefrag $1 | awk '{print $2}'
- filefrag -v $1 >> $seq.full 2>&1
+ $FILEFRAG_PROG $1 | awk '{print $2}'
+ $FILEFRAG_PROG -v $1 >> $seq.full 2>&1
}
# Defrag file, check it, and remove it.
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] xfstests: use right defrag program path
2013-03-01 14:17 [PATCH v2] xfstests: use right defrag program path Zheng Liu
@ 2013-03-01 15:48 ` Eric Sandeen
2013-03-05 15:55 ` Rich Johnston
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2013-03-01 15:48 UTC (permalink / raw)
To: Zheng Liu; +Cc: xfs, linux-ext4, Zheng Liu, Dave Chinner
On 3/1/13 8:17 AM, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
>
> In _require_defrag defragmentation command path is fixed. That will
> cause that this test case is skipped in some distributions.
>
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> Cc: Dave Chinner <david@fromorbit.com>
> ---
> [*NOTE*: this patch is Cc'ed to linux-ext4 mailing list because after
> applied it xfstests #218 will fail against 3.8 and dev branch.]
>
> v2 <- v1:
> * Define 'E4DEFRAG_PROG' and 'FILEFRAG_PROG' in common.config with
> set_prog_path
Looks good to me, thanks.
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> common.config | 2 ++
> common.defrag | 10 +++++-----
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/common.config b/common.config
> index 7174127..9c99bfe 100644
> --- a/common.config
> +++ b/common.config
> @@ -160,6 +160,8 @@ export INDENT_PROG="`set_prog_path indent`"
> export XFS_COPY_PROG="`set_prog_path xfs_copy`"
> export FSTRIM_PROG="`set_prog_path fstrim`"
> export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
> +export FILEFRAG_PROG="`set_prog_path filefrag`"
> +export E4DEFRAG_PROG="`set_prog_path e4defrag`"
>
> # Generate a comparable xfsprogs version number in the form of
> # major * 10000 + minor * 100 + release
> diff --git a/common.defrag b/common.defrag
> index ea6c14c..9c9eb9b 100644
> --- a/common.defrag
> +++ b/common.defrag
> @@ -24,10 +24,10 @@ _require_defrag()
> {
> case "$FSTYP" in
> xfs)
> - DEFRAG_PROG=/usr/sbin/xfs_fsr
> + DEFRAG_PROG="$XFS_FSR_PROG"
> ;;
> ext4|ext4dev)
> - DEFRAG_PROG=/usr/bin/e4defrag
> + DEFRAG_PROG="$E4DEFRAG_PROG"
> ;;
> btrfs)
> DEFRAG_PROG="$BTRFS_UTIL_PROG filesystem defragment"
> @@ -38,13 +38,13 @@ _require_defrag()
> esac
>
> _require_command $DEFRAG_PROG
> - _require_command /usr/sbin/filefrag
> + _require_command $FILEFRAG_PROG
> }
>
> _extent_count()
> {
> - filefrag $1 | awk '{print $2}'
> - filefrag -v $1 >> $seq.full 2>&1
> + $FILEFRAG_PROG $1 | awk '{print $2}'
> + $FILEFRAG_PROG -v $1 >> $seq.full 2>&1
> }
>
> # Defrag file, check it, and remove it.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] xfstests: use right defrag program path
2013-03-01 15:48 ` Eric Sandeen
@ 2013-03-05 15:55 ` Rich Johnston
0 siblings, 0 replies; 3+ messages in thread
From: Rich Johnston @ 2013-03-05 15:55 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Zheng Liu, linux-ext4, Zheng Liu, xfs
This patch has been committed.
commit 08557e219c12e573be459407033495899f46967a
Author: Zheng Liu <wenqing.lz@taobao.com>
Date: Fri Mar 1 14:17:13 2013 +0000
xfstests: use right defrag program path
In _require_defrag defragmentation command path is fixed. That will
cause that this test case is skipped in some distributions.
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-05 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 14:17 [PATCH v2] xfstests: use right defrag program path Zheng Liu
2013-03-01 15:48 ` Eric Sandeen
2013-03-05 15:55 ` 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).