[dpdk-dev] [PATCH v3 01/11] app/test: introduce resources for tests
Jan Viktorin
viktorin at rehivetech.com
Thu May 19 10:51:08 CEST 2016
I forgot to fix this:
Check patch error:
12817:
ERROR: space required after that ',' (ctx:VxV)
#244: FILE: app/test/resource.h:93:
+static void __attribute__((constructor,used)) resinitfn_ ##n(void) ^
total: 1 errors, 0 warnings, 259 lines checked
will do for v4.
Jan
On Tue, 17 May 2016 20:34:51 +0200
Jan Viktorin <viktorin at rehivetech.com> wrote:
> Certain internal mechanisms of DPDK access different file system structures
> (e.g. /sys/bus/pci/devices). It is difficult to test those cases automatically
> by a unit test when such path is not hard-coded and there is no simple way how
> to distribute fake ones with the current testing environment.
>
> This patch adds a possibility to declare a resource embedded in the test binary
> itself. The structure resource cover the generic situation - it provides a name
> for lookup and pointers to the embedded data blob. A resource is registered
> in a constructor by the macro REGISTER_RESOURCE.
>
> Some initial tests of simple resources is included and added into the group_1.
>
> Signed-off-by: Jan Viktorin <viktorin at rehivetech.com>
> ---
> v3:
> * fixed doc comments
> ---
> app/test/Makefile | 2 +
> app/test/autotest_data.py | 6 +++
> app/test/resource.c | 66 +++++++++++++++++++++++++++++++
> app/test/resource.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++
> app/test/test_resource.c | 75 ++++++++++++++++++++++++++++++++++++
> 5 files changed, 247 insertions(+)
> create mode 100644 app/test/resource.c
> create mode 100644 app/test/resource.h
> create mode 100644 app/test/test_resource.c
[...]
More information about the dev
mailing list