mbox series

[RFC,0/3] tests/tcg/ppc64le: paddi tests

Message ID 20210415214138.563795-1-matheus.ferst@eldorado.org.br (mailing list archive)
Headers show
Series tests/tcg/ppc64le: paddi tests | expand

Message

Matheus K. Ferst April 15, 2021, 9:41 p.m. UTC
From: Matheus Ferst <matheus.ferst@eldorado.org.br>

Based-on: <20210413211129.457272-1-luis.pires@eldorado.org.br>

This series adds gcc-10 based images to enable the build of tests with Power10
instructions. Then two tests for paddi are added:
- The first one checks a weird behavior observed on POWER10 Functional Simulator
  1.1.0, where the 34-bit immediate is treated as a 32-bits one;
- The second one exercises the R=1 path of paddi, where CIA is used instead of RA.
  The test is failing with the current implementation because we use cpu_nip,
  which is not updated all the time. Luis already has the fix, it should be
  applied on the next version of his patch series.

The main reason to submit this patch as an RFC first is the docker part. I would
lie if I tell you that I understand half of what is going on there.
 - 'make docker-test-tcg' fails, but apparently on unrelated things;
 - 'make docker-run-test-tcg@debian-ppc64el-cross' passes, but it looks
   like the test is skipped?
 - 'make check-tcg' runs the test and passes (with the fix in place for the
   second).

Finally, get_maintainer.pl found no maintainers for
tests/tcg/ppc64{,le}/Makefile.target. Would it be Mr. Gibson?

Thanks,
Matheus K. Ferst

Matheus Ferst (3):
  tests/docker: gcc-10 based images for ppc64{,le} tests
  tests/tcg/ppc64le: load 33-bits constant with paddi
  tests/tcg/ppc64le: R=1 test for paddi

 tests/docker/Makefile.include                 |  4 +++
 .../debian-ppc64-test-cross.docker            | 13 ++++++++++
 .../debian-ppc64el-test-cross.docker          | 17 ++++++++++++
 tests/tcg/configure.sh                        | 12 ++++++---
 tests/tcg/ppc64/Makefile.target               |  6 +++++
 tests/tcg/ppc64le/Makefile.target             |  6 +++++
 tests/tcg/ppc64le/pla.c                       | 26 +++++++++++++++++++
 tests/tcg/ppc64le/pli_33bits.c                | 22 ++++++++++++++++
 8 files changed, 102 insertions(+), 4 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-ppc64-test-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-ppc64el-test-cross.docker
 create mode 100644 tests/tcg/ppc64le/pla.c
 create mode 100644 tests/tcg/ppc64le/pli_33bits.c

Comments

David Gibson April 16, 2021, 3:52 a.m. UTC | #1
On Thu, Apr 15, 2021 at 06:41:35PM -0300, matheus.ferst@eldorado.org.br wrote:
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> 
> Based-on: <20210413211129.457272-1-luis.pires@eldorado.org.br>

First things first: it's unclear to me if this is testing stuff that's
already merged, or it's speculative tests for the in-progress prefixed
instruction stuff.  i.e. If these tests are applied right now, will
they pass?

> This series adds gcc-10 based images to enable the build of tests with Power10
> instructions. Then two tests for paddi are added:
> - The first one checks a weird behavior observed on POWER10 Functional Simulator
>   1.1.0, where the 34-bit immediate is treated as a 32-bits one;
> - The second one exercises the R=1 path of paddi, where CIA is used instead of RA.
>   The test is failing with the current implementation because we use cpu_nip,
>   which is not updated all the time. Luis already has the fix, it should be
>   applied on the next version of his patch series.
> 
> The main reason to submit this patch as an RFC first is the docker part. I would
> lie if I tell you that I understand half of what is going on there.
>  - 'make docker-test-tcg' fails, but apparently on unrelated things;
>  - 'make docker-run-test-tcg@debian-ppc64el-cross' passes, but it looks
>    like the test is skipped?
>  - 'make check-tcg' runs the test and passes (with the fix in place for the
>    second).

What sort of host was that on?  Unfortunately 'make check-tcg' has
been broken on a POWER host for some time, and I've never had time to
look into it.

> 
> Finally, get_maintainer.pl found no maintainers for
> tests/tcg/ppc64{,le}/Makefile.target. Would it be Mr. Gibson?

Uh... sorta?  I also don't know much about what's going on here, but
I'm probably maintainer by default.


> 
> Thanks,
> Matheus K. Ferst
> 
> Matheus Ferst (3):
>   tests/docker: gcc-10 based images for ppc64{,le} tests
>   tests/tcg/ppc64le: load 33-bits constant with paddi
>   tests/tcg/ppc64le: R=1 test for paddi
> 
>  tests/docker/Makefile.include                 |  4 +++
>  .../debian-ppc64-test-cross.docker            | 13 ++++++++++
>  .../debian-ppc64el-test-cross.docker          | 17 ++++++++++++
>  tests/tcg/configure.sh                        | 12 ++++++---
>  tests/tcg/ppc64/Makefile.target               |  6 +++++
>  tests/tcg/ppc64le/Makefile.target             |  6 +++++
>  tests/tcg/ppc64le/pla.c                       | 26 +++++++++++++++++++
>  tests/tcg/ppc64le/pli_33bits.c                | 22 ++++++++++++++++
>  8 files changed, 102 insertions(+), 4 deletions(-)
>  create mode 100644 tests/docker/dockerfiles/debian-ppc64-test-cross.docker
>  create mode 100644 tests/docker/dockerfiles/debian-ppc64el-test-cross.docker
>  create mode 100644 tests/tcg/ppc64le/pla.c
>  create mode 100644 tests/tcg/ppc64le/pli_33bits.c
>
Matheus K. Ferst April 16, 2021, 2:13 p.m. UTC | #2
On 16/04/2021 00:52, David Gibson wrote:
> On Thu, Apr 15, 2021 at 06:41:35PM -0300, matheus.ferst@eldorado.org.br wrote:
>> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>
>> Based-on: <20210413211129.457272-1-luis.pires@eldorado.org.br>
> 
> First things first: it's unclear to me if this is testing stuff that's
> already merged, or it's speculative tests for the in-progress prefixed
> instruction stuff.  i.e. If these tests are applied right now, will
> they pass?

