Commit Graph

49 Commits

Author SHA1 Message Date
Michal Berger
b80667550f scripts/setup remove flakiness from tests
This removes all the sleeps called after setup.sh reset. These
sleeps were meant to wait for devices given tests depend on.

Change-Id: Ibb86c9f6f8d5f1b05d165e84d9019530af84f9ea
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4035
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-09-09 07:19:43 +00:00
rafalste
4d91b4ef01 bdev/ocf: add cache line size
Define cache line size when creating cache device.

Signed-off-by: rafalste <rafal.stefanowski@intel.com>
Change-Id: Ica536a9bda35c355b4dd4e406a241defc1453f53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3449
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-12 10:39:56 +00:00
Tomasz Zawadzki
1350922d09 bdev/ocf: take additional reference for ocf_cache
Fixes #1498

When shutting down the application, it was possible to
reference stale ocf_cache pointer. This was the case
when two or more vbdev_ocf devices were based on top
of single cache bdev.

This issue did not occur outside of the shutdown case,
since RPC only allows deletion of the vbdev_ocf.
This erases on disk metadata and next run of the application,
would not detect such vbdev_ocf.

Shutdown meanwhile works different, by first stopping
the instance of running "ocf_mngt_cache" and later detaching
"core" devices (the ones being cached). This prevented
erasing the on disk metadata and allowed for restarted
application to detect vbdev_ocf.
See patch (1292ef2) for details.

Since references to ocf_cache are copied between vbdev_ocf
[see start_cache()], the reference count inside ocf_cache
was limited to original ocf_mngt_cache_start() and
management queue creation. First call into ocf_mngt_cache_stop()
released all references to ocf_cache. Leaving other
vbdev_ocfs pointing to released memory.

This patch works around this issue by increasing ref cnt
on ocf_cache for each vbdev based on top of it.
It allows to call into ocf_mngt_cache_stop(), but not
release the memory for ocf_cache until last vbdev.

Note:
A proper redesign here is in order:
- either rearranging structures to be based around single ocf_cache,
rather than multiple vbdev_ocf instances
- better use of OCF API to reduce book keeping logic in vbdev

There are plans to implement detach/attach in RPC,
so it should be a focus during that effort.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I560a7fbb1c052bf53970e655bdb60803c561a252
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3574
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-30 04:02:08 +00:00
Tomasz Zawadzki
e63845a6df ocf/test: disable persistent metadata test
related #1498

Updating DPDK 20.05 exposes issue listed in #1498.

Most likely the device removal path has to be re-worked
to accomodate multiple devices on the same cache instance.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I28f71ef2c2e1d9c2d19202cd33a932182bfb122c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3521
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 22:06:11 +00:00
Ben Walker
6b9b448e53 build: Output executables from the app directory to build/bin
Automatically place binaries produced from the app directory
into build/bin. This matches with the output in build/lib
that already exists.

Change-Id: I13cd2da71d2f88592e22308fe8a907bf458458b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2379
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-15 15:27:16 +00:00
Tomasz Zawadzki
bcf04682f1 test/ocf: do not use iter_pci_class_code in OCF test
See commit msg from db43b387:
"Do not use iter_pci_class_code function in tests to
iterate over NVMe drives. This function can return
drives which at the moment of execution can not be
whitelisted for use.

This can result in test errors (such as simply
bdev_nvme_attach_controller RPC command failing) or
even using and deleting data from NVMe drive which
was not meant to be used in tests."

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifa70a51822f78e95b6cddbfe665ea95ec1b423c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2837
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-11 19:52:08 +00:00
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
Michal Berger
1dfac8ba69 test/ocf: Don't depend on gen_nvme.sh while detecting nvme ctrls
gen_nvme.sh requires that all the nvme devices are not bound to the
nvme driver which doesn't have to be the case when clear_nvme() is
called. To not depend on which driver is in use, simply iterate over
pci bus to find a proper device. This avoids additional setup.sh
ping-pong which is required to make use of gen_nvme.sh.

Additionally, upon exiting, in case mounts for given nvme device were
detected, keep the test environment reset to leave nvmes bound to the
nvme driver.

Change-Id: I428c5e2b0517553d267411a30316bde5d1ce8eef
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1843
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-20 14:28:56 +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
Seth Howell
a571eb03e9 test: move report_test_completion into run_test
This also requires us to change the create_test_list function to rely on
the run_test function for creating the canonical test list.

