btrfs-progs: tests: update stream version checks in misc/058

The send stream v2 is supported if the file exists and does not contain
"1". The previous fix reversed the condition but this does not work on
kernel with v1 only support.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-11-04 20:20:24 +01:00
parent 584b3e1d55
commit bd2b4158c8
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ check_prereq btrfs
setup_root_helper setup_root_helper
prepare_test_dev prepare_test_dev
if ! grep -s '1$' "/sys/fs/btrfs/features/send_stream_version"; then if ! [ -f "/sys/fs/btrfs/features/send_stream_version" ] ||
grep -s '1$' "/sys/fs/btrfs/features/send_stream_version"; then
_not_run "kernel does not support send stream >1" _not_run "kernel does not support send stream >1"
exit exit
fi fi