On Wed, Feb 14, 2024 at 11:28:45AM -0800, Vishal Verma wrote:
> On Tue, 2024-02-13 at 23:14 -0800, [email protected] wrote:
> > From: Alison Schofield <[email protected]>
> >
> > cxl-xor-region.sh includes test cases for 1 & 2 way host bridge
> > interleaves. Add a new test case to exercise the modulo math
> > function the CXL driver uses to find positions in a 3-way host
> > bridge interleave.
> >
> > Skip this test case, don't fail, if the new 3-way XOR decoder
> > is not present in cxl/test.
> >
> > Add the missing check_dmesg helper before exiting this test.
> >
> > Signed-off-by: Alison Schofield <[email protected]>
> > ---
> >  test/cxl-xor-region.sh | 33 +++++++++++++++++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> >
> > diff --git a/test/cxl-xor-region.sh b/test/cxl-xor-region.sh
> > index 117e7a4bba61..2f3b4aa5208a 100644
> > --- a/test/cxl-xor-region.sh
> > +++ b/test/cxl-xor-region.sh
> > @@ -86,11 +86,44 @@ setup_x4()
> >          memdevs="$mem0 $mem1 $mem2 $mem3"
> >  }
> >
> > +setup_x3()
> > +{
> > +        # find an x3 decoder
> > +        decoder=$($CXL list -b cxl_test -D -d root | jq -r ".[] |
> > +          select(.pmem_capable == true) |
> > +          select(.nr_targets == 3) |
> > +          .decoder")
> 
> Are these lines..
> 
> > +
> > +     if [[ ! $decoder ]]; then
> > +             echo "no x3 decoder found, skipping xor-x3 test"
> > +             return
> > +     fi
> > +
> > +        # Find a memdev for each host-bridge interleave position
> > +        port_dev0=$($CXL list -T -d "$decoder" | jq -r ".[] |
> > +            .targets | .[] | select(.position == 0) | .target")
> > +        port_dev1=$($CXL list -T -d "$decoder" | jq -r ".[] |
> > +            .targets | .[] | select(.position == 1) | .target")
> > +        port_dev2=$($CXL list -T -d "$decoder" | jq -r ".[] |
> > +            .targets | .[] | select(.position == 2) | .target")
> 
> ..and these mis-indented?

Thanks for calling it out. I'll tidy up white space in a new revision.

snip

> 

Reply via email to