Commit Graph

2007 Commits

Author SHA1 Message Date
Dariusz Stojaczyk
218fd85dc1 bdevio: check spdk_app_parse_args return code
This makes us exit immediately on '-h' or any parsing error.

Change-Id: I6bd2fc9238bcecba6df1e62a8db42ce79ad73524
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422686
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-20 16:28:01 +00:00
Jim Harris
671b77e5cd bdev: remove vbdevs and base_bdevs arrays
The intents of these arrays was to keep track in the
bdev layer of all base<->virtual bdev relationships -
i.e. which member disk bdevs make up a RAID bdev,
which logical volume bdevs are associated with a
bdev that contains an lvolstore, etc.

Currently none of this is used however.  And trying
to keep track in the bdev layer instead of asking
the bdev modules for the relationships has a number
of complications.  Early one, we tried to do this
with TAILQs - but that doesn't work since this can't
be done with a single TAILQ_ENTRY in the bdev
structures.  So we moved to arrays - that works a bit
better, but then the pointer arrays have to be
realloc'd which isn't ideal.

The biggest problem though with these arrays is that
they held bdev pointers - not bdev descriptor pointers.
It's not really valid to access bdevs without a
descriptor - the descriptors are what make sure active
references are accounted for when a bdev is hotplugged.
Of course the bdev layer knows when a bdev is getting
removed and could go and do the updates to these
arrays separately - but that just seems very convoluted.

So for now just remove these arrays completely.  If
there is a future need for the bdev layer to
understand relationships between bdevs, we can add
module APIs so that the generic layer can ask
the modules about the relationships.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I99ef1068240bff1262f64f234260cf2fb44df51d
Reviewed-on: https://review.gerrithub.io/420932
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2018-08-17 00:11:03 +00:00
Jim Harris
e7c9f62046 jsoncat, histogram_perf: add missing dependencies
These weren't needed for static linking, but popped
up as problems with some upcoming patches enabling
individual shared libraries.

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

Reviewed-on: https://review.gerrithub.io/422442
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 14:27:18 +00:00
Seth Howell
fdf5e5854b test/nvmf: add init and fini functions to tgt tests
These functions enable a user to run one of the Nvme-oF tests directly
from the command line without having to manually invoke all of the setup
we typically do.

Change-Id: Ib0baa77c08abb24c2fa2a1e21cf38ac613d663e0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/422336
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 03:37:26 +00:00
Jim Harris
aec9c3cded test: use spdk_unittest.mk for raid unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I925bf71414fe74868eb14faf365e09258fea87eb

Reviewed-on: https://review.gerrithub.io/421177
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Kunal Sablok <kunal.sablok@intel.com>
2018-08-15 23:32:04 +00:00
Jim Harris
c899854d03 bdev: add new fini_start notification callback for modules
When an SPDK application shuts down, the bdev layer will
automatically unregister all of the bdevs to ensure they
are properly quiesced and cleaned up.

Some modules may want to perform different operations when
a bdev is destructed during normal runtime vs. shutdown.
For example, for lvol, when the last lvol is cleaned up,
it should unload the lvolstore, release and close the bdev
that contains the lvolstore.  You never want to do this
during normal runtime though - it is perfectly valid to
have an lvolstore that contains no lvols.  RAID and future
bdev modules such as multipath have similar use cases.

So add a new bdev module callback named "fini_start".
If a module specifies a function pointer for this callback,
the bdev layer will call it before it starts the bdev
unregistrations.

This enables some future patches to the bdev layer such
that it will always unregister block devices that are not
claimed (i.e. logical volumes) before block devices that
are claimed (i.e. the bdev containing an lvolstore).

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

Reviewed-on: https://review.gerrithub.io/421175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-08-15 23:32:04 +00:00
Pawel Niedzwiecki
341fff6397 test/iscsi: Add installation of socat in vm_setup.sh configuration
script

socat is used in iscsi_tgt's libsock test

