]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: filter: helper for sysfs error filtering
authorAnand Jain <anand.jain@oracle.com>
Wed, 29 Jan 2025 07:56:29 +0000 (15:56 +0800)
committerZorro Lang <zlang@kernel.org>
Fri, 11 Apr 2025 04:25:08 +0000 (12:25 +0800)
Added filter helper to filter sysfs write errors, retain only the
error part.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/filter

index 1ebfd27e898e01208be9b1630ae1a5baa3196594..bbe13f4c8a8d05d4c1d85bf5e00602dbb4e1f42f 100644 (file)
@@ -674,5 +674,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/'
+}
+
 # make sure this script returns success
 /bin/true