tests: show description even when not running tests

This is useful when we select tests to be run.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
tests: add test to check vdi deletion

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: return error when reading snapshot without snapid or tag

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
use req->vdi.snapid to specify whether snapshot is created or not

SD_OP_NEW_VDI operation uses req->vdi.snapid only to check whether
sheep should create a snapshot or not, so setting req->vdi.snapid to
snapshot id is wrong.  This patch uses a boolean variable for it
instead.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
allow creating snapshot when there is no current image

This fixes vdi_rollback and vdi_restore.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
tests: fix test results of 039 and 041

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep/plain_store: fix error path in default_create_and_write

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
tests/011: fix random suprious fail

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
simplify exec_req

We can know how many bytes should be read and written from sd_req
header, so we don't need to pass the size with rlen and wlen.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
fix coding sytle errors detected by checkpatch.pl

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
add const where possible

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
sheep: fix recover complete notification

hdr->epoch cannot be used to notify a recovered epoch because the
field is updated in queue_request.  This patch uses hdr->obj.tgt_epoch
instead.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
don't set hdr->epoch for non peer requests

The field is used only for internal protocols.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
collie: "node kill" needs node list before its execution

"collie node kill" needs node list before its execution. It seems that
the flag SUBCMD_FLAG_NEED_NODELIST is eliminated in the commit:
8555a67353e87b0292e90a5d59e3d60a26f6eace

After this commit, collie node kill exits with an error like this:
    Invalid node id '0'

Cc: levin li <xingke.lwp@taobao.com>
Cc: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
vditest: use qemu-io '-t' option to specify cache mode

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
vditest: add -f option to specify flush interval

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
vditest: add verbose mode

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
vditest: allow specifying vdi name before command line options

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
vditest: add '-r' and '-w' options to set read and write ratio easily

This also makes read-only test default like disktest.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
vditest: add '-T' option to specify runtime

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>