Change-Id: I027930a99e58ff9862a540d5eed3b1a50de28a93
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/422255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 18:09:46 +00:00
xuhuagen
9f6b1099e5 autotest: add unmap,flush,reset testing for iscsi initiator.
Change-Id: Ic5fffd0fbdf7693aa85cc16ff259fe107438637d
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/422031
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 17:36:40 +00:00
Chen Wang
1f0bff73df test: refactor the run_test function to add detailed information
1.Refactor the run_test function which used to add detailed information
  during run test suites and test cases.
2.Refactor the lvol feature test scripts to make sure their log is the same.
3.Users can use "run_test suite command" to run test suites
  and use "run_test case command" to run test cases.
4.Update the vhost and lvol test as example.

Change-Id: I7b6387019a861bd1c4f89b9a7712e53150aea8fa
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/403610
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-15 17:24:01 +00:00
Changpeng Liu
dc55e08d01 test/nvmf: remove nested lvol test for nvmf
When adding one bdev to NVMeoF Namespace, subsystem
will claim the bdev to prevent shared access to the
same bdev, for nested blobstore tests, this will
fail for NVMeoF test.

Fix the issue #396

Change-Id: Ifade610dc821ae0a7535b1f3f1ef5a44ca43133d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421136
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2018-08-14 02:44:53 +00:00
Pawel Wodkowski
0f842e860e jsonrpc: call spdk_jsonrpc_free_request only from server thread
Decrementing struct spdk_jsonrpc_server_conn::outstanding_requests
should be atomic since this variable are accesed from multiple threads.
Istead of that just route the request back to the server thread with
nothing to send.

As we are here change spdk_jsonrpc_server_send_response() to take only
struct spdk_jsonrpc_request parameter.

Change-Id: I9b856e7d530355cea43a29f58f4f9405e7e35fc2
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/422124
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-13 20:01:07 +00:00
Ben Walker
ed60507d5e nvmf: Queue pairs can no longer be removed from poll groups
In RDMA, qpairs can't be removed from poll groups because
the poll group defines the completion queue. So don't
allow this operation anymore, even if it were theoretically
possible on other transports.

Change-Id: I69a3d1b336decd2d25e43ddea94f8b2095ef662f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/421174
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-13 18:57:45 +00:00
Pawel Niedzwiecki
1b85cdad64 test/lvol: add tasting with different lvol store cluster sizes
Added new test case 702 for tasting lvol stores, similar to tc700
but with different lvol store cluster sizes.

Change-Id: Id33fc6ff9520ed21219f49f161bd41c4f6b71848
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/420758
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-13 17:37:26 +00:00
Pawel Niedzwiecki
96ed6f24ba test/lvol: Use AIO bdevs instead NVMe in lvol tasting
If lvol tasting test cases fails for some reason, lvol store
is keeped on on NVMe bdev making it problematic to remove.
Fails on AIO bdevs are easier to handle.
This also remove usage of .conf file in this test.

Change-Id: I58da80defa7a00e95084e34d6447b890272586ec
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/420898
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-13 17:37:26 +00:00
Pawel Niedzwiecki
a88b1371eb test/lvol: make get_lvol_bdev_split_size return size for specified
lvol store and change its name to get_lvs_divided_size

- add default values for get_lvs_size and get_lvs_cluster_size

Change-Id: I86c0a878975f6e14cd0e6c64d764a0ec2973dd5b
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/420773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-13 17:37:26 +00:00
Dariusz Stojaczyk
aed8986d73 app: drop -w parameter (wait for rpc init)
--wait-for-rpc can be used instead.

This parameter will eventually become obsolete,
so let's remove the short version. It will be
exclusively used for "workload" in perf apps.

Change-Id: Ib4b7001d0e756349b05788278c894d622bc89790
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/421863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-13 17:30:10 +00:00
Dariusz Stojaczyk
f727997fd8 bdevio: parse all available cmdline options
The config now has to be provided with '-c' or '--config' param.

