From: Ilya Dryomov Date: Fri, 25 Jul 2014 12:04:53 +0000 (+0400) Subject: test_librbd_fsx: clone/flatten probabilities X-Git-Tag: v0.84~51^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2153%2Fhead;p=ceph.git test_librbd_fsx: clone/flatten probabilities Higher the clone probability to 8% and lower the probability of flatten to 2%. This should give us longer parent chaines (before this we would usually have one parent and even then only for a few ops time). Signed-off-by: Ilya Dryomov --- diff --git a/src/test/librbd/fsx.c b/src/test/librbd/fsx.c index ca218c8087d9..b7f31463962f 100644 --- a/src/test/librbd/fsx.c +++ b/src/test/librbd/fsx.c @@ -1634,11 +1634,19 @@ test(void) } break; case OP_CLONE: - if (!clone_calls || get_random() % 100 > 5 || file_size == 0) { + /* clone, 8% chance */ + if (!clone_calls || file_size == 0 || get_random() % 100 >= 8) { log4(OP_SKIPPED, OP_CLONE, 0, 0); goto out; } break; + case OP_FLATTEN: + /* flatten four times as rarely as clone, 2% chance */ + if (get_random() % 100 >= 2) { + log4(OP_SKIPPED, OP_FLATTEN, 0, 0); + goto out; + } + break; } switch (op) {