Commit Graph

18 Commits

Author SHA1 Message Date
Michal Berger
7a0274fc38 test/ocf: Drop .ini config in favor of json
In persistent-metadata test,
add a sleep because of issue #1348

Change-Id: If9ecaf660ac7ed18614d87cc775e60371ca84a97
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1327
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-05-20 14:14:50 +00:00
Michal Berger
844c8ec383 check_format: Reformat the Bash code in compliance with shfmt
Change-Id: I93e7b9d355870b0528a0ac3382fba1a10a558d45
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1718
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 20:52:21 +00:00
Vitaliy Mysak
75c1681c86 test/ocf: factor out common functions
Move code like nvme_cfg and clean_nvme
to a new file - test/ocf/common.sh

Change-Id: Ife00cd979857ce69949ce9c9d9ad0b5581bb382b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1629
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-14 11:35:17 +00:00
Vitaliy Mysak
8d22cb3e4d test/ocf: clean metadata before test
Now that we are switching to json config,
metadata takes priority at startup,
which can result in test failure because
some devices were created from metadata.

This patch uses clear_nvme() - the same function
that is used in test/ocf/management/persistent-metadata.sh
It is factored out in following patch.

This patch fixes issue #1287

Change-Id: I16d40d0c1586a970c30761c0e1a81445621a419d
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1628
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-14 11:35:17 +00:00
Maciej Wawryk
fdc82d3bc8 test: Shellcheck - correct rule: Double quote array
Correct shellcheck rule SC2068: Double quote array expansions to avoid re-splitting elements.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iefc4f0104249f4d437a66c3d9c7a195f4f6f6da3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-27 07:08:57 +00:00
Maciej Wawryk
25f601cfb8 test: Shellcheck - correct rule: Expanding an array
Correct shellcheck rule SC2128: Expanding an array without an index only gives the first element.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0e7c335af678114dc78dfb12a02369a69158e435
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474989
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-11-27 07:08:57 +00:00
Seth Howell
5816421572 test/ocf: kill -9 bdevperf in stats.sh
We have encountered several latent failures in test/ocf/stats.sh because
we fail to kill bdevperf with sigterm. We really need to figure out why
we can't always kill bdevperf, but in the meantime we can get this test
passing consistently by sending sigkill to bdevperf.

Change-Id: I6f233f4da79293283e3afaf01fd4baf5e60048bd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475315
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-22 13:50:56 +00:00
Vitaliy Mysak
fa540f18d8 test/ocf: split tests for io types and get_stats
In bdevperf-iotypes we used to call "bdev_ocf_get_stats" RPC
which is not a part of IO types testing.
As a result, we started to get failures caused by that rpc call which
were not related to ocf bdev IO handling (issue #1025).

This patch isolates the RPC call to separate test.

Change-Id: I3a72ef52452868d49a6ec1ae4d3f9643496c2a28
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474052
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-11-14 15:40:34 +00:00
Pawel Kaminski
95482c547c rpc: Rename ocf get_bdevs and get_stats related rpcs.
Rename get_ocf_stats to bdev_ocf_get_stats.
Rename get_ocf_bdevs to bdev_ocf_get_bdevs.

Change-Id: I627d9ff7bcc3f30ec19d245e5caa06238cda3a9e
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466519
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-30 15:41:30 +00:00
Vitaliy Mysak
5875bb0e3b test/ocf: disable norandommap flag
disable FIO norandommap flag because it is incompatible with
  verify which in context of async IO could cause verification errors.
More on norandommap:
  https://fio.readthedocs.io/en/latest/fio_doc.html#cmdoption-arg-norandommap

Change-Id: I94392495a1f9f06360e3791fca31b88908d19dcb
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457001
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-07 18:18:42 +00:00
Vitaliy Mysak
73224f880e test/ocf: enable serialize_overlap flag for FIO
Set serialize_overlap=1 to prevent data races.
This solves the issue of fio --verify fails in OCF tests
  when persistent metadata is enabled.
  Example:
     https://dqtibwqq6s6ux.cloudfront.net/public_build/autotest-per-patch_33325.html

The serialize_overlap flag prevents from
  creating undefined regions by doing simultaneus writes
  (occurs on certain storages).
  More on that:
     https://fio.readthedocs.io/en/latest/fio_doc.html#cmdoption-arg-serialize-overlap

We should probably use this flag for all FIO --verify tests.

Change-Id: Ia4f73f9900835faf4f94018f1d148fb64f06dc8a
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456991
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-07 18:18:42 +00:00
Tomasz Zawadzki
3b9db6c403 test/fio: export single variable for running fio_plugins
This patch adds functions in autotest_common.sh,
fio_bdev() and fio_nvme() for their respective plugins.
It simplifies its usage throughout the scripts.

Additionally will help with expanding the fio cmd
line with nessecary changes only in single place.

This will be used in next patch in series to
LD_PRELOAD ASAN before fio_plugin.

Note: Did not implement changes for perf scripts,
since they are usualy run separately and didn't want
to affect those.
Similarly didn't change vhost initiator tests,
because the exported directories do not work for
inside the VM. Will need to think of a way to change it
there as well.

Change-Id: Idf750ee7aa9d5e30efc0ce430d15fa45ceccb203
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456314
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-06 05:17:16 +00:00
Vitaliy Mysak
d6f0613d19 ocf: test: use all cache modes
Modify FIO test to use all cache modes that we support,
  including WriteBack

New test config uses Nvme bdevs instead of mallocs because
  memory is an issue when testing OCF

Change-Id: I3abec9605b61791f8ebaaaf08b88a011a50d3f26
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451022
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-23 19:01:38 +00:00
Jim Harris
211cb4c250 test: don't call python explicitly
We use python3 now, not python.  This is important
because in next patch we will use a new 'aliases'
keyword argument in the argparse API that's only
available in Python 3.

While here, clean up some documentation that was
instructing users to call python explicitly instead
of just invoking scripts/rpc.py directly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0c11e131cd56f7c994aa8fe21b4b00ae33489fdd

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453460
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-08 14:22:19 +00:00
Vitaliy Mysak
f186434ec2 ocf/test: update integrity test for multicore case
Change integrity test with FIO
  to use multicore configuration.

Change-Id: I0527d9e7832c1a686b9b4fb20cb317ed17acb051
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445098
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-03-15 19:04:10 +00:00
Vitaliy Mysak
27e0190b84 OCF: rpc: add stats method
Add get_ocf_stats rpc method that
  returns available OCF statistics for specific OCF bdev

Change-Id: If043a18c847fbeeddd8fdde1af9397e24bd90718
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/438411
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-01-28 18:53:31 +00:00
Vitaliy Mysak
c61be1af59 OCF: tests: add flush and unmap test
Add test for flush and unmap IO types
We test correctness with bdevperf -w
  by watching if any errors produced during its run

Change-Id: I07dcda5b976aa0d23e75ef2a312dd9780c6c39f3
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439647
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-28 09:41:52 +00:00
Vitaliy Mysak
2fde729fd7 OCF: tests: add integrity test
Add SPDK_TEST_CAS suite
Add basic integrity test with multithread-multidevice fio with cache
  modes WT and PT

Change-Id: If2916558894d9f7efd9628eb99f7338c90b312b1
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439346
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-01-28 09:41:52 +00:00