Change-Id: I999c84d899b1e15cd4f34120016f6a18fc0e84c9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/421734
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>
2018-08-13 17:30:10 +00:00
Dariusz Stojaczyk
ff0f97cf4d bdevio: don't hardcode lcore ids
In order to allow specifying a custom cpumask
we have to prepare the environment a bit.

Change-Id: I45d2c960c05c7583cc2781c985760813ef1f2b77
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/421733
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-13 17:30:10 +00:00
Dariusz Stojaczyk
c2dc15a0ec app: allow full-name command line options
The following commands now have the same effect:

```
$ spdk_tgt -w -p 1 -m 3 -s 2048
$ spdk_tgt --wait-for-rpc --master-core 1 --cpumask 3 --mem-size 2048
$ spdk_tgt --wait-for-rpc --master-core=1 --cpumask=3 --mem-size=2048
```

Change-Id: I8540a377abf7e02987e9ecd957d142212e9609c4
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420864
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-13 17:30:10 +00:00
Tomasz Kulasek
349f43c2fc sock: fix socket memory free
Memory for socket structure is allocated in the selected net
framework but freed in the libsocket on the higher level.

This patch moves memory free to the net framework implementation.

Change-Id: Ia3d4e1553a858a38beb390986e9af105778c12c7
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/421587
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-10 15:38:38 +00:00
WangHaiLiang
8680bea106 test/common: remove "rbd pool init"
Fix the issue #384.
Avoid false information:unknown option 'pool init rbd'

Change-Id: I6aee52d1b3a1b4ca250963922d01d7f66151832f
Signed-off-by: WangHaiLiang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/421482
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-08-10 03:10:23 +00:00
Changpeng Liu
d5b84ce9d7 test/nvmf: reduce the resource consumption in autotest
When testing test/nvmf/lvol/nvmf_lvol.sh in test pool, Linux
reported error with "Failed to write to /dev/nvme-fabrics:
Cannot allocate memory" sometimes when connecting to target.
While here, reduce the test cycle count to avoid such error.

Change-Id: Ie9283d3e9ad2d13aadf2255225b0ff1184bed267
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421665
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-10 03:09:21 +00:00
Pawel Wodkowski
94eae4eef5 test/vhost: dont't terminate existing master connection if OS is booted
Terminating master connection will terminate other connections so can't
use test/vhost/common/vm_ssh.sh to connect from two terminals. This
patch terminate master connection only if guest OS is not booted.

Change-Id: I711fed525f1ce813c3aa3d03255a1b32513d24bd
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/421684
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-09 18:10:54 +00:00
Ben Walker
f56b230063 test: Simplify the mock library
Unify the regular mocks and the pointer mocks. Simplify
several of the #defines.

Change-Id: Ica8c69dbb70a685a55b5961b73fd7872f451c305
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/418884
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-08-09 17:18:23 +00:00
Seth Howell
d5de73e017 test/nvmf: Clean up Soft-RoCE NICs after json_config tests
This was leaving soft-roce nics around from run to run.

Change-Id: Ia1114f40aeeae3332aa30310235feab14a1006d4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421653
Tested-by: 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: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-09 06:22:30 +00:00
Seth Howell
ab9451bcd0 test/nvmf: Only use Soft-RoCE when RNICs aren't available
Change-Id: I1a48d873afb7579327607182042b2474d8f191cf
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421412
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-08-09 06:22:06 +00:00
Karol Latecki
a1acca9274 test/common: fix typo in vm_setup.sh
sgdisk is a part of package gdisk, not a package itself

Change-Id: I214f9720aaeda88006c40e915960c2e1d5cd87b3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/421496
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-08-08 15:54:02 +00:00
Changpeng Liu
8d127f780b test/nvme/reset: exit the test if no controllers avaiable
Fix the issue #386.

Change-Id: I2d7434d6204a7f074f985584fb18b4f5f1f23f5c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421070
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-08-06 23:38:48 +00:00
Changpeng Liu
3599aa1093 test/nvme: exit error injection test when no controller
Fix the issue #383.