Change-Id: Ib35e7752935a3ac83de2702b6dfbd42539027f6a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476962
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Seth Howell
9db5eca6a8 test/ocf: use run_test framework directly.
Change-Id: I7363102aac4363e1d8cf8e68281ad869afb4269b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476956
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-07 12:15:34 +00:00
Seth Howell
cb90136c33 test: eliminate case and suite from run_test
We will be able to distinguish case and suite in the post process
scripts based on if they have any internal tests.

Change-Id: Iff2aa5caa251924d8a842085d87eb2a17aca45d4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
1fafd71bc3 test: add timing calls to run_test
And clean out the corresponding calls to timing_enter and timing_exit
from the various test scripts.

Change-Id: I0759417b5a529e4c3649ce04cca1799c089da278
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476804
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-10 17:12:03 +00:00
Seth Howell
3710048472 test: add a test_name param to run_test
This will allow us to use timing_enter and timing_exit directly
inside the run_test function. That function already lends itself well to
nesting the way we do our timing.

This patch series is aimed at combining the timing_*, run_test, and
report_test_completions calls all into a single place. This will greatly
reduce the number of lines of code in our bash scripts devoted to
tracking timing, formatting, and test completion. It will also enable us
to expand on the reporting of test completions. Further down the line,
this will also allow us to unify test case documentation.

Change-Id: I8e1f4bcea86b2c3b88cc6e42339c57dfce4d58f2
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476799
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-10 17:12:03 +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
Richael Zhuang
a95aefc38a test: fix errors in test persistent-metadata.sh
Test failed both on x86_64 and aarch64 on some cases:
1.nvme_cfg=$($rootdir/scripts/gen_nvme.sh)
If the driver haven't been changed to vfio-pci(haven't run
scripts/setup.sh), we got no result from gen_nvme.sh.
2."mountpoints=$(lsblk /dev/$blkname --output MOUNTPOINT -n | wc -w)"
The global variable "blkname" (defined in get_nvme_name_from_bdf) is
always null here. For the scope of shell global variable is current
process. However, "name=$(get_nvme_name_from_bdf $1)" will create a
new process. We use variable "name" here.
3."name=$(get_nvme_name_from_bdf $1)"
If the "$rootdir/scripts/setup.sh reset" above is not ready, $name
will be null. For some non-x86 platforms, the waiting time maybe not
enough. So I adjust it to 5 seconds according to repeated tests.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Ia91460a3116bc0cc7c6c5f5ee471957caf9d0e06
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474184
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-11-21 08:03:49 +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
Maciej Wawryk
6f442e5005 test: Shellcheck - correct rule "Remove surrounding $()"
Correct shellcheck rule SC2091: Remove surrounding $() to avoid executing output.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ie172da21e478b1f06132506459f0edf080455b75
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469860
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-10-07 11:29:29 +00:00
Marcin Dziegielewski
1ee119ea8b test/ocf: new test remove.sh
This patch adds test that checks correctnes of delete_ocf_bdev rpc
command.

After delete_ocf_bdev command, all settings related to the removed
ocf instance should be cleared and this particular ocf instance should
not be loaded on next application start.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: Ifc61399d9f1ab7407f62b4a25e9bb1468f401880
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465674
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-10-07 11:24:19 +00:00
Marcin Dziegielewski
8f80af4c2a test/ocf/management/multicore: change in test to prevent failure
Because now bdev_ocf_delete function can fail if examine of this
bdev is still in progress, so to prevent that situation and in
consequence test fail, this patch adds small sleep to enasue that
examine are done before call bdev_ocf_delete.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: I7f7ac4921b539f20b0d22d68bd401b247cd9a813
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469407
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-27 15:27:55 +00:00
Pawel Kaminski
06a1b4199c scripts/rpc: Rename rpc delete_malloc_bdev to bdev_malloc_delete
Change-Id: I9841d79bfe1090bb25893610659300531b6b43a4
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465637
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-09 05:02:47 +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
Pawel Kaminski
557f8ff9ec rpc: Rename ocf create and delete related rpcs
Rename construct_ocf_bdev to bdev_ocf_create.
Rename delete_ocf_bdev to bdev_ocf_delete.

Change-Id: Iec456c2004cc7e6c61d29439e1b7a9b5dfe7dfaa
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466518
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
Marcin Dziegielewski
a3cb1debb0 test/ocf: change backend device in persistent-metadata test
This patch is related to issue #815. To avoid hung and re-enable
testing this part of ocf, this patch changes backed device from aio to
nvme.

Hung in this test was caused by implementation of AIO bdev and bdev layer.
All AIO bdevs are using the same shared context with limited queue depth,
so in some cases AIO can return NOMEM status. It's ok when we have more
than one IO from bdev layer perspective, if not we will stuck because
nothing will triger retry io procedure.

