btrfs: check for matching kernel send stream
authorAnand Jain <anand.jain@oracle.com>
Wed, 13 Aug 2014 01:16:42 +0000 (11:16 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 13 Aug 2014 01:16:42 +0000 (11:16 +1000)
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 <anand.jain@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc

index 12eb989ee194527e58097363101df374cad49ce1..16da898d1eddff234beb4990c7fee4e11941e240 100644 (file)
--- 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()