Always use "Local7" internally. We want the log API
to be generic instead of syslog specific.
Change-Id: I021f719e90c236f123fa1cadebc0c199b87ba077
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365295
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>
Use "trtype" to represent transport types in nvmf_tgt RPCs for
consistency with the NVMe-oF spec and other SPDK RPCs.
The current "transport" names are still supported for compatibility with
existing RPC users.
Change-Id: Ib03dda384dc01a41a18c06c56baff16b82d36c00
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367422
Tested-by: 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>
fio has a race between reap_threads() and free_ioengine(). free_ioengine()
will call the ioengine's cleanup routine and then dlclose it if it
is dynamically linked (like the spdk fio plugin). free_ioengine() does
not set td->io_ops = NULL though until after dlclose() is complete. If
reap_threads() tries to dereference td->io_ops after our plugin has been
closed but before io_ops was set to NULL, it will segfault.
Solution (until an upstream fio fix is available) is to use LD_PRELOAD
instead.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ide4eb3cb92a636513289107fc211fdf1f98b616f
Reviewed-on: https://review.gerrithub.io/365272
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
The stub application will ensure that each
nvmf test does not need to reinitialized DPDK
memory and NVMe devices. This drastically
cuts down on the amount of time needed to run
all of the nvmf tests.
Change-Id: I6abad4e1298111884f18026e72e36f5d8b73c4b9
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/362810
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Also change the discovery/nvmf.sh test to use it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56bce9a84bd46f13b6d4f34da81abf23413f2598
Also adds the automation test case for using remote
NVMe devices exported by NVMe-oF target.
Change-Id: I2b839a4eeec33d5b0c30d654e6013ad8c7949e23
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This patch creates a new test case: use rpc to
frequently add/delete a same subsystem to verify the
correctness of our code.
Change-Id: Ib582061f9fa909f271bea4865df29a3f432f807c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Newer versions of nvme-cli return a non-zero status from the disconnect
command when it is successful. Catch this in the test scripts so that
the tests don't consider this a failure.
Change-Id: I3abf4042ec8b0bc8aed5a4c36128ae73230aa190
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The setup.sh parameters we use in autotest don't allow for enough RAM
for 12 subsystems; reduce it slightly while still testing a large
number.
Change-Id: I595589db6e5199ad87ad9511bb0ad63b7b60211d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
It is caused by this commit:
4163626c5c
nvmf_tgt_delete_subsystem registers the poller
with function subsystem_delete_event.
subsystem_delete_event is called asynchronously,
the deletion should happen in this function.
Otherwise, with the current code,
g_subsystems_shutdown = true
TAILQ_EMPTY(&g_subsystems) = true
when subsystem_delete_event is firstly called.
If there are multiple subsystems, the logic is wrong.
Thus other subsystem will never be delete. since
we already execute shutdown_complete().
Also add related test scripts.
Change-Id: I3823563fc9e8611c11a6d798685ff64e2939842e
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
After checking the code, aerl in our session is 0,
so there will be only 1 AER. So currently,
we will only handle 1 AER case.
When the AER event is triggered by real NVMe device owned
by the subsystem, it notifies all sessions belonging to
the subsystem.
Change-Id: Ia80fb0f03e893c20d8dd14afbed8db10db38301c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
The autotest.sh script is already running as root, so we should not need
to change the permissions on /dev/nvme-fabrics. This block has just
been cargo-culted across the various NVMe-oF test scripts.
Change-Id: I078ebf102d3fc354e42be9c6f1fc37481ffae291
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Preivously, we only supports probe the NVMf target
via discovery info, now we can support to directly
to connect it.
Change-Id: I08ce1d95de6744286357e68b48c97b773b902ac8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
If we use regular 'echo' without -n when setting up the kernel target
sysfs entries, the traddr and trsvcid will contain the newlines, so use
echo -n to prevent the newlines from being added.
Change-Id: I924ffc0d1957eed25e97a12fe12d43d390176c05
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This script is testing the SPDK NVMe-oF host and target code, so the
kernel nvme-rdma driver should not need to be loaded.
It is also not running FIO, so it doesn't need to clean up the FIO
job state files.
Change-Id: I3cfe619abf36885df4bdc6eecebf0e197fb869be
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Instead of searching /sys for devices and checking which
driver happens to be loaded, use lspci. The lspci tool is
a bit smarter - it knows which driver is loaded now but
also which driver is the default driver the kernel wants
to load for that type of device. It's that default that
we need.
Change-Id: I1dc01ab6eac233e85f42316567bde2f4ed2203c6
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Replace hard-coded list of Malloc0 Malloc1 with dynamically-generated
list based on the names that were returned from the bdev creation RPC
calls.
Change-Id: I2171b650fa540184de0e6dfd6bb5f66611e9c0d8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Instead of a magical "All" value for allowing all hosts, allow the
caller of construct_nvmf_subsystem to omit the "hosts" parameter.
Change-Id: I97c7ae806a0be7142fb59708d47023e42e127fcc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The trace logs were useful during development, but now that the target
is working reliably, we can make the test output quieter and shorter by
turning them off.
Change-Id: I46cd2e22a3ccd69a5f94a1843b722f517223a343
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This allows live configuration of the target, much like
the iSCSI target. More function calls will be added
over time.
Also, make the tests wait until the target is listening
on the RPC port to determine that the target is ready.
Change-Id: I8f762e49511d482ef820f6b25a7d3ad9a8bb41f9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Make sure any partition tables or other random data on the disks is
cleaned up before running the tests, rather than trying to clean it up
on failure when the system is in a potentially bad state.
Change-Id: Ia2119485aee6a50243744328dff2314d7a72adad
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
No need to do read and writes plus verify - the verify is
a read itself.
Change-Id: I28d08717e49b1327b04490810f8e6069504173c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This is a much simpler approach and is only slightly
less efficient.
Change-Id: I909de376d576a74156c1be447e90e7dbc240f025
Signed-off-by: Ben Walker <benjamin.walker@intel.com>