fstests: fix btrfs/048 failure with newer btrfs-progs
cover fstests: fix btrfs/048 failure with newer btrfs-progs
David Sterba (2):
filter.btrfs: new filter for property messages btrfs/048: user filter for property error messages
common/filter.btrfs | 12 ++++++++++++ tests/btrfs/048 | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.4.5
PATCH 1/2 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.
--- common/filter.btrfs | 12 ++++++++++++ 1 file changed, 12 insertions(+)
common/filter.btrfs +12 -0
@@ -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
Signature · 1 line
1.8.4.5
Re: [PATCH 1/2] filter.btrfs: new filter for property messages
Quoted 6 lines · David Sterba
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 <[email protected]>
Quoted 33 lines
--- common/filter.btrfs | 12 ++++++++++++ 1 file changed, 12 insertions(+)common/filter.btrfs +12
-1@@ -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 --1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 5 lines
Filipe David Manana, "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."
PATCH 2/2 btrfs/048: user filter for property error messages
In reply to David Sterba--- tests/btrfs/048 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/btrfs/048 +3 -1
@@ -41,6 +41,7 @@ _cleanup() # get standard environment, filters and checks . ./common/rc . ./common/filter +. ./common/filter.btrfs # real QA test starts here _supported_fs btrfs
@@ -70,7 +71,8 @@ $BTRFS_UTIL_PROG property set $SCRATCH_MNT label '' $BTRFS_UTIL_PROG property get $SCRATCH_MNT label echo "***" mkdir $SCRATCH_MNT/testdir -$BTRFS_UTIL_PROG property get $SCRATCH_MNT/testdir label +$BTRFS_UTIL_PROG property get $SCRATCH_MNT/testdir label 2>&1 | + _filter_btrfs_prop_error label echo "***" echo -e "\nTesting subvolume ro property"
Signature · 1 line
1.8.4.5
Re: [PATCH 2/2] btrfs/048: user filter for property error messages
Quoted 1 line · David Sterba
Signed-off-by David Sterba <[email protected]>
(btw it would be better to cc the btrfs list for btrfs specific changes to xfstests)
Quoted 33 lines
--- tests/btrfs/048 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/btrfs/048 +3
-2@@ -41,6 +41,7 @@ _cleanup() # get standard environment, filters and checks . ./common/rc . ./common/filter +. ./common/filter.btrfs # real QA test starts here _supported_fs btrfs@@ -70,7 +71,8 @@ $BTRFS_UTIL_PROG property set $SCRATCH_MNT label '' $BTRFS_UTIL_PROG property get $SCRATCH_MNT label echo "***" mkdir $SCRATCH_MNT/testdir -$BTRFS_UTIL_PROG property get $SCRATCH_MNT/testdir label +$BTRFS_UTIL_PROG property get $SCRATCH_MNT/testdir label 2>&1 | + _filter_btrfs_prop_error label echo "***" echo -e "\nTesting subvolume ro property" --1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 5 lines
Filipe David Manana, "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."