Commit Graph

1572 Commits

Author SHA1 Message Date
Pawel Niedzwiecki
b96cf2ef2a test/common: Separate failing nightly tests
Introduce RUN_NIGHTLY_FAILING flag for nightly tests
that are always or periodically failing.
A new cron job will be added to run test with this flag.

RUN_NIGHTLY_FAILING is set for:
test/vhost/readonly/readonly.sh
test/nvmf/multiconnection/multiconnection.sh
a fio job in test/lib/bdev/blockdev.sh

Change-Id: I32640c0d4b916156c2ee996a9847c7c9e64941f8
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/403985
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-03-21 12:52:10 -04:00
paul luse
2191985125 bdev: Vbdev Passthru Example
Example showing the basics of a vbdev via a module that implements
the main functions, and a few extras, needed for a vbdev. The tests
also demonstrate how to configure an application to use a vbdev and
an underlying bdev

Change-Id: I67bf542143eb6532465cdb6af63c0f2ab7084c0e
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/399768
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-20 19:10:08 -04:00
Daniel Verkamp
a05f88ff34 nvmf: retrieve namespace UUID from bdev
A new optional parameter is added to the NVMe-oF target namespace
options to set the Namespace UUID, which will be reported via the
Identify command Namespace Identification Descriptor list.

Change-Id: I53c6d6fa6475d3395d412d196b42000715e9ed81
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/400894
Tested-by: 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-03-20 17:18:44 -04:00
Jim Harris
a8d3ac0cf4 io_channel: invoke unregister_cb on same thread unregister was called
The unregister callback is only invoked after all I/O channels related
to the I/O device have been freed.  The last I/O channel to be freed
might be on a thread different than the thread where spdk_io_device_unregister
was called.  If this is the case, send an event to the latter thread
so that the callback gets called on the same thread as spdk_io_device_unregister.

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

Reviewed-on: https://review.gerrithub.io/404414
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-19 21:50:19 -04:00
Chen Wang
a81dd12daf test/lvol: fix the range of test cases when use "all" parameter
Script will produce error when use "./test/lvol/lvol.sh all"
command. The range(1, test_counter() + 1) means run case 1,2,3...
but the case 2 doesn't exist.

Change-Id: I3e36b0e08dee1d2683da5a499a5db136d65d3022
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/404067
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-19 16:16:30 -04:00
Daniel Verkamp
c937fab3cb nvme: use uint32_t consistently for NSID values
A few places were accidentally storing namespace IDs in uint16_t.

Change-Id: Iae9d709fb20bc1ac0a584ccd9683b721ce5de961
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403886
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 14:15:08 -04:00
Daniel Verkamp
a5fa52a40c test/lvol: fix "uudi" typo
These should presumably be "uuid".

Change-Id: I90ebca1f6e29a12267a7de3591d92143ccca9074
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404050
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 14:09:11 -04:00
Liang Yan
e213502e77 test/iscsi_tgt: remove duplicated lines from ip_migration.sh
Change-Id: Ia1310c136fbfef608590326edc9f7dae8f2e5fe9
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/403912
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 14:07:32 -04:00
Tomasz Zawadzki
609fb9a16b net: create NET_MODULE for compiling different net_implementations
Change-Id: Id370631770cb2e090c3efbe95cd86db4f6168c5e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403702
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 17:54:29 -04:00
Shuhei Matsumoto
372c5e1ec7 iscsi: Change the type of some negotiation params from uint32_t to bool
ImmediateData in negotation parameters can be controlled by the config
file and currently "Yes" or "No" are valid values of it in the config
file. "Yes" or "No" means almost bool. Additionally, ImmediateData is
defined as boolean value in the iSCSI specification as follows.

However ImmediateData is an uint32_t variable and 0 or 1 are used in
SPDK now.

In the upcoming JSON config file, boolean value should be set to
ImmediateData.

Hence change all variables and constants related with ImmediateData
to boolean in this patch.

InitialR2T, DataPDUInOrder, and DataSequenceInOrder are not controllable
by the config file but these are defined as boolean value in the
iSCSI specification.

Hence change them to bool too.

Besides, AllowDuplicateIsid is used almost as boolean value. Hence
change it to bool too.

InitialR2T=<boolean-value>
ImmediateData=<boolean-value>
DataPDUInOrder=<boolean-value>
DataSequenceInOrder=<boolean-value>

