Revision tags: v24.05, v24.09-pre, v24.05-rc1, LTS, v24.01, v24.05-pre, v24.01-rc1, v23.09, v24.01-pre, v23.09-rc1 |
|
#
ea941cae |
| 28-Jul-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
test/unit: use spdk_ut_run_tests()
Replaced direct calls to the CUnit's functions to run the tests with spdk_ut_run_tests(). That way, each test will have the ability to run a specific test case.
test/unit: use spdk_ut_run_tests()
Replaced direct calls to the CUnit's functions to run the tests with spdk_ut_run_tests(). That way, each test will have the ability to run a specific test case.
The blob.c unit test wasn't changed, because it runs all tests multiple times with different parameter combinations, so it cannot be easily converted. In the future, each such combination could be split into a separate test suite, which would make it compatible with spdk_ut_run_tests().
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I4463f808f89844e9bf32b5b31eda197c5d729d1d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19288 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
#
ae431e31 |
| 28-Jul-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
test/unit: move spdk_cunit.h to include/spdk_internal
It'll make it easier to include this file outside of unit tests.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I171ddb864
test/unit: move spdk_cunit.h to include/spdk_internal
It'll make it easier to include this file outside of unit tests.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I171ddb8649f67b5786f08647560e2907603d0574 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19284 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
show more ...
|
Revision tags: v23.05, v23.09-pre, v23.01.1, v23.01, v23.05-pre, v23.01-rc1 |
|
#
d6e57b53 |
| 21-Dec-2022 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
util: Add spdk_strcpy_replace() to replace substrings
spdk_nvme_cpl_get_status_string() returns a string which contains upper cases, spaces, and hyphens. To use the returned string for JSON RPC, we
util: Add spdk_strcpy_replace() to replace substrings
spdk_nvme_cpl_get_status_string() returns a string which contains upper cases, spaces, and hyphens. To use the returned string for JSON RPC, we have to convert it to a string which contains only lowercases and underscores.
For our convenience, add a new API spdk_strcpy_replace() to replace all occurrences of the search string with the replacement string.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I3ca9774d0bfb2d0bb7bd7412bc671e6f69104b7d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16054 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
Revision tags: v22.01.2 |
|
#
1139cb14 |
| 04-Nov-2022 |
John Levon <john.levon@nutanix.com> |
lib/util: add strarray utility functions
Add some basic utilities for handling arrays of strings.
Signed-off-by: John Levon <john.levon@nutanix.com> Change-Id: I2333f3e4605175b1717a7f289847ff2d4874
lib/util: add strarray utility functions
Add some basic utilities for handling arrays of strings.
Signed-off-by: John Levon <john.levon@nutanix.com> Change-Id: I2333f3e4605175b1717a7f289847ff2d48745e8d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15274 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
#
a6dbe372 |
| 01-Nov-2022 |
paul luse <paul.e.luse@intel.com> |
update Intel copyright notices
per Intel policy to include file commit date using git cmd below. The policy does not apply to non-Intel (C) notices.
git log --follow -C90% --format=%ad --date defa
update Intel copyright notices
per Intel policy to include file commit date using git cmd below. The policy does not apply to non-Intel (C) notices.
git log --follow -C90% --format=%ad --date default <file> | tail -1
and then pull just the 4 digit year from the result.
Intel copyrights were not added to files where Intel either had no contribution ot the contribution lacked substance (ie license header updates, formatting changes, etc). Contribution date used "--follow -C95%" to get the most accurate date.
Note that several files in this patch didn't end the license/(c) block with a blank comment line so these were added as the vast majority of files do have this last blank line. Simply there for consistency.
Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192 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> Community-CI: Mellanox Build Bot
show more ...
|
Revision tags: v22.09, v23.01-pre, v22.09-rc1 |
|
#
488570eb |
| 03-Jun-2022 |
Jim Harris <james.r.harris@intel.com> |
Replace most BSD 3-clause license text with SPDX identifier.
Many open source projects have moved to using SPDX identifiers to specify license information, reducing the amount of boilerplate code in
Replace most BSD 3-clause license text with SPDX identifier.
Many open source projects have moved to using SPDX identifiers to specify license information, reducing the amount of boilerplate code in every source file. This patch replaces the bulk of SPDK .c, .cpp and Makefiles with the BSD-3-Clause identifier.
Almost all of these files share the exact same license text, and this patch only modifies the files that contain the most common license text. There can be slight variations because the third clause contains company names - most say "Intel Corporation", but there are instances for Nvidia, Samsung, Eideticom and even "the copyright holder".
Used a bash script to automate replacement of the license text with SPDX identifier which is checked into scripts/spdx.sh.
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iaa88ab5e92ea471691dc298cfe41ebfb5d169780 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12904 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: <qun.wan@intel.com>
show more ...
|
Revision tags: v22.05, v22.09-pre, v22.05-rc1, v22.01.1, v22.01, v22.01-rc1, v21.10, v21.10-rc1, v21.07, v21.07-rc1, v21.04, v21.04-rc1, v21.01.1, v21.01, v21.01-rc1 |
|
#
240fdd7d |
| 22-Jan-2021 |
Nick Connolly <nick.connolly@mayadata.io> |
test/string.c: remove hardcoded limit values
Unit tests for spdk_strtol/spdk_strtoll use hard coded strings for arithmetic constants (LONG_MIN/MAX etc). These are only valid on platforms where both
test/string.c: remove hardcoded limit values
Unit tests for spdk_strtol/spdk_strtoll use hard coded strings for arithmetic constants (LONG_MIN/MAX etc). These are only valid on platforms where both long and long long are 64-bit values.
Replace the hardcoded values with strings generated from limits.h. The tests use values that are outside of the MIN/MAX range, which cannot be represented as int64_t. These are calculated in two parts to avoid overflow and recombined as a string.
Verified using the unit tests on two different architectures and with test code to check that the generated string is the same as the hardcoded value on x86 Linux. Used a small test program to calculate +/-30 around each limit value to check carry handling and boundary conditions.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Change-Id: I990ff354f568a0b35853ecc849dd2a452bb1048b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6048 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
Revision tags: v20.10, v20.10-rc1, v20.07, v20.07-rc1, v20.04.1, v20.01.2, v20.04, v20.04-rc1, v20.01.1 |
|
#
dcf0ca15 |
| 11-Mar-2020 |
Vitaliy Mysak <vitaliy.mysak@intel.com> |
ut: make use of CUnit macro to reduce duplications
CUnit provides a helper macro CU_ADD_TEST() that simplifies usage of CU_add_test() function. Test name no longer needs to be provided, as it will b
ut: make use of CUnit macro to reduce duplications
CUnit provides a helper macro CU_ADD_TEST() that simplifies usage of CU_add_test() function. Test name no longer needs to be provided, as it will be inherited from function name.
This is a follow up to https://review.spdk.io/gerrit/c/spdk/spdk/+/931
Change-Id: I8078f02e08b14f12328ae022d7090ba13fbd64e4 Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1239 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>
show more ...
|
#
78b696bc |
| 11-Mar-2020 |
Vitaliy Mysak <vitaliy.mysak@intel.com> |
ut: simplify error handling at initialization
This patch changes the way that unittests initialize. The new way is shorter and simpler. It assumes that error during initialization is a fatal error,
ut: simplify error handling at initialization
This patch changes the way that unittests initialize. The new way is shorter and simpler. It assumes that error during initialization is a fatal error, but in our cases it always is.
This patch is a followp up to https://review.spdk.io/gerrit/c/spdk/spdk/+/930
lvol_ut.c is the only test that skipped because it runs same tests multiple times which is not allowed by new method.
Change-Id: I0baf7ad09a35d5fca2dc4a03b4453c12c14f38a7 Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1238 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>
show more ...
|
Revision tags: v20.01, v20.01-rc1, v19.10.1, v19.10, v19.10-rc1, v19.07.1, v19.07, v19.04.1, v19.04, v18.10.2, v19.01.1, v19.01 |
|
#
b78e763c |
| 22-Jan-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
string: spdk_strtol to delegate additional error checking
Error check of strtol is left to users of it. But some use cases of strtol in SPDK do not have enough error check yet.
For example, strtol
string: spdk_strtol to delegate additional error checking
Error check of strtol is left to users of it. But some use cases of strtol in SPDK do not have enough error check yet.
For example, strtol returns 0 if there were no digits at all.
It should be avoided for each use case to add enough error checking for strtol.
Hence spdk_strtol and spdk_strtoll do additional error checking according to the description of manual of strtol.
Besides, there is no use case of negative number now, and to keep simplicity, spdk_trtol and spdk_strtoll allows only strings that is positive number or zero.
As a result of this policy, callers of them only have to check if the return value is not negative.
Subsequent patches will replace atoi to spdk_strtol because atoi does not have error check.
Change-Id: If3d549970595e53b1141674e47710fe4dd062bc5 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/441626 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
show more ...
|
Revision tags: v18.10.1 |
|
#
8adbd909 |
| 12-Dec-2018 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
util/string: sprintf_append_realloc to concatenate strings with realloc
Appending string by using sprintf with realloc will be generally usable and add sprintf_append_realloc() and vsprintf_append_r
util/string: sprintf_append_realloc to concatenate strings with realloc
Appending string by using sprintf with realloc will be generally usable and add sprintf_append_realloc() and vsprintf_append_realloc() to the utility.
These APIs follow realloc about buffer management, i.e., the original buffer is left untouched if they fail.
Besides, the original buffer is NULL, they are equivalent to sprintf_alloc() and vsprintf_alloc(), respectively.
Change-Id: I8b69d9640e86e1862ddd3917995bad6f59426b7e Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Signed-off-by: Chunyang Hui <chunyang.hui@intel.com> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/c/436913 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
show more ...
|
Revision tags: v18.10, v18.07.1 |
|
#
c0297f9c |
| 30-Aug-2018 |
Seth Howell <seth.howell@intel.com> |
test/unit: Fix scan-build errors in thread and util tests
thread_ut.c: ensure that the channel context is non-null util: get rid of a couple of uninitialized value errors.
Change-Id: Idbaad4efea14a
test/unit: Fix scan-build errors in thread and util tests
thread_ut.c: ensure that the channel context is non-null util: get rid of a couple of uninitialized value errors.
Change-Id: Idbaad4efea14acd7ae8f98b60aa514e45213a134 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/424124 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: Jim Harris <james.r.harris@intel.com>
show more ...
|
Revision tags: v18.07, v18.04.1, v18.04, v18.01.1 |
|
#
7ffe586a |
| 13-Feb-2018 |
Jim Harris <james.r.harris@intel.com> |
test: use spdk_unittest.mk for lib/unit unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I0ae2294e69262ce0dfc9810815ced2ae16d768b9
Reviewed-on: https://review.gerrithub.io
test: use spdk_unittest.mk for lib/unit unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I0ae2294e69262ce0dfc9810815ced2ae16d768b9
Reviewed-on: https://review.gerrithub.io/399760 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
show more ...
|
Revision tags: v18.01 |
|
#
68b96260 |
| 23-Jan-2018 |
Seth Howell <seth.howell@intel.com> |
test/unit: replace sprintf call with snprintf call.
This fixes a Klocwork bug.
Change-Id: Ia42bf0f246c8e1b9aa211095a00b9d1ab8e7a085 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: h
test/unit: replace sprintf call with snprintf call.
This fixes a Klocwork bug.
Change-Id: Ia42bf0f246c8e1b9aa211095a00b9d1ab8e7a085 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/396059 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
#
ec6a1afb |
| 13-Dec-2017 |
Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> |
util: add a helper function for parsing capacities (1K, 128M, 2G)
Also used it in parsing `-m` SPDK app param, meaning that it can now accept numbers followed by a binary prefix - like 512M or 2G.
util: add a helper function for parsing capacities (1K, 128M, 2G)
Also used it in parsing `-m` SPDK app param, meaning that it can now accept numbers followed by a binary prefix - like 512M or 2G.
Change-Id: If458dc08429237f2cb3f3f661bcaf382468df0f0 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/391670 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>
show more ...
|
Revision tags: v17.10.1, v17.10, v17.07.1, v17.07 |
|
#
16c362a8 |
| 20-Jul-2017 |
Daniel Verkamp <daniel.verkamp@intel.com> |
string: add spdk_str_chomp() function
Add a helper function to remove trailing newlines.
Change-Id: I8b1a2bf3d70ef17e0bc7e74429ac955c68cb6bcf Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com
string: add spdk_str_chomp() function
Add a helper function to remove trailing newlines.
Change-Id: I8b1a2bf3d70ef17e0bc7e74429ac955c68cb6bcf Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/370592 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
show more ...
|
#
e37b070a |
| 19-Jun-2017 |
Daniel Verkamp <daniel.verkamp@intel.com> |
test: move lib/util unit tests to test/unit
Change-Id: I3f5bc75913dc9c8ec19911f48661026cccf10780 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/366
test: move lib/util unit tests to test/unit
Change-Id: I3f5bc75913dc9c8ec19911f48661026cccf10780 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/366159 Tested-by: 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>
show more ...
|