Skip to content

Commit

Permalink
btrfs-progs: tests: use feature output from "btrfs --version"
Browse files Browse the repository at this point in the history
With the new feature description output in "btrfs --version" there is no
need to do the config.h hack to determine if we have certain feature.
This provides a more reliable way to detect features.

Signed-off-by: Qu Wenruo <wqu@suse.com>
  • Loading branch information
adam900710 authored and kdave committed Jul 30, 2024
1 parent fdbab93 commit c5ee930
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/common
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ _test_config()
{
local feature="$1"

if [ ! -f "$TOP/include/config.h" ]; then
echo "include/config.h not exists"
exit 1
fi
if grep -q "$feature.*1" "${TOP}/include/config.h"; then
if "$TOP/btrfs" --version | grep -q "+${feature}"; then
return 0
fi
return 1
Expand Down

0 comments on commit c5ee930

Please sign in to comment.