All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>
Cc: "Schofield, Alison" <alison.schofield@intel.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Subject: Re: [ndctl PATCH 11/11] cxl/test: Checkout region setup/teardown
Date: Wed, 13 Jul 2022 07:47:54 -0700	[thread overview]
Message-ID: <62cedb1ad2457_6070c29451@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <4c3074a5393a5d3758ac58028e047edf43f84115.camel@intel.com>

Verma, Vishal L wrote:
> On Tue, 2022-07-12 at 12:08 -0700, Dan Williams wrote:
> > Exercise the fundamental region provisioning sysfs mechanisms of discovering
> > available DPA capacity, allocating DPA to a region, and programming HDM
> > decoders.
> > 
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> > ---
> >  test/cxl-region-create.sh |  122 +++++++++++++++++++++++++++++++++++++++++++++
> >  test/meson.build          |    2 +
> >  2 files changed, 124 insertions(+)
> >  create mode 100644 test/cxl-region-create.sh
> 
> Since this isn't actually creating a region, should this be named
> cxl-reserve-dpa.sh ?

The test goes all the way to the point of registering a new region with
libnvdimm, so it is region creation.

> Alternatively - I guess this test could just be extended to do actual
> region creation once that is available in cxl-cli?

I was thinking that's a separate test that moves from just one hardcoded
pmem region via sysfs toggling to permuting all the possible cxl_test
region configurations across both modes via 'cxl create-region'. One is
a sysfs smoke test the other is a create-region unit test.

> 
> > 
> > diff --git a/test/cxl-region-create.sh b/test/cxl-region-create.sh
> > new file mode 100644
> > index 000000000000..389988759b08
> > --- /dev/null
> > +++ b/test/cxl-region-create.sh
> > @@ -0,0 +1,122 @@
> > +#!/bin/bash
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (C) 2022 Intel Corporation. All rights reserved.
> > +
> > +. $(dirname $0)/common
> > +
> > +rc=1
> > +
> > +set -ex
> > +
> > +trap 'err $LINENO' ERR
> > +
> > +check_prereq "jq"
> > +
> > +modprobe -r cxl_test
> > +modprobe cxl_test
> > +udevadm settle
> > +
> > +# THEORY OF OPERATION: Create a x8 interleave across the pmem capacity
> > +# of the 8 endpoints defined by cxl_test, commit the decoders (which
> > +# just stubs out the actual hardware programming aspect, but updates the
> > +# driver state), and then tear it all down again. As with other cxl_test
> > +# tests if the CXL topology in tools/testing/cxl/test/cxl.c ever changes
> > +# then the paired update must be made to this test.
> > +
> > +# find the root decoder that spans both test host-bridges and support pmem
> > +decoder=$(cxl list -b cxl_test -D -d root | jq -r ".[] |
> 
> This and all following 'cxl' invocations should be "$CXL" which we get
> from test/common

Ah, yeah, missed that.

  reply	other threads:[~2022-07-13 14:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 19:07 [ndctl PATCH 00/11] cxl: Region provisioning foundation Dan Williams
2022-07-12 19:07 ` [ndctl PATCH 01/11] cxl/list: Reformat option list Dan Williams
2022-07-13 19:04   ` [PATCH 1/11] " Davidlohr Bueso
2022-07-12 19:07 ` [ndctl PATCH 02/11] cxl/list: Emit endpoint decoders filtered by memdev Dan Williams
2022-07-12 19:07 ` [ndctl PATCH 03/11] cxl/list: Hide 0s in disabled decoder listings Dan Williams
2022-07-13 19:16   ` [PATCH 3/11] " Davidlohr Bueso
2022-07-12 19:07 ` [ndctl PATCH 04/11] cxl/list: Add DPA span to endpoint " Dan Williams
2022-07-12 19:07 ` [ndctl PATCH 05/11] cxl/lib: Maintain decoders in id order Dan Williams
2022-07-13 14:44   ` Ira Weiny
2022-07-13 16:23     ` Dan Williams
2022-07-13 19:45   ` [PATCH 5/11] " Davidlohr Bueso
2022-07-13 23:14     ` Dan Williams
2022-07-12 19:07 ` [ndctl PATCH 06/11] cxl/memdev: Fix json for multi-device partitioning Dan Williams
2022-07-12 19:08 ` [ndctl PATCH 07/11] cxl/list: Emit 'mode' for endpoint decoder objects Dan Williams
2022-07-12 19:08 ` [ndctl PATCH 08/11] cxl/set-partition: Accept 'ram' as an alias for 'volatile' Dan Williams
2022-07-13 19:06   ` [PATCH 8/11] " Davidlohr Bueso
2022-07-12 19:08 ` [ndctl PATCH 09/11] cxl/memdev: Add {reserve,free}-dpa commands Dan Williams
2022-07-13  8:04   ` Verma, Vishal L
2022-07-13 15:22     ` Dan Williams
2022-07-13 15:44       ` Verma, Vishal L
2022-07-13 16:55         ` Dan Williams
2022-07-12 19:08 ` [ndctl PATCH 10/11] cxl/test: Update CXL memory parameters Dan Williams
2022-07-12 19:08 ` [ndctl PATCH 11/11] cxl/test: Checkout region setup/teardown Dan Williams
2022-07-13  7:47   ` Verma, Vishal L
2022-07-13 14:47     ` Dan Williams [this message]
2022-07-13 15:15       ` Verma, Vishal L
2022-07-13 16:53         ` Dan Williams

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=62cedb1ad2457_6070c29451@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.