From: Marco Pagani <marpagan@redhat.com>
To: Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>
Cc: Marco Pagani <marpagan@redhat.com>,
linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org
Subject: [RFC PATCH v4 0/4] fpga: add initial KUnit tests for the subsystem
Date: Mon, 17 Apr 2023 14:23:04 +0200 [thread overview]
Message-ID: <20230417122308.131453-1-marpagan@redhat.com> (raw)
This patch set introduces initial KUnit test suites for the FPGA subsystem.
Tests can be run using:
[user@localhost linux]$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/fpga/tests
v4:
- Fix build error
v3:
- Calling fpga_bridges_put() between reconfigurations
- Functions for registering fake modules allocate and return context structs
v2:
- Restructured code into multiple suites to test components in isolation
- Reduced code duplication using init and exit methods
- Using a get_bridges() method to build the list of bridges just before programming
- Regions and Bridges are organized topologically
- Changed bitstream/bit to images
- Allocate images dynamically
- Renamed fpga-tests to fpga-test
- Simplified Kconfig
- Add license info to the fpga-test module
Marco Pagani (4):
fpga: add fake FPGA manager
fpga: add fake FPGA bridge
fpga: add fake FPGA region
fpga: add initial KUnit test suites
drivers/fpga/Kconfig | 2 +
drivers/fpga/Makefile | 3 +
drivers/fpga/tests/.kunitconfig | 5 +
drivers/fpga/tests/Kconfig | 11 +
drivers/fpga/tests/Makefile | 6 +
drivers/fpga/tests/fake-fpga-bridge.c | 242 +++++++++++++
drivers/fpga/tests/fake-fpga-bridge.h | 36 ++
drivers/fpga/tests/fake-fpga-mgr.c | 386 +++++++++++++++++++++
drivers/fpga/tests/fake-fpga-mgr.h | 43 +++
drivers/fpga/tests/fake-fpga-region.c | 259 ++++++++++++++
drivers/fpga/tests/fake-fpga-region.h | 40 +++
drivers/fpga/tests/fpga-test.c | 479 ++++++++++++++++++++++++++
12 files changed, 1512 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-test.c
base-commit: 6a8f57ae2eb07ab39a6f0ccad60c760743051026
--
2.39.2
next reply other threads:[~2023-04-17 12:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 12:23 Marco Pagani [this message]
2023-04-17 12:23 ` [RFC PATCH v4 1/4] fpga: add fake FPGA manager Marco Pagani
2023-04-20 18:31 ` Xu Yilun
2023-04-26 15:44 ` Marco Pagani
2023-05-03 16:53 ` Marco Pagani
2023-05-04 12:25 ` Xu Yilun
2023-05-04 20:05 ` Marco Pagani
2023-04-17 12:23 ` [RFC PATCH v4 2/4] fpga: add fake FPGA bridge Marco Pagani
2023-04-17 12:23 ` [RFC PATCH v4 3/4] fpga: add fake FPGA region Marco Pagani
2023-04-20 18:38 ` Xu Yilun
2023-04-26 16:21 ` Marco Pagani
2023-04-17 12:23 ` [RFC PATCH v4 4/4] fpga: add initial KUnit test suites Marco Pagani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230417122308.131453-1-marpagan@redhat.com \
--to=marpagan@redhat.com \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).