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