[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 31/35] Hexagon (tests/tcg/hexagon) TCG tests
From: |
Alex Bennée |
Subject: |
Re: [PATCH v6 31/35] Hexagon (tests/tcg/hexagon) TCG tests |
Date: |
Tue, 12 Jan 2021 12:04:19 +0000 |
User-agent: |
mu4e 1.5.7; emacs 28.0.50 |
Taylor Simpson <tsimpson@quicinc.com> writes:
> Modify tests/tcg/configure.sh
> Add reference files to tests/tcg/hexagon
> Add Hexagon-specific tests
>
> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
> ---
> 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
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.
<snip>
> +++ b/tests/tcg/hexagon/pthread_cancel.c
> @@ -0,0 +1,43 @@
> +/*
> + * Copyright(c) 2019-2020 Qualcomm Innovation Center, Inc. All Rights
> Reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <stdio.h>
> +#include <unistd.h>
> +#include <pthread.h>
> +
> +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.
<snip>
--
Alex Bennée
- [PATCH v6 22/35] Hexagon (target/hexagon) generater phase 4 - decode tree, (continued)
- [PATCH v6 22/35] Hexagon (target/hexagon) generater phase 4 - decode tree, Taylor Simpson, 2021/01/07
- [PATCH v6 23/35] Hexagon (target/hexagon) opcode data structures, Taylor Simpson, 2021/01/07
- [PATCH v6 24/35] Hexagon (target/hexagon) macros, Taylor Simpson, 2021/01/07
- [PATCH v6 27/35] Hexagon (target/hexagon) TCG for instructions with multiple definitions, Taylor Simpson, 2021/01/07
- [PATCH v6 28/35] Hexagon (target/hexagon) TCG for floating point instructions, Taylor Simpson, 2021/01/07
- [PATCH v6 25/35] Hexagon (target/hexagon) instruction classes, Taylor Simpson, 2021/01/07
- [PATCH v6 32/35] Hexagon build infrastructure, Taylor Simpson, 2021/01/07
- [PATCH v6 29/35] Hexagon (target/hexagon) translation, Taylor Simpson, 2021/01/07
- [PATCH v6 33/35] Add Dockerfile for hexagon, Taylor Simpson, 2021/01/07
- [PATCH v6 31/35] Hexagon (tests/tcg/hexagon) TCG tests, Taylor Simpson, 2021/01/07
- Re: [PATCH v6 31/35] Hexagon (tests/tcg/hexagon) TCG tests,
Alex Bennée <=
- [PATCH v6 34/35] Auto-import Docker support files, Taylor Simpson, 2021/01/07
[PATCH v6 35/35] Add newline when generating Dockerfile, Taylor Simpson, 2021/01/07
Re: [PATCH v6 00/35] Hexagon patch series, no-reply, 2021/01/08
Re: [PATCH v6 00/35] Hexagon patch series, Alex Bennée, 2021/01/12