Change-Id: I18bd86b5331650c24d5d76ecb1aa40f5e7061d01
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421071
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-06 21:15:28 +00:00
Changpeng Liu
ff458be850 nvmf: claim each bdev when constructing new Namespace
Claim the block device when adding it to a new Namespace,
and prevent the block device to be added twice for other
modules and Namespaces.  Also remove the test that using
same block device over different Namespaces.

Fix issue #371.

Change-Id: Ib7ce18e9fde4a15c0f19ce9e28e69145e54570e0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/420472
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-06 21:14:37 +00:00
Shuhei Matsumoto
57dd0d5085 bdev/raid: Get struct raid_bdev from struct spdk_bdev_io in IO submission
During IO submission, raid_bdev can be get by bdev_io->bdev->ctxt.
Hence holding raid_bdev in raid_bdev_io_channel is duplicated.

Change-Id: I722432718aca8c5846541816b6ecca56821d77f6
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/421182
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kunal Sablok <kunal.sablok@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-08-06 18:14:30 +00:00
Shuhei Matsumoto
056980c10c bdev/raid: Embed struct raid_bdev_ctxt into struct raid_bdev
Locating spdk_bdev structure to the beginning of raid_bdev structure
will simplify the hierarchy and match other bdev modules.

Change-Id: I1bfbf773bc96a4f144e6bff772ade05bb42762e9
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/420818
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kunal Sablok <kunal.sablok@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-06 18:14:30 +00:00
Karol Latecki
372b0d4931 test/common: add elfutils to vm_setup
Some functions in autotest rely on eu-readelf binary but only
elfutils-devel package was installed in vm_setup.sh script.

Change-Id: Id51ed672a0ef309121e1dddc2a1c8a360f3940c5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/421189
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-06 16:29:19 +00:00
Karol Latecki
b606baabbc test/common: fix for eu-readelf path over 80 chars
Readelf psargs field holds file path up to 80 chars.
Above 80 chars path is truncated and --wide option does not
enable displaying longer path.

Added checking if the path was not truncated by testing if
file path from psargs exists. If it does not - check rest of
eu-readelf output for a matching path and use it instead.

Change-Id: Ia89b41115803e2463e2030e739121ce1fa8039e0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/421100
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-06 16:29:19 +00:00
chenlo2x
62209642ce Autotest: revise coding-style of all script under the test/iscsi_tgt directory.
These changes were modified by the shfmt tool that supports Google's Style guide.

Change-Id: I27dd8ba91afc0043b3ce5f0eb6121a3c11789fab
Signed-off-by: chenlo2x <longx.o.chen@intel.com>
Reviewed-on: https://review.gerrithub.io/408147
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-08-01 16:42:19 +00:00
Pawel Niedzwiecki
a278b14296 test/qemu: Update qemu version to spdk-2.12
Change-Id: I2784166f6b92440ab4979d4ccfd588f91252bbaa
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/420878
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: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-31 19:59:10 +00:00
Seth Howell
f2b22d68d6 subsystem: defer channel iter until pg functions return
The poll group pause, resume, remove, and add functions are only called
from the subsystem_state_change_on_pg function. Previously, they would
return immediately and the state change would move on to the next
channel. However, some of these functions (specifically remove) kick off
asynchronous APIs and we should not iterate past them until those
asynchronous operations complete.

Change-Id: I78804273b39f2d171ba26ac4478ad515356833f3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/419289
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-31 16:14:29 +00:00
Ben Walker
a1ec258ac7 Clean up some incorrect Copyright statements
Daisuke Aoyama originally contributed to istgt, the
iSCSI target in FreeBSD. The SPDK iSCSI code is
originally derived from that. Due to copy and paste,
some incorrect copyright attributions have been added
to other files that do  not derive from istgt, so
this patch removes those.

It is doubtful, at this point, that there is any code
whatsoever that remains from the original istgt, but
we can revisit that at a later time.

