aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2023-12-29 14:27:39 +0800
committerZorro Lang <zlang@kernel.org>2024-01-14 20:39:09 +0800
commit08dbb837f1a84f76c42fdfb8f403dec064467f0a (patch)
tree20fa3d9f359516dba38827a393732eed62c094c1
parent91cb623078b32ae1c6180ccd4098dbf776918220 (diff)
downloadxfstests-dev-08dbb837f1a84f76c42fdfb8f403dec064467f0a.tar.gz
common: add _filter_trailing_whitespace
The command 'btrfs inspect-internal dump-tree -t raid_stripe' introduces trailing whitespace in its output. Apply a filter to remove it. Used in btrfs/30[4-8][.out]. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rw-r--r--common/filter5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/filter b/common/filter
index 509ee95039..36d51bd957 100644
--- a/common/filter
+++ b/common/filter
@@ -651,5 +651,10 @@ _filter_bash()
sed -e "s/^bash: line 1: /bash: /"
}
+_filter_trailing_whitespace()
+{
+ sed -E -e "s/\s+$//"
+}
+
# make sure this script returns success
/bin/true