From: Dave Jiang <dave.jiang@intel.com>
To: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>,
"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Cc: "linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>
Subject: Re: [ndctl PATCH 2/2] README.md: document CXL unit tests
Date: Tue, 30 May 2023 14:38:13 -0700 [thread overview]
Message-ID: <7cdf6d5f-72f4-2794-c305-fda6042d320f@intel.com> (raw)
In-Reply-To: <d77dbd2e-452e-ab91-d045-e89fd7a7a9f9@fujitsu.com>
On 5/25/23 21:01, Zhijian Li (Fujitsu) wrote:
>
> On 25/05/2023 23:28, Dave Jiang wrote:
>> On 5/22/23 20:57, Li Zhijian wrote:
>>> It requires some CLX specific kconfigs and testing purpose module
>>>
>>> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
>>> ---
>>> README.md | 17 +++++++++++++++--
>>> 1 file changed, 15 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/README.md b/README.md
>>> index 7c7cf0dd065d..521e2582fb05 100644
>>> --- a/README.md
>>> +++ b/README.md
>>> @@ -39,8 +39,8 @@ https://nvdimm.wiki.kernel.org/start
>>> Unit Tests
>>> ==========
>>> -The unit tests run by `meson test` require the nfit_test.ko module to be
>>> -loaded. To build and install nfit_test.ko:
>>> +The unit tests run by `meson test` require the nfit_test.ko and cxl_test.ko modules to be
>>> +loaded. To build and install nfit_test.ko and cxl_test.ko:
>>> 1. Obtain the kernel source. For example,
>>> `git clone -b libnvdimm-for-next git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git`
>>> @@ -70,6 +70,13 @@ loaded. To build and install nfit_test.ko:
>>> CONFIG_NVDIMM_DAX=y
>>> CONFIG_DEV_DAX_PMEM=m
>>> CONFIG_ENCRYPTED_KEYS=y
>>> + CONFIG_CXL_BUS=m
>>> + CONFIG_CXL_PCI=m
>>> + CONFIG_CXL_ACPI=m
>>> + CONFIG_CXL_PMEM=m
>>> + CONFIG_CXL_MEM=m
>>> + CONFIG_CXL_PORT=m
>>> + CONFIG_DEV_DAX_CXL=m
>> Probably should have a separate entry for CXL configs for testing. There's a cxl.git at kernel.org as well.
>>
>> Also will need:
>>
>> CONFIG_NVDIMM_SECURITY_TEST=y
>>
> I also noticed that Yi have sent a patch to add this and some other kconfigs
> https://lore.kernel.org/nvdimm/20230516121730.2561605-1-yi.zhang@redhat.com/T/#u
>
>> CONFIG_CXL_REGION_INVALIDATION_TEST=y
> Yes, i indeed missed it.
>
> I insert a section before *run the test* as below. A markdown preview of README.md
> Please take another look.
>
> diff --git a/README.md b/README.md
> index 7c7cf0dd065d..324d179ac4ea 100644
> --- a/README.md
> +++ b/README.md
> @@ -82,6 +82,32 @@ loaded. To build and install nfit_test.ko:
> sudo make modules_install
> ```
>
> +1. CXL test
> +
> + The unit tests will also run CXL test by default. In order to make the
> + CXL test work properly, we need to install the cxl_test.ko as well.
> +
> + Obtain the CXL kernel source(optional). For example,
> + `git clone -b pending git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git`
> +
> + Enable CXL specific kernel configurations
> + ```
> + CONFIG_CXL_BUS=m
> + CONFIG_CXL_PCI=m
> + CONFIG_CXL_ACPI=m
> + CONFIG_CXL_PMEM=m
> + CONFIG_CXL_MEM=m
> + CONFIG_CXL_PORT=m
> + CONFIG_CXL_REGION=y
> + CONFIG_CXL_REGION_INVALIDATION_TEST=y
> + CONFIG_DEV_DAX_CXL=m
> + ```
> + Install cxl_test.ko
> + ```For cxl_test.ko
> + make M=tools/testing/cxl
> + sudo make M=tools/testing/cxl modules_install
> + sudo make modules_install
> + ```
> 1. Now run `meson test -C build` in the ndctl source directory, or `ndctl test`,
> if ndctl was built with `-Dtest=enabled` as a configuration option to meson.
LGTM
>
>
>>
>>
>>> ```
>>> 1. Build and install the unit test enabled libnvdimm modules in the
>>> @@ -77,8 +84,14 @@ loaded. To build and install nfit_test.ko:
>>> the `depmod` that runs during the final `modules_install`
>>> ```
>>> + # For nfit_test.ko
>>> make M=tools/testing/nvdimm
>>> sudo make M=tools/testing/nvdimm modules_install
>>> +
>>> + # For cxl_test.ko
>>> + make M=tools/testing/cxl
>>> + sudo make M=tools/testing/cxl modules_install
>>> +
>>> sudo make modules_install
>>> ```
next prev parent reply other threads:[~2023-05-30 21:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 3:57 [ndctl PATCH 1/2] CONTRIBUTING.md: document cxl mailing list Li Zhijian
2023-05-23 3:57 ` [ndctl PATCH 2/2] README.md: document CXL unit tests Li Zhijian
2023-05-25 15:28 ` Dave Jiang
2023-05-26 4:01 ` Zhijian Li (Fujitsu)
2023-05-26 4:21 ` Zhijian Li (Fujitsu)
2023-05-30 21:38 ` Dave Jiang [this message]
2023-05-25 15:29 ` [ndctl PATCH 1/2] CONTRIBUTING.md: document cxl mailing list Dave Jiang
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=7cdf6d5f-72f4-2794-c305-fda6042d320f@intel.com \
--to=dave.jiang@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=lizhijian@fujitsu.com \
--cc=nvdimm@lists.linux.dev \
/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