Change-Id: I9f98b219687b3600194563b1d6b85551f4586144
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403237
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 13:41:22 -04:00
Tomasz Zawadzki
9004ca4a63 net/sock: separate sock.c from posix related functions
This enables more clear division of spdk_sock_* functions
and spdk_posix_* ones.

Change-Id: I329eaf99de9390c8473b57427966dfe6af777abb
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403700
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 13:08:09 -04:00
Daniel Verkamp
524e8fc976 nvmf: centralize duplicate subsystem NQN check
This should be enforced by the main NVMe-oF target library, not in the
event subsystem code.

Change-Id: Ibce4fd78710b4a9da374e3d5979df4a16e91533c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403380
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 12:54:15 -04:00
Seth Howell
12e840b937 test/unit: move unittest.sh and dependencies here.
All files called directly by the unittest.sh script are now located in
the test/unit directory.

Change-Id: I95cfb3d5b7c6ede59d7183c39466f32b7e676643
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/401717
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 18:44:34 -04:00
Daniel Verkamp
d4ef1338b0 bdev: make QoS channel management thread safe
We must hold bdev->mutex around all QoS channel manipulations, not just
channel_count; otherwise, there are race conditions.

Change-Id: I6183aef83f4d5789bded426a1832e3faaa688363
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403367
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 14:06:23 -04:00
Liang Yan
abd86265d3 test/iscsi_tgt: Update comment for disable CHAP authentication
Change-Id: I428d1be7db33efc1a44fa3f703ca154179fad2c0
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/403441
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-13 12:10:03 -04:00
Roman Sudarikov
c3bc40a6ef io_channel: add return value to pollers
This will be used to track time used in pollers - each poller can now
indicate if it found any work to do or not.

For cases where it was obvious and the infrastructure was already in
place, existing pollers have been modified to return 0 or a positive
value to indicate whether work was done.  Other pollers have been
modified to return -1 by default, indicating that the poller isn't
indicating anything about whether work was performed.  This will allow
us to find un-annotated pollers easily in the future and fix them
incrementally.

Change-Id: Ifebfa56604a38434fac5c76ba7263267574ff199
Signed-off-by: Roman Sudarikov <roman.sudarikov@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391042
Tested-by: 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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-13 11:16:20 -04:00
Daniel Verkamp
abe4c73f40 io_channel: use spdk_poller_fn consistently
There are two separate function pointer types declared in io_channel.h:
spdk_thread_fn for cross-thread messages, and spdk_poller_fn for
pollers.  They currently have the same signature, but this will be
changing in an upcoming patch, so we need to fix the poller-related
functions to use the correct type (a few were using spdk_thread_fn by
mistake).

Change-Id: I0f0d8f1eea9905395125fc91e0355a49e65be99e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403598
Tested-by: 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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-13 11:16:20 -04:00
Daniel Verkamp
19100ed580 bdev: rename spdk_bdev_module_if -> spdk_bdev_module
This better matches the style in the rest of SPDK.

No functional change - this is a pure find/replace of
spdk_bdev_module_if to spdk_bdev_module.  Instances of this struct will
be renamed in another patch.

Change-Id: I3f6933c8a366e625fc3a1b6401aee26ee03ba69c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403368
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:55:12 -04:00
Seth Howell
f1bf28de41 test: set all coremasks to use 8 or fewer cores.
This will allow us to reduce core assignments for build pool vms to 8.

Change-Id: I405a12f2c1041f77f90add0b5d27abd75f7b948d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/403559
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:51:37 -04:00
Jim Harris
b24fdae1a8 Revert "blob: queue sync requests if one already in progress"
BlobFS shutdown path needs to be investigated more with these
changes.

This reverts commit a137b9afd0.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8b04b24e178945d62db20668b9e500f278ae955b
Reviewed-on: https://review.gerrithub.io/403600
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-12 20:37:49 -04:00
Jim Harris
a137b9afd0 blob: queue sync requests if one already in progress
For any given blob, if an spdk_blob_sync_md() operation
is already in progress, queue additional spdk_blob_sync_md()
operations until the previous one completes.

This ensures proper ordering of writing metadata to
disk.

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