GCC-10 images can be used to test already merged Power10 instructions, 
such as brh/brw/brd, but I haven't writen tests for them (yet?). Both 
tests are targeting paddi, whose implementation is in-progress, so 
applying them now will fail. Maybe I should split the series? Patch 1 
for now, and Patch 2 and 3 when paddi are merged?

>> This series adds gcc-10 based images to enable the build of tests with Power10
>> instructions. Then two tests for paddi are added:
>> - The first one checks a weird behavior observed on POWER10 Functional Simulator
>>    1.1.0, where the 34-bit immediate is treated as a 32-bits one;
>> - The second one exercises the R=1 path of paddi, where CIA is used instead of RA.
>>    The test is failing with the current implementation because we use cpu_nip,
>>    which is not updated all the time. Luis already has the fix, it should be
>>    applied on the next version of his patch series.
>>
>> The main reason to submit this patch as an RFC first is the docker part. I would
>> lie if I tell you that I understand half of what is going on there.
>>   - 'make docker-test-tcg' fails, but apparently on unrelated things;
>>   - 'make docker-run-test-tcg@debian-ppc64el-cross' passes, but it looks
>>     like the test is skipped?
>>   - 'make check-tcg' runs the test and passes (with the fix in place for the
>>     second).
> 
> What sort of host was that on?  Unfortunately 'make check-tcg' has
> been broken on a POWER host for some time, and I've never had time to
> look into it.
> 

I'm testing on amd64, but I can also try on ppc64le.

>>
>> Finally, get_maintainer.pl found no maintainers for
>> tests/tcg/ppc64{,le}/Makefile.target. Would it be Mr. Gibson?
> 
> Uh... sorta?  I also don't know much about what's going on here, but
> I'm probably maintainer by default.
> 

So, should I update MAINTAINERS in this series?
David Gibson April 19, 2021, 1:14 a.m. UTC | #3
On Fri, Apr 16, 2021 at 11:13:48AM -0300, Matheus K. Ferst wrote:
> On 16/04/2021 00:52, David Gibson wrote:
> > On Thu, Apr 15, 2021 at 06:41:35PM -0300, matheus.ferst@eldorado.org.br wrote:
> > > From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> > > 
> > > Based-on: <20210413211129.457272-1-luis.pires@eldorado.org.br>
> > 
> > First things first: it's unclear to me if this is testing stuff that's
> > already merged, or it's speculative tests for the in-progress prefixed
> > instruction stuff.  i.e. If these tests are applied right now, will
> > they pass?
> 
> GCC-10 images can be used to test already merged Power10 instructions, such
> as brh/brw/brd, but I haven't writen tests for them (yet?). Both tests are
> targeting paddi, whose implementation is in-progress, so applying them now
> will fail. Maybe I should split the series? Patch 1 for now, and Patch 2 and
> 3 when paddi are merged?

That sounds reasonable, as long as patch 1 does *something* visible
now (e.g. running existing tests with the new compiler).

> 
> > > This series adds gcc-10 based images to enable the build of tests with Power10
> > > instructions. Then two tests for paddi are added:
> > > - The first one checks a weird behavior observed on POWER10 Functional Simulator
> > >    1.1.0, where the 34-bit immediate is treated as a 32-bits one;
> > > - The second one exercises the R=1 path of paddi, where CIA is used instead of RA.
> > >    The test is failing with the current implementation because we use cpu_nip,
> > >    which is not updated all the time. Luis already has the fix, it should be
> > >    applied on the next version of his patch series.
> > > 
> > > The main reason to submit this patch as an RFC first is the docker part. I would
> > > lie if I tell you that I understand half of what is going on there.
> > >   - 'make docker-test-tcg' fails, but apparently on unrelated things;
> > >   - 'make docker-run-test-tcg@debian-ppc64el-cross' passes, but it looks
> > >     like the test is skipped?
> > >   - 'make check-tcg' runs the test and passes (with the fix in place for the
> > >     second).
> > 
> > What sort of host was that on?  Unfortunately 'make check-tcg' has
> > been broken on a POWER host for some time, and I've never had time to
> > look into it.
> > 
> 
> I'm testing on amd64, but I can also try on ppc64le.
> 
> > > 
> > > Finally, get_maintainer.pl found no maintainers for
> > > tests/tcg/ppc64{,le}/Makefile.target. Would it be Mr. Gibson?
> > 
> > Uh... sorta?  I also don't know much about what's going on here, but
> > I'm probably maintainer by default.
> > 
> 
> So, should I update MAINTAINERS in this series?
>