* [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function
@ 2017-01-16 6:40 Xiao Yang
2017-01-16 7:23 ` Eryu Guan
0 siblings, 1 reply; 6+ messages in thread
From: Xiao Yang @ 2017-01-16 6:40 UTC (permalink / raw
To: fstests; +Cc: Xiao Yang
generic/401 failed on RHEL6.8GA because output option is not
supported by df. So we use $FSTYP and $SCRATCH_DEV instead of
df --output to fix it.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
common/rc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/common/rc b/common/rc
index 892c46e..90ad496 100644
--- a/common/rc
+++ b/common/rc
@@ -268,14 +268,12 @@ _supports_filetype()
{
local dir=$1
- local fstyp=$(df --output=fstype $dir | tail -1)
- case "$fstyp" in
+ case $FSTYP in
xfs)
xfs_info $dir | grep -q "ftype=1"
;;
ext2|ext3|ext4)
- tune2fs -l $(df --output=source $dir | tail -1) | \
- grep -q filetype
+ tune2fs -l $SCRATCH_DEV | grep -q filetype
;;
*)
local testfile=$dir/$$.ftype
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function
2017-01-16 6:40 [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function Xiao Yang
@ 2017-01-16 7:23 ` Eryu Guan
2017-01-16 8:04 ` Xiao Yang
2017-01-16 8:07 ` [PATCH v2] common/rc: Fix " Xiao Yang
0 siblings, 2 replies; 6+ messages in thread
From: Eryu Guan @ 2017-01-16 7:23 UTC (permalink / raw
To: Xiao Yang; +Cc: fstests
On Mon, Jan 16, 2017 at 02:40:19PM +0800, Xiao Yang wrote:
> generic/401 failed on RHEL6.8GA because output option is not
> supported by df. So we use $FSTYP and $SCRATCH_DEV instead of
> df --output to fix it.
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
> common/rc | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index 892c46e..90ad496 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -268,14 +268,12 @@ _supports_filetype()
> {
> local dir=$1
>
> - local fstyp=$(df --output=fstype $dir | tail -1)
> - case "$fstyp" in
> + case $FSTYP in
$FSTYP can't be used directly in this function, because it's also used
to detect the fstype of upperfs of overlayfs in overlay testing, in
which case FSTYP is overlay. See _overlay_mount().
Just remove "--output=xxx" option and parse the output, e.g.
local fstyp=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $2}'`
Note that $DF_PROG is defined as "df -T -P", which prints the fstyp
field.
> xfs)
> xfs_info $dir | grep -q "ftype=1"
> ;;
> ext2|ext3|ext4)
> - tune2fs -l $(df --output=source $dir | tail -1) | \
> - grep -q filetype
> + tune2fs -l $SCRATCH_DEV | grep -q filetype
Same here, $SCRATCH_DEV doesn't fit.
Thanks,
Eryu
> ;;
> *)
> local testfile=$dir/$$.ftype
> --
> 1.8.3.1
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function
2017-01-16 7:23 ` Eryu Guan
@ 2017-01-16 8:04 ` Xiao Yang
2017-01-16 8:07 ` [PATCH v2] common/rc: Fix " Xiao Yang
1 sibling, 0 replies; 6+ messages in thread
From: Xiao Yang @ 2017-01-16 8:04 UTC (permalink / raw
To: Eryu Guan; +Cc: fstests
On 2017/01/16 15:23, Eryu Guan wrote:
> On Mon, Jan 16, 2017 at 02:40:19PM +0800, Xiao Yang wrote:
>> generic/401 failed on RHEL6.8GA because output option is not
>> supported by df. So we use $FSTYP and $SCRATCH_DEV instead of
>> df --output to fix it.
>>
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>> ---
>> common/rc | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/common/rc b/common/rc
>> index 892c46e..90ad496 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -268,14 +268,12 @@ _supports_filetype()
>> {
>> local dir=$1
>>
>> - local fstyp=$(df --output=fstype $dir | tail -1)
>> - case "$fstyp" in
>> + case $FSTYP in
> $FSTYP can't be used directly in this function, because it's also used
> to detect the fstype of upperfs of overlayfs in overlay testing, in
> which case FSTYP is overlay. See _overlay_mount().
>
> Just remove "--output=xxx" option and parse the output, e.g.
>
> local fstyp=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $2}'`
>
> Note that $DF_PROG is defined as "df -T -P", which prints the fstyp
> field.
>
>
Hi Eryu
Thanks for your explanations, i will rewrite this patch.
Best Regards,
Xiao Yang
>> xfs)
>> xfs_info $dir | grep -q "ftype=1"
>> ;;
>> ext2|ext3|ext4)
>> - tune2fs -l $(df --output=source $dir | tail -1) | \
>> - grep -q filetype
>> + tune2fs -l $SCRATCH_DEV | grep -q filetype
> Same here, $SCRATCH_DEV doesn't fit.
>
> Thanks,
> Eryu
>
>> ;;
>> *)
>> local testfile=$dir/$$.ftype
>> --
>> 1.8.3.1
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe fstests" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> .
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] common/rc: Fix _supports_filetype function
2017-01-16 7:23 ` Eryu Guan
2017-01-16 8:04 ` Xiao Yang
@ 2017-01-16 8:07 ` Xiao Yang
2017-01-16 8:20 ` Eryu Guan
1 sibling, 1 reply; 6+ messages in thread
From: Xiao Yang @ 2017-01-16 8:07 UTC (permalink / raw
To: eguan; +Cc: fstests, Xiao Yang
generic/401 failed on RHEL6.8GA because "--output=xxx"
option is not supported by df. So we remove it.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
common/rc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/rc b/common/rc
index 892c46e..87ef849 100644
--- a/common/rc
+++ b/common/rc
@@ -268,14 +268,14 @@ _supports_filetype()
{
local dir=$1
- local fstyp=$(df --output=fstype $dir | tail -1)
+ local fstyp=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $2}'`
case "$fstyp" in
xfs)
xfs_info $dir | grep -q "ftype=1"
;;
ext2|ext3|ext4)
- tune2fs -l $(df --output=source $dir | tail -1) | \
- grep -q filetype
+ local mntdir=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $1}'`
+ tune2fs -l $mntdir | grep -q filetype
;;
*)
local testfile=$dir/$$.ftype
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] common/rc: Fix _supports_filetype function
2017-01-16 8:07 ` [PATCH v2] common/rc: Fix " Xiao Yang
@ 2017-01-16 8:20 ` Eryu Guan
2017-01-16 8:24 ` Xiao Yang
0 siblings, 1 reply; 6+ messages in thread
From: Eryu Guan @ 2017-01-16 8:20 UTC (permalink / raw
To: Xiao Yang; +Cc: fstests
On Mon, Jan 16, 2017 at 04:07:20PM +0800, Xiao Yang wrote:
> generic/401 failed on RHEL6.8GA because "--output=xxx"
> option is not supported by df. So we remove it.
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
> common/rc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index 892c46e..87ef849 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -268,14 +268,14 @@ _supports_filetype()
> {
> local dir=$1
>
> - local fstyp=$(df --output=fstype $dir | tail -1)
> + local fstyp=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $2}'`
> case "$fstyp" in
> xfs)
> xfs_info $dir | grep -q "ftype=1"
> ;;
> ext2|ext3|ext4)
> - tune2fs -l $(df --output=source $dir | tail -1) | \
> - grep -q filetype
> + local mntdir=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $1}'`
^^^^^^ this actually is the underlying device
I'll rename it to "dev" on commit.
Thanks,
Eryu
> + tune2fs -l $mntdir | grep -q filetype
> ;;
> *)
> local testfile=$dir/$$.ftype
> --
> 1.8.3.1
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] common/rc: Fix _supports_filetype function
2017-01-16 8:20 ` Eryu Guan
@ 2017-01-16 8:24 ` Xiao Yang
0 siblings, 0 replies; 6+ messages in thread
From: Xiao Yang @ 2017-01-16 8:24 UTC (permalink / raw
To: Eryu Guan; +Cc: fstests
On 2017/01/16 16:20, Eryu Guan wrote:
> On Mon, Jan 16, 2017 at 04:07:20PM +0800, Xiao Yang wrote:
>> generic/401 failed on RHEL6.8GA because "--output=xxx"
>> option is not supported by df. So we remove it.
>>
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>> ---
>> common/rc | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/common/rc b/common/rc
>> index 892c46e..87ef849 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -268,14 +268,14 @@ _supports_filetype()
>> {
>> local dir=$1
>>
>> - local fstyp=$(df --output=fstype $dir | tail -1)
>> + local fstyp=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $2}'`
>> case "$fstyp" in
>> xfs)
>> xfs_info $dir | grep -q "ftype=1"
>> ;;
>> ext2|ext3|ext4)
>> - tune2fs -l $(df --output=source $dir | tail -1) | \
>> - grep -q filetype
>> + local mntdir=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $1}'`
> ^^^^^^ this actually is the underlying device
>
> I'll rename it to "dev" on commit.
Hi Eryu
Agree it. :-)
Best Regards,
Xiao Yang
> Thanks,
> Eryu
>
>> + tune2fs -l $mntdir | grep -q filetype
>> ;;
>> *)
>> local testfile=$dir/$$.ftype
>> --
>> 1.8.3.1
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe fstests" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-16 8:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-16 6:40 [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function Xiao Yang
2017-01-16 7:23 ` Eryu Guan
2017-01-16 8:04 ` Xiao Yang
2017-01-16 8:07 ` [PATCH v2] common/rc: Fix " Xiao Yang
2017-01-16 8:20 ` Eryu Guan
2017-01-16 8:24 ` Xiao Yang
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.