Reviewed-on: https://review.gerrithub.io/401257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-12 16:24:40 -04:00
Shuhei Matsumoto
1732428a2b bdevperf: IOPS average by exponential moving average
- Cumulative Moving Average (CMA): average of all data up to current
- Exponential Moving Average (EMA): weighted mean of the previous n
  data and more weight is given to recent
- Simple Moving Average (SMA): unweighted mean of the previous n data

Currently bdevperf support only CMA to know average of IOPS. However
CMA may not be appropriate to know the trend of IOPS. EMA or SMA will
be better to take the role.

The formula of EMA utilized in bdevperf is the following

Multiplier = (2 / (Time periods + 1))
EMA: EMA[n+1] = (IOPS - EMA[n]} x multiplier + EMA[n].

One of the source of the formula is https://github.com/patharanordev/ema

Change-Id: Ia7a282f6d173ace470e05b19ee6dee5edf640617
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/398886
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 14:53:17 -05:00
Shuhei Matsumoto
3af8e26df8 iscsi: Change function names of iSCSI subsystem configuration
Portal, portal group, initiator group, and target node don't use fixed size
array anymore. To use the same naming rule in iSCSI subsystem and in SPDK
is helpful to understand and maintain. Current naming rule is not bad but
to use unified and compact name is prioritized at this time.

This patch changes function names as follows:
- spdk_iscsi_init_tgt_nodes() -> spdk_iscsi_parse_tgt_nodes()
- spdk_cf_add_iscsi_tgt_node() -> spdk_iscsi_parse_tgt_node()

- spdk_iscsi_portal_grp_array_create() -> spdk_iscsi_parse_portal_grps()
- spdk_iscsi_portal_grp_create_from_configfile() -> spdk_iscsi_parse_portal_grp()
- spdk_iscsi_portal_create_from_configline() -> spdk_iscsi_parse_portal()
- spdk_iscsi_portal_grp_array_destroy() -> spdk_iscsi_portal_grps_destroy()

- spdk_iscsi_init_grp_array_create() -> spdk_iscsi_parse_init_grps()
- spdk_iscsi_init_grp_create_from_configfile() -> spdk_iscsi_parse_init_grp()
- spdk_iscsi_init_grp_array_destroy() -> spdk_iscsi_init_grps_destroy()

For example "parse" is already used to explain the operation in portal_grp.c.
Hence using "parse" is familiar and not strange in iSCSI.

Change-Id: Ieff952069d39bd96b7afa1586bfff927968accc2
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403149
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 13:52:04 -05:00
GangCao
a2142f3a33 bdev/qos: add the QoS rate limiting support on bdev
This patch is to add the basic support of QoS on bdev.

Including two major functionalities:

1. The QoS rate limiting algorithm:
	a. New IO will be always queued first also under
	   the no memory condition
	b. Start the QoS IO operation based on the limit
	c. A poller started in each millisecond to reset
	   the rate limit and send new IOs down
	d. The rate limit is based on the millisecond and
	   converted from user configurable IOsPerSecond

2. The Master Thread management:
	a. Add a per bdev channel_count
	b. Whenever QoS is enabled on bdev, if QoS bdev
	   channel is not created, create the QoS bdev
	   channel and assign the QoS thread
	c. When new IOs coming from different channels
	   (threads), pass the IOs to the QoS bdev channel
	   through the thread event
	d. When the IOs are completed from the QoS bdev
	   channel, pass the IOs back to its orignal
	   channel(thread)
	e. Destroy the QoS bdev channel when it is the
	   last bdev channel for this bdev. Defer the
	   destruction if current thread is not QoS thread

Change-Id: Ie4444551d7c3c7de52f6513c9db926628796adb4
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393136
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:48:21 -05:00
Pawel Kaminski
6255620460 test/vhost: Vhost blk hotremove test plan.
Change-Id: I2deb9ae125eecf5592d59902cc5a530993f0fa54
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/402276
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:17:14 -05:00
GangCao
8f1f9137b1 test/nvme-cli: use the macro instead of hard-coded value
Change-Id: Iee2ae343d5e6a292a6c0e188903d80c794202dde
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/403246
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:10:32 -05:00
Pawel Wodkowski
4d36735401 bdev: rework bdev module registration
Currently SPDK_BDEV_MODULE_REGISTER() take many parameters. Extending it
(eg for incoming JSON configuration dump/load) is quite challenging and
error prone. As we are already here in next patches, rework this macro
to take one parameter - the pointer to struct spdk_bdev_module_if.

