From: Anand Jain Date: Wed, 13 Aug 2014 01:16:42 +0000 (+1000) Subject: btrfs: check for matching kernel send stream X-Git-Tag: v2022.05.01~3096 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6bcae5cbe4a3c1cf990ee7c972494360c00611c7;p=users%2Fhch%2Fxfstests-dev.git btrfs: check for matching kernel send stream The test case btrfs/049 is relevant to send stream version 2, and needs kernel patches as well. So call _notrun if there isn't matching kernel support as shown below btrfs/047 [not run] Missing btrfs kernel patch for send stream version 2, skipped this test Not run: btrfs/047 Signed-off-by: Anand Jain Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/common/rc b/common/rc index 12eb989ee..16da898d1 100644 --- a/common/rc +++ b/common/rc @@ -2310,6 +2310,11 @@ _require_btrfs_send_stream_version() if [ $? -ne 0 ]; then _notrun "Missing btrfs-progs send --stream-version command line option, skipped this test" fi + + # test if btrfs kernel supports send stream version 2 + if [ ! -f /sys/fs/btrfs/send/stream_version ]; then + _notrun "Missing btrfs kernel patch for send stream version 2, skipped this test" + fi } _require_btrfs_mkfs_feature()