mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marco Pagani <marpagan@redhat.com>
To: Russ Weight <russell.h.weight@intel.com>
Cc: Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
	Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>,
	linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] fpga: add initial KUnit test suite for the subsystem
Date: Wed, 15 Feb 2023 12:19:03 +0100	[thread overview]
Message-ID: <01fd3850-af54-c0f0-ec2f-ae672420ce17@redhat.com> (raw)
In-Reply-To: <05f6238e-4ad8-f30c-38da-74c343e6abb5@intel.com>



On 2023-02-14 02:20, Russ Weight wrote:
> 
> 
> On 2/3/23 09:06, Marco Pagani wrote:
>> 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@localhost linux]$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/fpga/tests
> When I tried running these tests, I got an error until I created this file:
> 
> drivers/fpga/tests/.kunitconfig:
> CONFIG_KUNIT=y
> CONFIG_FPGA=y
> CONFIG_FPGA_REGION=y
> CONFIG_FPGA_BRIDGE=y
> CONFIG_FPGA_KUNIT_TESTS=y
> 
> I think this file needs to be included in your patchset?
> 
> - Russ
>


Patch 1/4 includes a .kunitconfig file with these configs set =y

> diff --git a/drivers/fpga/tests/.kunitconfig b/drivers/fpga/tests/.kunitconfig
> new file mode 100644
> index 000000000000..a1c2a2974c39
> --- /dev/null
> +++ b/drivers/fpga/tests/.kunitconfig
> @@ -0,0 +1,5 @@
> +CONFIG_KUNIT=y
> +CONFIG_FPGA=y
> +CONFIG_FPGA_REGION=y
> +CONFIG_FPGA_BRIDGE=y
> +CONFIG_FPGA_KUNIT_TESTS=y

To double-check for any patch format errors, I downloaded the patch set
from lore.kernel.org and applied it on a fresh tree with Git (version
2.39.1) using git am. In my case, Git created the .kunitconfig file and
I was able to run the 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
>>
> 

Thanks,
Marco


  reply	other threads:[~2023-02-15 11:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 17:06 Marco Pagani
2023-02-03 17:06 ` [RFC PATCH 1/4] fpga: add initial KUnit test suite Marco Pagani
2023-02-07  1:05   ` Russ Weight
2023-02-07 13:28     ` Marco Pagani
2023-02-13 23:37   ` Russ Weight
2023-02-15 11:47     ` Marco Pagani
2023-02-18  9:59   ` Xu Yilun
2023-02-21 11:10     ` Marco Pagani
2023-02-24  6:14       ` Xu Yilun
2023-03-01 10:14         ` Marco Pagani
2023-03-04 15:09           ` Xu Yilun
2023-02-03 17:06 ` [RFC PATCH 2/4] fpga: add fake FPGA region Marco Pagani
2023-02-18 10:13   ` Xu Yilun
2023-02-21 14:53     ` Marco Pagani
2023-02-24  7:20       ` Xu Yilun
2023-03-01 10:51         ` Marco Pagani
2023-03-04 15:24           ` Xu Yilun
2023-02-03 17:06 ` [RFC PATCH 3/4] fpga: add fake FPGA manager Marco Pagani
2023-02-03 17:06 ` [RFC PATCH 4/4] fpga: add fake FPGA bridge Marco Pagani
2023-02-14  1:20 ` [RFC PATCH 0/4] fpga: add initial KUnit test suite for the subsystem Russ Weight
2023-02-15 11:19   ` Marco Pagani [this message]
2023-02-15 16:43     ` Russ Weight

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=01fd3850-af54-c0f0-ec2f-ae672420ce17@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=russell.h.weight@intel.com \
    --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

all inboxes | Powered by JetHome®