History log of /spdk/include/spdk_internal/mock.h (Results 1 – 23 of 23)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v25.01-rc1, v24.09, v25.01-pre, v24.09-rc1
# 34edd9f1 10-Jul-2024 Kamil Godzwon <kamilx.godzwon@intel.com>

general: fix misspells and typos

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Iab206ef526eb7032c6681a3145450010c91705a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+

general: fix misspells and typos

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Iab206ef526eb7032c6681a3145450010c91705a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24120
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>

show more ...


Revision tags: v24.05
# 274b06d3 21-May-2024 Jim Harris <jim.harris@samsung.com>

mock.h: apply "used" attribute to DECLARE_WRAPPER, not DEFINE_WRAPPER

Some unit tests such as nvmf/tcp use DECLARE_WRAPPER but then define it
explicitly rather than using DEFINE_WRAPPER.

DEFINE_WRA

mock.h: apply "used" attribute to DECLARE_WRAPPER, not DEFINE_WRAPPER

Some unit tests such as nvmf/tcp use DECLARE_WRAPPER but then define it
explicitly rather than using DEFINE_WRAPPER.

DEFINE_WRAPPER would apply __attribute__((used)) to the function definition,
nvmf/tcp doesn't have that for its __wrap_RAND_bytes() function, and LTO
would complain.

By applying it to the DECLARE_WRAPPER instead, any users of these macros
get that attribute applied, whether they use DEFINE_WRAPPER or define the
wrapper function themselves.

Fixes issue #3386.

Signed-off-by: Jim Harris <jim.harris@samsung.com>
Change-Id: I072835cc280b9057e1cb7b038d715634e830216f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23306
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <ben@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v24.09-pre, v24.05-rc1
# e5e1dac9 17-Apr-2024 Konrad Sztyber <konrad.sztyber@intel.com>

test/mock: introduce MOCK_ENQUEUE() macro

This macro allows users to specify multiple values to be returned by
consecutive calls to a mocked function. This can be especially useful
while testing a

test/mock: introduce MOCK_ENQUEUE() macro

This macro allows users to specify multiple values to be returned by
consecutive calls to a mocked function. This can be especially useful
while testing a function that calls the same mocked function multiple
times, because it makes it possible to check how it behaves when each
of those calls return a different value.

The usage is very similar to MOCK_SET() - each call to MOCK_ENQUEUE()
specifies a value that will be returned by a consecutive call to the
mocked function (in a FIFO fashion). Once all such values are exhausted
(or none have been specified), the mocked function will return the value
assigned by MOCK_SET(). For instance, the following code:

int foo(void);

MOCK_SET(foo, 1);
MOCK_ENQUEUE(foo, 2);
MOCK_ENQUEUE(foo, 3);

would cause foo() to return 2, 3, 1, 1, ...

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I67c4ccde17948a65ba48aa7dc988de680c881cb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22811
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <ben@nvidia.com>
Community-CI: Mellanox Build Bot

show more ...


# 985ef53a 17-Apr-2024 Konrad Sztyber <konrad.sztyber@intel.com>

test/mock: introduce DEFINE_WRAPPER_MOCK() macro

This macro is intended to be used to define the mock variables (e.g.
ut_foo_mocked and ut_foo) for functions wrapped with DECLARE_WRAPPER().
Currentl

test/mock: introduce DEFINE_WRAPPER_MOCK() macro

This macro is intended to be used to define the mock variables (e.g.
ut_foo_mocked and ut_foo) for functions wrapped with DECLARE_WRAPPER().
Currently, it's identical to DEFINE_RETURN_MOCK(), but we'll be changing
them in the next patch, so we'll need two separate macros.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I9d551f5c3f0659501e9937a25076818f4cbb62b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22810
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <ben@nvidia.com>

show more ...


Revision tags: LTS, v24.01, v24.05-pre, v24.01-rc1, v23.09, v24.01-pre, v23.09-rc1, v23.05, v23.09-pre, v23.01.1, v23.01, v23.05-pre, v23.01-rc1, v22.01.2
# 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
# 0c1fcc77 25-Nov-2021 Josh Soref <jsoref@gmail.com>

spelling: include

Part of #2256

* accelerator
* access
* acknowledge
* address
* adrfam
* aggregation
* allocated
* appearance
* associated
* asynchronously
* authority
* available
* callback
* com

spelling: include

Part of #2256

* accelerator
* access
* acknowledge
* address
* adrfam
* aggregation
* allocated
* appearance
* associated
* asynchronously
* authority
* available
* callback
* compare
* construct
* controller
* course
* definitions
* deinitialize
* descriptor
* destroy
* device
* efficiently
* elasticity
* failure
* frequency
* function
* hdgst
* implementation
* indefinitely
* initialization
* initialize
* initiator
* interrupt
* malicious
* management
* milliseconds
* namespace
* negative
* notification
* obtained
* otherwise
* passed
* positive
* request
* responded
* semantics
* sequence
* should
* specified
* structure
* subsystem
* successful
* synchronously
* transport

