[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230203170653.414990-1-marpagan@redhat.com>
Date: Fri, 3 Feb 2023 18:06:49 +0100
From: Marco Pagani <marpagan@...hat.com>
To: Moritz Fischer <mdf@...nel.org>, Wu Hao <hao.wu@...el.com>,
Xu Yilun <yilun.xu@...el.com>, Tom Rix <trix@...hat.com>
Cc: Marco Pagani <marpagan@...hat.com>, linux-kernel@...r.kernel.org,
linux-fpga@...r.kernel.org
Subject: [RFC PATCH 0/4] fpga: add initial KUnit test suite for the subsystem
This patch set introduces a KUnit suite to test the core components
of the FPGA subsystem. More specifically, the suite tests the core
functions of the FPGA manager, FPGA bridge, and FPGA region.
These components are tested using "fake" modules that allow
observing their internals without altering the source code.
The test suite can be run using
[user@...alhost linux]$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/fpga/tests
Marco Pagani (4):
fpga: add initial KUnit test suite
fpga: add fake FPGA region
fpga: add fake FPGA manager
fpga: add fake FPGA bridge
drivers/fpga/Kconfig | 2 +
drivers/fpga/Makefile | 3 +
drivers/fpga/tests/.kunitconfig | 5 +
drivers/fpga/tests/Kconfig | 15 ++
drivers/fpga/tests/Makefile | 6 +
drivers/fpga/tests/fake-fpga-bridge.c | 214 +++++++++++++++
drivers/fpga/tests/fake-fpga-bridge.h | 36 +++
drivers/fpga/tests/fake-fpga-mgr.c | 365 ++++++++++++++++++++++++++
drivers/fpga/tests/fake-fpga-mgr.h | 42 +++
drivers/fpga/tests/fake-fpga-region.c | 186 +++++++++++++
drivers/fpga/tests/fake-fpga-region.h | 37 +++
drivers/fpga/tests/fpga-tests.c | 264 +++++++++++++++++++
12 files changed, 1175 insertions(+)
create mode 100644 drivers/fpga/tests/.kunitconfig
create mode 100644 drivers/fpga/tests/Kconfig
create mode 100644 drivers/fpga/tests/Makefile
create mode 100644 drivers/fpga/tests/fake-fpga-bridge.c
create mode 100644 drivers/fpga/tests/fake-fpga-bridge.h
create mode 100644 drivers/fpga/tests/fake-fpga-mgr.c
create mode 100644 drivers/fpga/tests/fake-fpga-mgr.h
create mode 100644 drivers/fpga/tests/fake-fpga-region.c
create mode 100644 drivers/fpga/tests/fake-fpga-region.h
create mode 100644 drivers/fpga/tests/fpga-tests.c
--
2.39.1
Powered by blists - more mailing lists