* [PATCH] generic/611: Filter getfattr output
@ 2020-10-11 2:14 Yang Xu
2020-10-11 5:06 ` Eryu Guan
0 siblings, 1 reply; 3+ messages in thread
From: Yang Xu @ 2020-10-11 2:14 UTC (permalink / raw)
To: guaneryu; +Cc: fstests, Yang Xu
When using old version(such as getfattr 2.4.46) getfattr command, it
has the following output,
touch file
setfattr -n user.a file
getfattr --absolute-names -n user.a file
user.a
on new getfattr, it reports the following output,
getfattr --absolute-names -n user.a file
user.a=""
Filter doubt quotes and equals, so this case can pass.
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
tests/generic/611 | 2 +-
tests/generic/611.out | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/generic/611 b/tests/generic/611
index f4158bb3..c697b39a 100755
--- a/tests/generic/611
+++ b/tests/generic/611
@@ -51,7 +51,7 @@ touch "${localfile}"
_scratch_cycle_mount
# If the target bug isn't fixed, getfattr fails
-${GETFATTR_PROG} --absolute-names -n user.a $localfile | grep 'user.a'
+${GETFATTR_PROG} --absolute-names -n user.a $localfile | grep 'user.a' | sed 's/=""//g'
status=0
exit
diff --git a/tests/generic/611.out b/tests/generic/611.out
index 1ab12434..8ccf52f0 100644
--- a/tests/generic/611.out
+++ b/tests/generic/611.out
@@ -1,2 +1,2 @@
QA output created by 611
-user.a=""
+user.a
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] generic/611: Filter getfattr output
2020-10-11 2:14 [PATCH] generic/611: Filter getfattr output Yang Xu
@ 2020-10-11 5:06 ` Eryu Guan
2020-10-11 5:51 ` [PATCH v2] generic/611: Use _getfattr instead of GETFATTR_PROG Yang Xu
0 siblings, 1 reply; 3+ messages in thread
From: Eryu Guan @ 2020-10-11 5:06 UTC (permalink / raw)
To: Yang Xu; +Cc: guaneryu, fstests
On Sun, Oct 11, 2020 at 10:14:24AM +0800, Yang Xu wrote:
> When using old version(such as getfattr 2.4.46) getfattr command, it
> has the following output,
>
> touch file
> setfattr -n user.a file
> getfattr --absolute-names -n user.a file
> user.a
>
> on new getfattr, it reports the following output,
> getfattr --absolute-names -n user.a file
> user.a=""
There's an helper to do this, _getfattr, so use it here instead of bare
$GETFATTR_PROG. For details please refer to commit 794f4594fbf4
("fstests: filter redundant output by getfattr")
Thanks,
Eryu
>
> Filter doubt quotes and equals, so this case can pass.
>
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
> tests/generic/611 | 2 +-
> tests/generic/611.out | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/generic/611 b/tests/generic/611
> index f4158bb3..c697b39a 100755
> --- a/tests/generic/611
> +++ b/tests/generic/611
> @@ -51,7 +51,7 @@ touch "${localfile}"
> _scratch_cycle_mount
>
> # If the target bug isn't fixed, getfattr fails
> -${GETFATTR_PROG} --absolute-names -n user.a $localfile | grep 'user.a'
> +${GETFATTR_PROG} --absolute-names -n user.a $localfile | grep 'user.a' | sed 's/=""//g'
>
> status=0
> exit
> diff --git a/tests/generic/611.out b/tests/generic/611.out
> index 1ab12434..8ccf52f0 100644
> --- a/tests/generic/611.out
> +++ b/tests/generic/611.out
> @@ -1,2 +1,2 @@
> QA output created by 611
> -user.a=""
> +user.a
> --
> 2.23.0
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] generic/611: Use _getfattr instead of GETFATTR_PROG
2020-10-11 5:06 ` Eryu Guan
@ 2020-10-11 5:51 ` Yang Xu
0 siblings, 0 replies; 3+ messages in thread
From: Yang Xu @ 2020-10-11 5:51 UTC (permalink / raw)
To: guaneryu; +Cc: fstests, Yang Xu
The {=""} will break the golden image, so use _getfattr to filter
the redundant ="" at the end if it has.
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
tests/generic/611 | 2 +-
tests/generic/611.out | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/generic/611 b/tests/generic/611
index f4158bb3..acbbd2a9 100755
--- a/tests/generic/611
+++ b/tests/generic/611
@@ -51,7 +51,7 @@ touch "${localfile}"
_scratch_cycle_mount
# If the target bug isn't fixed, getfattr fails
-${GETFATTR_PROG} --absolute-names -n user.a $localfile | grep 'user.a'
+_getfattr --absolute-names -n user.a $localfile | grep 'user.a'
status=0
exit
diff --git a/tests/generic/611.out b/tests/generic/611.out
index 1ab12434..8ccf52f0 100644
--- a/tests/generic/611.out
+++ b/tests/generic/611.out
@@ -1,2 +1,2 @@
QA output created by 611
-user.a=""
+user.a
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-11 5:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 2:14 [PATCH] generic/611: Filter getfattr output Yang Xu
2020-10-11 5:06 ` Eryu Guan
2020-10-11 5:51 ` [PATCH v2] generic/611: Use _getfattr instead of GETFATTR_PROG Yang Xu
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).