From ae76e8f0d0659482e8c0440a93d63a9ce5786b10 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 23 Jun 2015 13:25:09 +0200 Subject: [PATCH] tests: skip when snapshot does not work Some older kernel (i.e. 3.11.10 on fc20) do not work properly. Skip the test if snapshot does not meet 50%. --- test/api/percent.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/api/percent.sh b/test/api/percent.sh index 0031a6767..a9b7b90a6 100644 --- a/test/api/percent.sh +++ b/test/api/percent.sh @@ -22,6 +22,8 @@ lvcreate -aey -l 5 -n foo $vg lvcreate -s -n snap $vg/foo -l 3 -c 4k lvcreate -s -n snap2 $vg/foo -l 6 -c 4k dd if=/dev/zero of="$DM_DEV_DIR/$vg/snap2" count=1 bs=1024 oflag=direct +# skip test with broken kernel +check lv_field $vg/snap2 data_percent "50.00" || skip lvcreate -aey --type mirror -m 1 -n mirr $vg -l 1 --mirrorlog core lvs -a $vg aux apitest percent $vg