Change-Id: I207e1e6b99d271e2f12690be90a96f7d0c113af7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/420679
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-30 16:29:38 +00:00
Shuhei Matsumoto
e923c66a07 bdev/raid: Free all strings allocated by JSON decoder on all paths in RPC
Use strdup for all strings allocated by JSON decoder and free them on
all paths.

Change-Id: Ia30d32c2fd6bd79f62588ca19bd3bb093d38a502
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/420325
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kunal Sablok <kunal.sablok@intel.com>
2018-07-30 15:44:27 +00:00
Shuhei Matsumoto
90f54670bc bdev/raid: Use TAILQ to manage RAID bdev configuration
Change-Id: I971df38c577284916212e58b77c73499127a980a
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/420217
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-30 15:44:27 +00:00
Shuhei Matsumoto
32cc0199d1 bdev/raid: Use single character variables to index and loop iterator
Change-Id: I1023a509f938fcbe6ac0c35dca5192c36990de91
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/420216
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kunal Sablok <kunal.sablok@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-07-30 15:44:27 +00:00
Jim Harris
ecb44872b6 test: add some basic raid tests
RAID is experimental for 18.07, pending iov support
which is needed for vhost.  But we need to at least
build RAID in our tests, and run some basic
bdev tests to ensure it doesn't quickly become stale.

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

Reviewed-on: https://review.gerrithub.io/420678
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-30 14:59:45 +00:00
Jim Harris
c60ae3c356 raid: get buffer on reads before sending child ios
For front-ends like iSCSI (and NVMe-oF in the future)
which want the backend to specify the data buffer, the
RAID module doesn't copy the pointer to the allocated
buffer from the child IO back to the parent IO.  It
really can't copy the pointer - the child IO owns it
and will free it.

So the RAID module needs to allocate the buffer first
and then pass it down.

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

Reviewed-on: https://review.gerrithub.io/420677
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-30 14:59:45 +00:00
Tomasz Zawadzki
98db8f083d ut/blobstore: add spdk_bs_load() tests for different cluster_size
Previously cluster sizes only set as default were tested,
this patch adds test for load when different cluster_size is used.

Change-Id: I585adff25c81de809435ef235314cd4b8b116261
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/420607
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-07-27 21:44:46 +00:00
Pawel Niedzwiecki
6642c9e9de teest/lvol: Use lvol store default cluster size
Change-Id: I45b6b0abe989cecb7293a3fb8c5a9299f618af7e
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/420630
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-27 21:43:47 +00:00
Pawel Niedzwiecki
9ead0e506c test/lvol: get proper size for construct_lvol_bdev
Change-Id: I7c4686ffc3800867227cac6e2b9a04bf1be05970
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/420652
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-27 21:43:47 +00:00
Seth Howell
388e310150 nvmf: add free_req function pointer.
At times, it may be necessary to free requests without completing them.
For example, when freeing a qpair, one needs to free the AER sent from
the host before deleting the qpair. It is important not to send a
completion for the AER because:
1. According to the spec, this will trigger the host to send another AER
2. No Asynchronous Events have occured, so we should not complete the
AER.

Change-Id: I92e163f0fed0ee2bc942569a647cb3c1967edec9
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/419732
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-07-27 20:50:36 +00:00
Pawel Niedzwiecki
9668121208 test/iscsi: replace config files from iscsi tests with json and rpc calls
fio.sh still uses conf file because hot remove is not yet imlemented
in rpc calls

Change-Id: If9066e6b24e1e3d381876909fb9e00000a302e02
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/419125
Tested-by: 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>
2018-07-27 16:49:55 +00:00
Tomasz Zawadzki
6d4e910f32 test/spdkcli: Fix: Add missing delete_*_bdev methods
Change-Id: I4973e98de2efcaf6e3f816712780745f5e8ae450
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/420547
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-27 16:48:02 +00:00
Pawel Kaminski
68c4df0f02 test/spdkcli: Test for virtio bdevs.
Change-Id: Id6ecc0960e21e22c8705f28affcffad7a7001665
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/418679
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-07-27 16:48:02 +00:00