This patch only enables testing and are not fixing root cause of hung.

To prevent before unexpected behavior of this and next one test we
need to clear ocf metadata on nvme device.

This patch also reenables this test in CI.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: Ibab4aefb9aaf33d725db20345bd5c09c1e5eebdd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463605
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>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
2019-08-28 15:21:53 +00:00
Pawel Kaminski
7964f1df90 scripts/rpc: Change rpc construct_malloc_bdev to bdev_malloc_create
This is patch that implements changes according to proposal
submitted in https://review.gerrithub.io/c/spdk/spdk/+/453036

Change-Id: I5423cd34cb5fc111b34cab2b7f7c6c5f11898af8
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464677
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-14 22:15:08 +00:00
Karol Latecki
90c84ec532 test: use single quotes in trap instruction
Fix SC2064 issue.
Use single quotes, otherwise trap expands now rather than
when signalled.

Change-Id: I0b3a9157f52eed037e8d217f639c64d6876ec1e1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464655
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
2019-08-14 02:20:45 +00:00
Darek Stojaczyk
e83d5c4a2d test/ocf: disable persistent metadata test
It's randomly times out on waitforlisten. See #815

Change-Id: Ib9a75d0a96756810cb25f2a1ddf72bc800ea4b5c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-11 18:16:55 +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
e0edd0a205 test/ocf: add persistent metadata tests
We check if get_ocf_bdevs after shutdown is the same as before,
  which shows that state for all vbdevs wes correctly restored from metadata.

Change-Id: I9089642aeb840fc940b07908aa39c8193887432f
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455424
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
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
b883f3a036 test/ocf: print just basename of test script for timing
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3392956a841d7c4c2e8748940b7e1d7838bdb5d2

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454359
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-15 14:44:33 +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
Darek Stojaczyk
937e10b1f6 test/ocf: add missing test completion report
This way we can track which machine runs OCF tests.

Change-Id: I51ad8f467965ae7051caac06b834a9db9f0b1a8d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453542
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-05-07 17:47:59 +00:00
Darek Stojaczyk
d011196380 test/ocf: wait for spdk app to finish at the end
A termination signal was being sent, but we didn't
wait for the spdk app to actually exit. This was
actually causing an intermittent failure on our CI,
as the application could exit during our setup.sh
cleanup call, giving the following error:

```
Removing:    /dev/shm/iscsi_trace.pid284533
rm: cannot remove '/dev/shm/iscsi_trace.pid284533': No
such file or directory
```

Change-Id: Ic6ff0130b6264fa506c367d589853e5f3132c1d2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450032
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-11 18:23:08 +00:00
Vitaliy Mysak
bef0c6edd2 ocf: rpc: extend get_ocf_bdevs for multicore cases
Extend existing get_ocf_bdevs call to make it easier
  to get information about attached cores.

Implementation is based adding additional optional argument "name"
  to existing call. Based on "name" bdevs are filtered.
  Backward compatability of RPC interface is preserved.

This patch also adds tests for the case when name is given.

Change-Id: I4300ebe37e936bc5cca8e066b5f09db462a87cf7
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444841
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-26 23:30:31 +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
00565ee6b5 ocf/test: add management tests for multicore cases
Add functional tests on creation and deletion of
  of OCF bdevs with many-to-one configuration.

Change-Id: I6b740605a3341cb95e8d2a4173eeac04b0ae832b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445097
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
199080cfa2 OCF: rpc: add get_ocf_bdevs method
Add new RPC method for OCF bdev: get_ocf_bdevs
It is useful in respect to not registered OCF bdevs
  which do not appear in standard get_bdevs call

Change-Id: I8a5fc86a880b04c47d5f139aa5fa4d07ca39c853
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441655
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>
2019-01-28 18:53:31 +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
9f792ca0dc OCF: tests: add hotremove test
Add test for hotremove case for OCF bdev

Change-Id: Iaa1ee32feef50fa45be2bbf2351d9e6e9d3f2dfc
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439567
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>
2019-01-28 18:53:31 +00:00
Vitaliy Mysak
0487d3a4ee OCF: tests: add construct-delete tests
Add tests for creation and deletion of OCF bdev
We explicitly check 'claimed' property of base devices
Other issues like segfaults or custom SPDK errors
  also can be revealed by these tests

Change-Id: Ia1d79df8db2e734e8d868a733655f69a0348de8e
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439536
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@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>
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