This patch also remove following macros:
SPDK_GET_BDEV_MODULE - this is not really needed, to find module outside
module translation unit use spdk_bdev_module_list_find()

SPDK_BDEV_MODULE_ASYNC_INIT and SPDK_BDEV_MODULE_ASYNC_FINI - replaced
by bool fields in spdk_bdev_module_if struct.

Change-Id: Ief88e023fbbaee7d5402c838dbecbdffd4dfb259
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402883
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 12:07:35 -05:00
Pawel Wodkowski
4294719ed7 subsystem: make subsystem declaration macro just register subsystem
Don't do anything under the scene as adding/removing fields in struct
spdk_subsystem will require both macro change and C file changes.

Change-Id: I11bc0d5758edd7e0e0bd3f93e251d868cd9b1d2b
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401850
Tested-by: 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>
2018-03-09 12:07:35 -05:00
Pawel Wodkowski
5333a632ce test/migration: debug VM shutdown issue
Although migration successfully end Test Case 1 fail because
of some VM shutdown issue. This look like test issue.
Temporarily increase verbosity in vm_shutdown  function to debug
this issue.

Change-Id: I3d54775b2e4e7286bd86359a7ac5ca2a9d8ad750
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402531
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 12:07:19 -05:00
Pawel Kaminski
9df7fac17f test/vhost: Vhost scsi hotremove test plan
Change-Id: I3d6a62499326046bb856ff8ca4d906295f5cd027
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/401173
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 09:55:59 -05:00
Jim Harris
2fb1264121 test/iscsi: disable calsoft tc_ffp_29_4
This test is incorrect - it sends immediate data
greater than negotiated FirstBurstLength, but
expects an R2T.  This is illegal and SPDK is
rejecting the PDU correctly.

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

Reviewed-on: https://review.gerrithub.io/403213
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2018-03-08 19:09:40 -05:00
Ziye Yang
0c1003e983 lib/iscsi: change type of spdk_iscsi_send_nopin to void
Change-Id: Ie7a940efde885dbf0bb7c085fd17c3991dfa3341
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/403165
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:11:24 -05:00
Daniel Verkamp
b4e68642e8 test/lvol: fix reference to libuuid function
This was introduced after the spdk/uuid.h wrapper was added due to a
non-rebased patch being merged.

Change-Id: I674db91581e6eb2e9ab6113e19d777404a78cf37
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403205
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-08 12:06:42 -05:00
Lance Hartmann
b9be940ae9 lib: Return instead of exit in event
Modifies behavior of spdk_app_start() and spdk_app_parse_args()
such that they return on failure instead of terminating with
exit().

Change-Id: I82566417f04e1ae2e3ca60a00c72e664db26c9e4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/401243
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-08 11:47:01 -05:00
Jim Harris
fe6b3de126 test/overhead: allocate histograms for aio cases
Fixes Github issue #236.

Reported-by: Meng Wang <wm8120@gmail.com>
Submitted-by: Meng Wang <wm8120@gmail.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If205dd8446c61d101a869899680d2552838b9de3

Reviewed-on: https://review.gerrithub.io/403123
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-08 11:37:21 -05:00
Piotr Pelplinski
7029a8868a blobstore: add internal xattrs for creating blob
This patch adds possibility to set internal xattrs on blob

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I2d0f14558e4a1af7071ee1a4f59aaf9f14bea2d9
Reviewed-on: https://review.gerrithub.io/396418
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-08 11:34:15 -05:00
Piotr Pelplinski
c26c4e9fb4 blobstore: Add a blob_bs_dev that provides back_bs_dev for clones
Unit tests implemented in following patches.

This is rebased patch from https://review.gerrithub.io/#/c/396648
merged as commit c1174e6895
and reverted in 0847f27b54.

Change-Id: I3d152bf7847c83bf75149edd61564c1f393927d8
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Reviewed-on: https://review.gerrithub.io/402529
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-08 11:34:15 -05:00
Karol Latecki
aa2a2e56a2 test/lvol: functional tests for rename
Along are some neccessary changes to rpc_commands_lib which
are needed to check lvol store names and lvol bdev aliases.

Also update test plan with test cases description.

