aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-03-23 14:35:14 +1100
committerDave Chinner <david@fromorbit.com>2016-03-23 14:35:14 +1100
commit232593dea51c53f3251f9b41cd89e9dba20f0159 (patch)
tree5014584e99b81ec3413563c34f979623fbe5bbbf
parent3a9242688d64c669ca764ee2c5599abfc885c131 (diff)
downloadxfstests-dev-232593dea51c53f3251f9b41cd89e9dba20f0159.tar.gz
filter.btrfs: new filter for property messages
The error message in newer btrfs utilities contains name of the property, we want to filter it out so it matches golden output. There's an optional parameter with property name that is matched against the command output. Signed-off-by: David Sterba <dsterba@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--common/filter.btrfs12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/filter.btrfs b/common/filter.btrfs
index 9bb64792..38045439 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -68,5 +68,17 @@ _filter_btrfs_subvol_delete()
}
+# filter name of the property from the output, optionally verify against $1
+# recognized message(s):
+# "object is not compatible with property: label"
+_filter_btrfs_prop_error()
+{
+ if ! [ -z "$1" ]; then
+ sed -e "s/\(compatible with property\): $1/\1/"
+ else
+ sed -e "s/^\(.*compatible with property\).*/\1/"
+ fi
+}
+
# make sure this script returns success
/bin/true