All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common/rc: filter uncertain stat error output
@ 2020-12-09 14:07 Zorro Lang
  2020-12-09 14:27 ` Aurélien Aptel
  2020-12-09 19:28 ` Darrick J. Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Zorro Lang @ 2020-12-09 14:07 UTC (permalink / raw)
  To: fstests

The xfs/348 start to fail with latest coreutils' stat command, the
mismatched part likes below:

  -stat: cannot stat 'SCRATCH_MNT/test/DIR': Structure needs cleaning
  +stat: cannot statx 'SCRATCH_MNT/test/DIR': Structure needs cleaning

So filter 'statx' to 'stat' to prevent the golden image broken.

Signed-off-by: Zorro Lang <zlang@redhat.com>
---
 common/rc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/rc b/common/rc
index b5a504e0..95def920 100644
--- a/common/rc
+++ b/common/rc
@@ -4345,6 +4345,12 @@ _getcap()
 	return ${PIPESTATUS[0]}
 }
 
+stat()
+{
+	# filter uncertain "statx/stat" error output
+	command stat $@ 2> >(sed -e 's/statx/stat/' >&2)
+}
+
 init_rc
 
 ################################################################################
-- 
2.25.4


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

* Re: [PATCH] common/rc: filter uncertain stat error output
  2020-12-09 14:07 [PATCH] common/rc: filter uncertain stat error output Zorro Lang
@ 2020-12-09 14:27 ` Aurélien Aptel
  2020-12-09 19:28 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Aurélien Aptel @ 2020-12-09 14:27 UTC (permalink / raw)
  To: Zorro Lang, fstests

> +stat()
> +{
> +	# filter uncertain "statx/stat" error output
> +	command stat $@ 2> >(sed -e 's/statx/stat/' >&2)
> +}
> +

I think $@ be quoted like so "$@" so as to handle

    stat "a a" "b b"

properly

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)


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

* Re: [PATCH] common/rc: filter uncertain stat error output
  2020-12-09 14:07 [PATCH] common/rc: filter uncertain stat error output Zorro Lang
  2020-12-09 14:27 ` Aurélien Aptel
@ 2020-12-09 19:28 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2020-12-09 19:28 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests

On Wed, Dec 09, 2020 at 10:07:38PM +0800, Zorro Lang wrote:
> The xfs/348 start to fail with latest coreutils' stat command, the
> mismatched part likes below:
> 
>   -stat: cannot stat 'SCRATCH_MNT/test/DIR': Structure needs cleaning
>   +stat: cannot statx 'SCRATCH_MNT/test/DIR': Structure needs cleaning
> 
> So filter 'statx' to 'stat' to prevent the golden image broken.
> 
> Signed-off-by: Zorro Lang <zlang@redhat.com>

Murphy Zhou already sent a patch to filter this.

--D

> ---
>  common/rc | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index b5a504e0..95def920 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4345,6 +4345,12 @@ _getcap()
>  	return ${PIPESTATUS[0]}
>  }
>  
> +stat()
> +{
> +	# filter uncertain "statx/stat" error output
> +	command stat $@ 2> >(sed -e 's/statx/stat/' >&2)
> +}
> +
>  init_rc
>  
>  ################################################################################
> -- 
> 2.25.4
> 

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

end of thread, other threads:[~2020-12-09 19:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-09 14:07 [PATCH] common/rc: filter uncertain stat error output Zorro Lang
2020-12-09 14:27 ` Aurélien Aptel
2020-12-09 19:28 ` Darrick J. Wong

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.