Change-Id: Ifbe712a105610a78a2292a459aebee77e29903c5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/397088
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 11:26:16 -05:00
Sebastian Basierski
f5e590c8f2 bdev: Added functions allowing logical volume store rename.
Change-Id: Ief1f809308fbde2e696c60d3ce79c0720cb3e2ff
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-on: https://review.gerrithub.io/398934
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-03-08 11:26:16 -05:00
Daniel Verkamp
b90462d0eb test/vm_setup: don't change global git config
vm_setup.sh previously reconfigured the global git settings for
whichever user it was run as; this isn't necessary, since we can just
set the user/email within the iscsiadm repository's .git/config where it
is needed for 'git am' to work.

Change-Id: I11cdd84b4ae807e018ee38ba2ac1caaa76ba5d3b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402887
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-08 11:22:19 -05:00
Daniel Verkamp
823830c4bc test/nvme-cli: skip test if nvme-cli not found
No need to run the stub and other setup work if the nvme-cli repository
is not found on the test agent.

Change-Id: I5a3c0ab8ceb25e65f4693b8fc519812ebccf9ae7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402380
Tested-by: 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-03-08 11:19:09 -05:00
Daniel Verkamp
4c06ce9b9d util: add uuid.h to wrap libuuid
This lets us have a common place to put definitions like the length of
the UUID string, as well as abstract away some of the API warts in
libuuid (non-const values, no size checking for uuid_unparse, etc.).

Change-Id: I80607fcd21ce57fdbb8729442fbb721bc71ccb98
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402176
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-08 10:49:51 -05:00
Daniel Verkamp
2532fd8f68 lvol: switch to uuid_generate()
Rather than explicitly asking for time-based UUIDs, let libuuid choose
the best available UUID source (high-quality random number based if
available, or time-based if not).

Change-Id: Ic2f538890f86d3158b64f5884708439b72c373f6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402963
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-08 10:49:51 -05:00
Tomasz Zawadzki
b86c4b6541 blob: persist super_blob id on blobstore immediately
Before this patch super_blob id for blobstore was persisted
only during spdk_bs_unload. If power fail occurred after creating and
syncing blob, super_blob id was lost within blobstore.

Lvol store metadata would be lost, if proper shutdown
didn't occur in first SPDK instance run since creation of lvs.

This fix changes setting super blob to be instantly persisted
on disk in super block. Without affecting clean bit in super block.

Change-Id: I578f1fc8717e2d7968ad506fa4dead7507a5e0b4
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/398804
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-08 00:14:36 -05:00
Pawel Niedzwiecki
3fe4b05b47 test/common: Enable script debugging in readonly and pmem test
set -x flag in pmem and readonly tests for easier debugging

Change-Id: I006d57bb770427a39b8788cfb1def44b75f47e47
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/403066
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-07 19:12:06 -05:00
Karol Latecki
f3cfa15e35 test/vhost: fix listing vms directories
Wildcard was missing from expression so VMs with
number greater than 9 were not discovered. This caused fails
during shutdown process as VMs were not killed.

Change-Id: I3efcfe50aa709f408a4d91b4317a85ffa2f4d84e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/403039
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-07 11:15:05 -05:00
Pawel Niedzwiecki
ad22830896 test/common: exit with error in waitforlisten() if app crashed
In some cases, if vhost crashes on startup, test would continue
normally instead of failing

Change-Id: If2f82b5e3dad07403051353d6fcf5e83d5d002c0
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/403064
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-07 11:02:35 -05:00
Daniel Verkamp
faf87b0ccd test/nvme-cli: enable shell script tracing
Make it possible to tell what is going on in the test.

Change-Id: I8331f155367d7b14a788c91d3d2a34e1f82b3860
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402379
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-07 10:16:33 -05:00
Daniel Verkamp
cd34605b6f test/nvme-cli: build against current SPDK revision
Rather than building against some local version of SPDK from the
nvme-cli checkout, build against the SPDK version that autotest is
currently testing.

Change-Id: Ifbb1dde1ace9247929f499e31ab6401503ec18d2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402378
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-07 10:16:33 -05:00
Ziye Yang
b86af2c8d2 lib/iscsi: Extract spdk_iscsi_conn_migration
Put it in the iscsi.c

Change-Id: Ifb2843fb7c78f9ca948eac60704547b8b0635bf0
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/402484
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-06 15:50:54 -05:00