]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
common: add _filter_trailing_whitespace
authorAnand Jain <anand.jain@oracle.com>
Fri, 29 Dec 2023 06:27:39 +0000 (14:27 +0800)
committerZorro Lang <zlang@kernel.org>
Sun, 14 Jan 2024 12:39:09 +0000 (20:39 +0800)
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>
common/filter

index 509ee95039ac3284922f3db281cd0e515213afb2..36d51bd957dd53c3efb132908bc52a471920e8aa 100644 (file)
@@ -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