* [PATCH] common/rc: add _filter_scratch in _test_inode_flag
@ 2020-11-23 6:25 XiaoLi Feng
2020-11-29 8:12 ` Eryu Guan
0 siblings, 1 reply; 3+ messages in thread
From: XiaoLi Feng @ 2020-11-23 6:25 UTC (permalink / raw)
To: fstests; +Cc: Xiaoli Feng
From: Xiaoli Feng <xifeng@redhat.com>
Avoid the invalid failure when the path of file include test flag.
Signed-off-by: Xiaoli Feng <xifeng@redhat.com>
---
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index b5a504e0..04080331 100644
--- a/common/rc
+++ b/common/rc
@@ -3069,7 +3069,7 @@ _test_inode_flag()
local flag=$1
local file=$2
- if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then
+ if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | _filter_scratch | grep -q "$flag" ; then
return 0
fi
return 1
--
2.18.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] common/rc: add _filter_scratch in _test_inode_flag
2020-11-23 6:25 [PATCH] common/rc: add _filter_scratch in _test_inode_flag XiaoLi Feng
@ 2020-11-29 8:12 ` Eryu Guan
2020-12-01 16:04 ` Xiaoli Feng
0 siblings, 1 reply; 3+ messages in thread
From: Eryu Guan @ 2020-11-29 8:12 UTC (permalink / raw)
To: XiaoLi Feng; +Cc: fstests
On Mon, Nov 23, 2020 at 02:25:26PM +0800, Xiaoli Feng wrote:
> From: Xiaoli Feng <xifeng@redhat.com>
>
> Avoid the invalid failure when the path of file include test flag.
>
> Signed-off-by: Xiaoli Feng <xifeng@redhat.com>
Would you please elaborate this issue in more details? It seems your
SCRATCH_MNT contains a string that matches $flag so _test_inode_flag
returns a false positive. But that only fixes SCRATCH_MNT, what if
TEST_DIR contains the string as well?
Thanks,
Eryu
> ---
> common/rc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index b5a504e0..04080331 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3069,7 +3069,7 @@ _test_inode_flag()
> local flag=$1
> local file=$2
>
> - if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then
> + if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | _filter_scratch | grep -q "$flag" ; then
> return 0
> fi
> return 1
> --
> 2.18.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] common/rc: add _filter_scratch in _test_inode_flag
2020-11-29 8:12 ` Eryu Guan
@ 2020-12-01 16:04 ` Xiaoli Feng
0 siblings, 0 replies; 3+ messages in thread
From: Xiaoli Feng @ 2020-12-01 16:04 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests
Hi,
----- Original Message -----
> From: "Eryu Guan" <guan@eryu.me>
> To: "XiaoLi Feng" <xifeng@redhat.com>
> Cc: fstests@vger.kernel.org
> Sent: Sunday, November 29, 2020 4:12:34 PM
> Subject: Re: [PATCH] common/rc: add _filter_scratch in _test_inode_flag
>
> On Mon, Nov 23, 2020 at 02:25:26PM +0800, Xiaoli Feng wrote:
> > From: Xiaoli Feng <xifeng@redhat.com>
> >
> > Avoid the invalid failure when the path of file include test flag.
> >
> > Signed-off-by: Xiaoli Feng <xifeng@redhat.com>
>
> Would you please elaborate this issue in more details? It seems your
> SCRATCH_MNT contains a string that matches $flag so _test_inode_flag
> returns a false positive. But that only fixes SCRATCH_MNT, what if
> TEST_DIR contains the string as well?
When test generic/608 for dax on xfs, "_check_xflag $t_file 0" is always
failed if the $f_file has dax string. Yes, here should also include filter
for TEST_DIR.
>
> Thanks,
> Eryu
>
> > ---
> > common/rc | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/common/rc b/common/rc
> > index b5a504e0..04080331 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -3069,7 +3069,7 @@ _test_inode_flag()
> > local flag=$1
> > local file=$2
> >
> > - if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then
> > + if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | _filter_scratch | grep -q
> > "$flag" ; then
> > return 0
> > fi
> > return 1
> > --
> > 2.18.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-01 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 6:25 [PATCH] common/rc: add _filter_scratch in _test_inode_flag XiaoLi Feng
2020-11-29 8:12 ` Eryu Guan
2020-12-01 16:04 ` Xiaoli Feng
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.