On Fri, Feb 28, 2025 at 01:55:20PM +0800, Anand Jain wrote: > Added filter helper to filter sysfs write errors, retain only the > error part. > > Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> > --- > common/filter | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/common/filter b/common/filter > index 7e02ded377cc..44ba2b38c21d 100644 > --- a/common/filter > +++ b/common/filter > @@ -671,5 +671,14 @@ _filter_flakey_EIO() > sed -e "s#.*: Input\/output error#$message#" > } > > +# Filters > +# +./common/rc: line 5085: echo: write error: Invalid argument > +# to > +# Invalid argument > +_filter_sysfs_error() > +{ > + sed 's/.*: \(.*\)$/\1/' > +} Maybe output the "echo: write error: Invalid argument" or "write error: Invalid argument" is better. But as there's not more requirement for this helper, for later two cases, this helper is good. We can change that when we have particular requirement. Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx> > + > # make sure this script returns success > /bin/true > -- > 2.47.0 > >