> -----Original Message-----
> From: Alex Bennée <[email protected]>
> Sent: Tuesday, January 12, 2021 6:04 AM
> To: Taylor Simpson <[email protected]>
> Cc: [email protected]; Brian Cain <[email protected]>;
> [email protected]; [email protected]; [email protected];
> [email protected]
> Subject: Re: [PATCH v6 31/35] Hexagon (tests/tcg/hexagon) TCG tests
>
> Taylor Simpson <[email protected]> writes:
>
> > Modify tests/tcg/configure.sh
> > Add reference files to tests/tcg/hexagon
> > Add Hexagon-specific tests
> >
> > Signed-off-by: Taylor Simpson <[email protected]>
> > ---
> >  tests/tcg/hexagon/atomics.c        | 122 ++++++
> >  tests/tcg/hexagon/clrtnew.c        |  56 +++
> >  tests/tcg/hexagon/dual_stores.c    |  60 +++
> >  tests/tcg/hexagon/fpstuff.c        | 370 ++++++++++++++++++
> >  tests/tcg/hexagon/mem_noshuf.c     | 328 ++++++++++++++++
> >  tests/tcg/hexagon/misc.c           | 360 +++++++++++++++++
> >  tests/tcg/hexagon/preg_alias.c     | 106 +++++
> >  tests/tcg/hexagon/pthread_cancel.c |  43 +++
> >  tests/tcg/configure.sh             |   4 +-
> >  tests/tcg/hexagon/Makefile.target  |  48 +++
>
> Could you split this patch up please. I would say:
>
>  1: configure.sh, Makefilefile.target with multiarch tests (and float
>  ref files)
>  2. atomics/loadstore/mem tests
>  3. additional fp tests

Sure.

> BTW is there enough support for a bare metal system emulation test? You
> would need a minimal boot.S and a library function for outputting
> characters to some device and an exit which can set the return code.

This is in progress but not ready for submission.  Once this series is merged, 
the plan is to incrementally add the remaining user space instructions, 
including HVX then add the system mode support.

> > +static void *func(void *arg)
> > +{
> > +    sleep(3);
> > +    return 0;
> > +}
> > +
> > +int main()
> > +{
> > +    int err = 0;
> > +    pthread_t thread;
> > +    void *res;
> > +
> > +    pthread_create(&thread, 0, func, NULL);
> > +    pthread_cancel(thread);
> > +    pthread_join(thread, &res);
> > +    if (res != PTHREAD_CANCELED) {
> > +        err++;
> > +    }
> > +
> > +    puts(err == 0 ? "PASS" : "FAIL");
> > +    return err == 0 ? 0 : -1;
> > +}
>
> This seems like it could be a multiarch test unless the othread cancel
> semantics for Hexagon/Linux are very different.

Yes, it could be a multiarch test.  I'll create a standalone patch (not part of 
this series) to add this to tests/tcg/multiarch/testthread.c.


Thanks for the feedback,
Taylor

Reply via email to