btrfs-progs: tests: use feature output from "btrfs --version"

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>
This commit is contained in:
Qu Wenruo 2024-07-18 15:09:18 +09:30 committed by David Sterba
parent fdbab93ca5
commit c5ee9301c6
1 changed files with 1 additions and 5 deletions

View File

@ -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