Change-Id: I808876a3b4b2dc56f95cfc42bc88336cfeec4288
Signed-off-by: Josh Soref <jsoref@gmail.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10404
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


Revision tags: v21.10, v21.10-rc1
# 1cfdbd42 24-Sep-2021 Nick Connolly <nick.connolly@mayadata.io>

include/mock.h: prevent expension of syscall name

If a platform defines a syscall using a macro (e.g. #define open _open)
then wrapping it fails because DEFINE_RETURN_MOCK and MOCK_GET
will use the

include/mock.h: prevent expension of syscall name

If a platform defines a syscall using a macro (e.g. #define open _open)
then wrapping it fails because DEFINE_RETURN_MOCK and MOCK_GET
will use the definition to name the ut_ variables, but DEFINE_WRAPPER
will use the original name. This result in an undefined reference when
linking.

Prevent macro expansion of the syscall name by avoiding nested macro
calls in DEFINE_WRAPPER. Include the contents of DEFINE_RETURN_MOCK
and MOCK_GET directly in DEFINE_WRAPPER.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I452857ec7df43f7a1a5f093439c7d5cf4683f8ee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9618
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


Revision tags: v21.07, v21.07-rc1, v21.04, v21.04-rc1, v21.01.1, v21.01, v21.01-rc1, v20.10, v20.10-rc1, v20.07, v20.07-rc1, v20.04.1, v20.01.2, v20.04, v20.04-rc1
# cfb65ba6 20-Apr-2020 Jim Harris <james.r.harris@intel.com>

test: add generic unlink wrapper

reduce library uses unlink, but the unit tests need to
override it in a specific way.

But linking unit tests with LTO requires the wrapper
definitions be in objects

test: add generic unlink wrapper

reduce library uses unlink, but the unit tests need to
override it in a specific way.

But linking unit tests with LTO requires the wrapper
definitions be in objects/libraries listed *after*
the object/library that refers to it. So we need to
make the unlink wrapper somewhat generic. We do this
by exporting a string and callback function that the
user can set to enable a user-defined function to be
called when unlink() is called with a specific file
name.

Also revert 3ef6d06 as part of this patch, since we
no longer require the workaround that it implemented.

Fixes issue #1357.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1ee4c424ad31fe7d91d7b524ed47aedd279e5b5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1948
Community-CI: Mellanox Build Bot
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.1, v20.01, v20.01-rc1, v19.10.1, v19.10, v19.10-rc1
# 913f780e 17-Oct-2019 Ben Walker <benjamin.walker@intel.com>

test: Add mocks for sendmsg and recvmsg

These will be used from the posix sock layer.

Change-Id: I6427d9e9aee889e11ba7e36876112a5aba449e31
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Revi

test: Add mocks for sendmsg and recvmsg

These will be used from the posix sock layer.

Change-Id: I6427d9e9aee889e11ba7e36876112a5aba449e31
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471751
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 8efa583f 01-Oct-2019 Ben Walker <benjamin.walker@intel.com>

test: Add a mock for writev

This is useful for testing partial sends in the socket layer.

Change-Id: Ib5bb62d641ad8d6a23a662261f7c72f5ba55c813
Signed-off-by: Ben Walker <benjamin.walker@intel.com>

test: Add a mock for writev

This is useful for testing partial sends in the socket layer.

Change-Id: Ib5bb62d641ad8d6a23a662261f7c72f5ba55c813
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470520
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


Revision tags: v19.07.1, v19.07, v19.04.1, v19.04, v18.10.2
# 93984d25 16-Mar-2019 Darek Stojaczyk <dariusz.stojaczyk@intel.com>

mock: remove trailing semicolon from MOCK_ definitions

Require callers to add trailing semicolon by
themselves.

Change-Id: I0afcfde1b5c0a00102755a43c5723c0cd3324565
Signed-off-by: Darek Stojaczyk <

mock: remove trailing semicolon from MOCK_ definitions

Require callers to add trailing semicolon by
themselves.

Change-Id: I0afcfde1b5c0a00102755a43c5723c0cd3324565
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448211
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>

show more ...


Revision tags: v19.01.1, v19.01
# 5977aad8 20-Dec-2018 Ben Walker <benjamin.walker@intel.com>

thread: Eliminate use of pthread_self and thread_ids

SPDK threads are no longer mapped 1:1 to system threads. They are
instead identified by the memory address of the spdk_thread object.

Change-Id:

thread: Eliminate use of pthread_self and thread_ids

SPDK threads are no longer mapped 1:1 to system threads. They are
instead identified by the memory address of the spdk_thread object.

Change-Id: I417f8376cebd2ee94f624f4436e6394b51486063
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/437999
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# 1ed1f968 20-Dec-2018 Seth Howell <seth.howell@intel.com>

mock: add MOCK_CLEARED_ASSERT macro

This is useful for proving to scan-build that we are not using a mocked
function. Sometimes it needs to be called repeatedly every time any mock
variables are cal

mock: add MOCK_CLEARED_ASSERT macro

This is useful for proving to scan-build that we are not using a mocked
function. Sometimes it needs to be called repeatedly every time any mock
variables are called.

Change-Id: Id0ef196620c2984252f792a7e40162e10b989748
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/437997
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>

show more ...


Revision tags: v18.10.1, v18.10, v18.07.1, v18.07
# f56b2300 10-Jul-2018 Ben Walker <benjamin.walker@intel.com>

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 <benj

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>

show more ...


Revision tags: v18.04.1, v18.04, v18.01.1, v18.01
# f2290776 25-Jan-2018 Daniel Verkamp <daniel.verkamp@intel.com>

mock: mark wrappers "used" so LTO will keep them

Fixes the build with CONFIG_LTO=y.

Change-Id: I3acbdd16c5ff44f50747644c09ca7b0228c790cc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Rev

mock: mark wrappers "used" so LTO will keep them

Fixes the build with CONFIG_LTO=y.

Change-Id: I3acbdd16c5ff44f50747644c09ca7b0228c790cc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/396449
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>

show more ...


Revision tags: v17.10.1, v17.10, v17.07.1
# 19de0806 11-Sep-2017 Jim Harris <james.r.harris@intel.com>

test/mock: add pthread_self

This will be used to simulate multi-threading for
bdev unit tests.

While here, alphabetize the existing calls - calloc
had been inserted out of order in a couple of plac

test/mock: add pthread_self

This will be used to simulate multi-threading for
bdev unit tests.

While here, alphabetize the existing calls - calloc
had been inserted out of order in a couple of places.

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

Reviewed-on: https://review.gerrithub.io/377968
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>

show more ...


# b9f0ad28 03-Aug-2017 Paul Luse <paul.e.luse@intel.com>

ut/nvme: add coverage for nvme_driver_init() & new mock macro

Change-Id: I1d62e34deed873446a9a87f16188b5c8ed21aea5
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrit

ut/nvme: add coverage for nvme_driver_init() & new mock macro

Change-Id: I1d62e34deed873446a9a87f16188b5c8ed21aea5
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/372551
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>

show more ...


# 179ed697 18-Aug-2017 Jim Harris <james.r.harris@intel.com>

blob: add readv/writev support

Most of the work here revolves around having to split
an I/O that spans a cluster boundary. In this case
we need to allocate a separate iov array, and then
issue each

blob: add readv/writev support

Most of the work here revolves around having to split
an I/O that spans a cluster boundary. In this case
we need to allocate a separate iov array, and then
issue each sub-I/O serially, copying the relevant
subset of the original iov array.

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

Reviewed-on: https://review.gerrithub.io/374880
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>

show more ...


Revision tags: v17.07
# ca293122 06-Jul-2017 Paul Luse <paul.e.luse@intel.com>

unit test: add new mock macro and use macros in nvme_ut.c

No new coverage added, just used the STUB macros in nvme UT
to make sure they cover all the cases and discovered a few small
tweaks needed:

unit test: add new mock macro and use macros in nvme_ut.c

No new coverage added, just used the STUB macros in nvme UT
to make sure they cover all the cases and discovered a few small
tweaks needed: (1) added _V variant to declare void stubs (if
someone sees an easy way to make DECLARE_STUB handle this case
that'd be cleaner but I don't think its a big deal) and (2)
updated DECLARE_STUB so that it can set a struct return value
by adding {} to the ut_ variable set statement.

Also ordered the declarations simply for readability, the _V
first, the regular stubs next, the _P next and then the stubs
that don't have a macro to cover them because they do something
other than return a specific value.

Change-Id: Idd8919d2b9e9daa76dd629364ea1d0285657fa81
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/368420
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>

show more ...


# c41338ce 28-Jul-2017 Jim Harris <james.r.harris@intel.com>

vhost: add unit test framework

While here, add a new DEFINE_STUB_V for void stubs.

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

Reviewe

vhost: add unit test framework

While here, add a new DEFINE_STUB_V for void stubs.

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

Reviewed-on: https://review.gerrithub.io/371735
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>

show more ...


# 12d75f63 05-Jul-2017 Daniel Verkamp <daniel.verkamp@intel.com>

mock: move MOCK_SET{,_P} semicolons to call sites

This makes them look more like regular function calls and keeps the
coding style consistent.

Change-Id: I019980bb381abb0dec0aae041340a44bbffe23f3
S

mock: move MOCK_SET{,_P} semicolons to call sites

This makes them look more like regular function calls and keeps the
coding style consistent.

Change-Id: I019980bb381abb0dec0aae041340a44bbffe23f3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368205
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 043d5411 19-Jun-2017 Paul Luse <paul.e.luse@intel.com>

tests: macro-ize the creation and use of wrappers and stubs

Includes macros for wrappers (for syscalls) and stubs
(for SPDK functions) including an example of syscall
wrapper as well as a stub with

tests: macro-ize the creation and use of wrappers and stubs

Includes macros for wrappers (for syscalls) and stubs
(for SPDK functions) including an example of syscall
wrapper as well as a stub with both pointer and non
pointer values.

Change-Id: I9b19d81d5b9cbf2bbb327f58dbf985b3b253e800
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/366348
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>

show more ...