Bug 457504 - Add LOONGARCH64/Linux port to Valgrind
Summary: Add LOONGARCH64/Linux port to Valgrind
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-05 02:37 UTC by Feiyang Chen
Modified: 2024-11-14 11:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patches (481.80 KB, application/zip)
2022-08-05 02:37 UTC, Feiyang Chen
Details
patches-v2 (421.08 KB, application/zip)
2022-08-08 11:16 UTC, Feiyang Chen
Details
patches-v3 (421.06 KB, application/zip)
2022-10-25 07:13 UTC, Feiyang Chen
Details
patches-v4 (420.74 KB, application/zip)
2023-01-29 09:07 UTC, Feiyang Chen
Details
patches-v5 (333.89 KB, application/zip)
2023-06-30 09:52 UTC, Feiyang Chen
Details
patches-v6 (325.41 KB, application/x-zip-compressed)
2024-01-06 08:46 UTC, Feiyang Chen
Details
patches-v7 (326.10 KB, application/zip)
2024-04-28 12:28 UTC, Feiyang Chen
Details
patches-v8 (333.18 KB, application/zip)
2024-11-14 11:32 UTC, Feiyang Chen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Feiyang Chen 2022-08-05 02:37:03 UTC
Created attachment 151124 [details]
patches

LoongArch is a brand-new ISA developed by the Loongson Technology Corporation Limited, which is a bit like RISC-V. LoongArch includes a reduced 32-bit version, a standard 32-bit version and a 64-bit version (LoongArch64).
You can find the documentation for LoongArch here:
https://github.com/loongson/LoongArch-Documentation

I am focusing on running Valgrind on LoongArch64/Linux.
I develop Valgrind on the CLFS (Cross Linux From Scratch) distribution.
Later I'll provide a 3A5000 machine for remote connection.

Here is my local tree with all the patches applied:
https://github.com/loongson/valgrind-loongarch64
Comment 1 Feiyang Chen 2022-08-05 02:56:13 UTC
Here is my system environment:
# uname -a
Linux Sunhaiyong 5.19.0-rc8+ #1 SMP PREEMPT Tue Aug 2 09:25:46 UTC 2022 loongarch64 GNU/Linux
# cat /etc/os-release
NAME="My GNU/Linux System for LoongArch64"
VERSION="6.0"
ID=CLFS4LA64
PRETTY_NAME="My GNU/Linux System for LoongArch64 6.0"
VERSION_CODENAME="Sun Haiyong"

Here are my results:
== 650 tests, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
drd/tests/pth_mutex_signal               (stderr)
Comment 2 Feiyang Chen 2022-08-08 11:16:16 UTC
Created attachment 151172 [details]
patches-v2

Reorder and merge patches to make things keep building for each separate patch.

- Patches 1-4 add some new IROps, a new IRMBusEvent and a new IRJumpKind to libVEX.
- Patches 5-6 add the VEX and decode infrastructure for LOONGARCH64.
- Patch 7 enables the LOONGARCH64/Linux target in the build system.

Since then, Valgrind for LOONGARCH64/Linux can be compiled on LoongArch64 Linux, or cross-compiled on other machines.

- Patches 8-21 add support for the libVEX loongarch64 front end.
- Patches 22-76 add support for the libVEX loongarch64 back end.

Since then, libVEX for loongarch64 can translate loongarch64 to loongarch64 properly.

- Patch 77 updates vbit test for loongarch64.
- Patch 78-99 add LOONGARCH64/Linux support for core and tools.
- Patch 100 makes libVEX always use fallback LLSC on loongarch64.

Since then, Vaglrind can run on LOONGARCH64/Linux properly.

-Patch 101-121 implement and add tests for LOONGARCH64/Linux.

Since then, Vaglrind can pass a large number of regression tests on LOONGARCH64/Linux.

- Patch 122 sets up nightly testing for loongarch64.
- Patch 123 adds a simple README for loongarch64.
Comment 3 Feiyang Chen 2022-10-25 07:13:35 UTC
Created attachment 153184 [details]
patches-v3

Rebased on 3.20.0.
Comment 4 Paul Floyd 2023-01-28 21:03:01 UTC
With a build based on 45c61d598f435d59302dea084912cd3390de1ffc

There was 1 merge rejection:
./helgrind/tests/Makefile.am.rej
due to an extra filter I added

I get a few warnings

priv/guest_loongarch64_toIR.c:354:23: warning: unused function 'mkU16' [-Wunused-function]
1 warning generated.
priv/guest_loongarch64_helpers.c:470:26: warning: shift count >= width of type [-Wshift-count-overflow]
1 warning generated.
priv/guest_loongarch64_toIR.c:354:23: warning: unused function 'mkU16' [-Wunused-function]
1 warning generated.

You need to cleanup the new Makefile.am files

memcheck/tests/loongarch64-linux/Makefile.am:1: error: scalar.stderr.exp.orig is missing in EXTRA_DIST
memcheck/tests/loongarch64-linux/Makefile.am:1: error: filter_stderr.orig is missing in dist_noinst_SCRIPTS
memcheck/tests/Makefile.am:1: error: leak-segv-jmp.stderr.exp.orig is missing in EXTRA_DIST
helgrind/tests/Makefile.am:1: error: tls_threads_tunable.stderr.exp is missing in EXTRA_DIST
helgrind/tests/Makefile.am:1: error: tls_threads_tunable.stderr.exp.orig is missing in EXTRA_DIST
helgrind/tests/Makefile.am:1: error: tls_threads_tunable.vgtest is missing in EXTRA_DIST
massif/tests/Makefile.am:1: error: big-alloc.post.exp-loongarch64.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: atomic.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: branch.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: cpucfg.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault.stderr.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault_fp.stderr.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault_fp.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: float.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: integer.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: llsc.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: memory.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: move.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: pc.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: special.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: filter_stderr.orig is missing in dist_noinst_SCRIPTS
none/tests/loongarch64/Makefile.am:1: error: atomic.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: branch.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: cpucfg.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: float.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: integer.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: llsc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: memory.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: move.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: pc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: special.stderr.exp is in EXTRA_DIST but doesn't exist

I don't think that the changes and extra test for helgrind tls_threads are still necessary.

I get one regtest failure.

none/tests/libvexmultiarch_test 1 0 0

Gives me
vex: priv/host_loongarch64_isel.c:2659 (void iselNext(ISelEnv *, IRExpr *, IRJumpKind, Int)): Assertion `0' failed.
//// failure exit called by libVEX

I had a quick lock at the modified code, looks OK to me.

I haven't looked at the added files yet.
Comment 5 Feiyang Chen 2023-01-29 07:45:59 UTC
(In reply to Paul Floyd from comment #4)
> With a build based on 45c61d598f435d59302dea084912cd3390de1ffc
> 
> There was 1 merge rejection:
> ./helgrind/tests/Makefile.am.rej
> due to an extra filter I added
> 

Thank you for your review!

I will remove the changes and extra test for helgrind tls_threads.

> I get a few warnings
> 
> priv/guest_loongarch64_toIR.c:354:23: warning: unused function 'mkU16'
> [-Wunused-function]
> 1 warning generated.
> priv/guest_loongarch64_helpers.c:470:26: warning: shift count >= width of
> type [-Wshift-count-overflow]
> 1 warning generated.
> priv/guest_loongarch64_toIR.c:354:23: warning: unused function 'mkU16'
> [-Wunused-function]
> 1 warning generated.

I will fix these build warnings.

> You need to cleanup the new Makefile.am files
> 
> memcheck/tests/loongarch64-linux/Makefile.am:1: error:
> scalar.stderr.exp.orig is missing in EXTRA_DIST
> memcheck/tests/loongarch64-linux/Makefile.am:1: error: filter_stderr.orig is
> missing in dist_noinst_SCRIPTS
> memcheck/tests/Makefile.am:1: error: leak-segv-jmp.stderr.exp.orig is
> missing in EXTRA_DIST
> helgrind/tests/Makefile.am:1: error: tls_threads_tunable.stderr.exp is
> missing in EXTRA_DIST
> helgrind/tests/Makefile.am:1: error: tls_threads_tunable.stderr.exp.orig is
> missing in EXTRA_DIST
> helgrind/tests/Makefile.am:1: error: tls_threads_tunable.vgtest is missing
> in EXTRA_DIST
> massif/tests/Makefile.am:1: error: big-alloc.post.exp-loongarch64.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: atomic.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: branch.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: cpucfg.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: fault.stderr.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: fault.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: fault_fp.stderr.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: fault_fp.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: float.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: integer.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: llsc.stdout.exp.orig is missing
> in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: memory.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: move.stdout.exp.orig is missing
> in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: pc.stdout.exp.orig is missing
> in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: special.stdout.exp.orig is
> missing in EXTRA_DIST
> none/tests/loongarch64/Makefile.am:1: error: filter_stderr.orig is missing
> in dist_noinst_SCRIPTS
> none/tests/loongarch64/Makefile.am:1: error: atomic.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: branch.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: cpucfg.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: float.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: integer.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: llsc.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: memory.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: move.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: pc.stderr.exp is in EXTRA_DIST
> but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: special.stderr.exp is in
> EXTRA_DIST but doesn't exist
> 

I ran make regtest on both amd64-linux and loongarch64-linux, but neither of them reported the makefile consistency error. So I don't know how these errors are generated. Could you help me?

> I don't think that the changes and extra test for helgrind tls_threads are
> still necessary.
> 

I will remove them.

> I get one regtest failure.
> 
> none/tests/libvexmultiarch_test 1 0 0
> 
> Gives me
> vex: priv/host_loongarch64_isel.c:2659 (void iselNext(ISelEnv *, IRExpr *,
> IRJumpKind, Int)): Assertion `0' failed.
> //// failure exit called by libVEX
> 

It seems that I need to add Ijk_Call and Ijk_Ret support for loongarch64.

> I had a quick lock at the modified code, looks OK to me.
> 
> I haven't looked at the added files yet.
Comment 6 Paul Floyd 2023-01-29 08:34:49 UTC
(In reply to Feiyang Chen from comment #5)
> > You need to cleanup the new Makefile.am files
> > 
> > memcheck/tests/loongarch64-linux/Makefile.am:1: error: filter_stderr.orig is
> > missing in dist_noinst_SCRIPTS
> I ran make regtest on both amd64-linux and loongarch64-linux, but neither of
> them reported the makefile consistency error. So I don't know how these
> errors are generated. Could you help me?

Sorry, my fault, I didn't look carefully, a lot of them were warnings about the artifacts left over after merging the patches.

If I run  gmake post-regtest-checks then I get

helgrind/tests/Makefile.am:1: error: tls_threads_tunable.stdout.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: atomic.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: branch.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: cpucfg.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: float.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: integer.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: llsc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: memory.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: move.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: pc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: special.stderr.exp is in EXTRA_DIST but doesn't exist

The first one might be because I badly resolved merge issues.

I don't see any stderr.exp referred to in none/tests/loongarch64/Makefile.am
Comment 7 Feiyang Chen 2023-01-29 09:06:44 UTC
(In reply to Paul Floyd from comment #6)
> (In reply to Feiyang Chen from comment #5)
> > > You need to cleanup the new Makefile.am files
> > > 
> > > memcheck/tests/loongarch64-linux/Makefile.am:1: error: filter_stderr.orig is
> > > missing in dist_noinst_SCRIPTS
> > I ran make regtest on both amd64-linux and loongarch64-linux, but neither of
> > them reported the makefile consistency error. So I don't know how these
> > errors are generated. Could you help me?
> 
> Sorry, my fault, I didn't look carefully, a lot of them were warnings about
> the artifacts left over after merging the patches.
> 
> If I run  gmake post-regtest-checks then I get
> 
> helgrind/tests/Makefile.am:1: error: tls_threads_tunable.stdout.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: atomic.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: branch.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: cpucfg.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: float.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: integer.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: llsc.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: memory.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: move.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: pc.stderr.exp is in EXTRA_DIST
> but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: special.stderr.exp is in
> EXTRA_DIST but doesn't exist
> 
> The first one might be because I badly resolved merge issues.
> 
> I don't see any stderr.exp referred to in none/tests/loongarch64/Makefile.am

They are empty files and I can find them in my local tree.
I might have forgotten to add them.
Comment 8 Feiyang Chen 2023-01-29 09:07:23 UTC
Created attachment 155754 [details]
patches-v4

Rebased on a1f365150565e3dd69666ebac85bf535bbe194a1.

Fix build warnings.
Add Ijk_Call and Ijk_Ret support for LoongArch64, which fixes none/tests/libvexmultiarch_test.
Remove changes and extra test for helgrind tls_threads.
Comment 9 Feiyang Chen 2023-01-31 12:42:52 UTC
Now we can use QEMU 7.2 for testing:
https://github.com/loongson/valgrind-loongarch64/releases/tag/v3.21-GIT
Comment 10 Paul Floyd 2023-02-09 19:52:07 UTC
Testing on FreeBSD (13.1 amd64 with the system clang).

First off, no warnings. Just one for "make". There are a few from "make check" but I only just noticed them and I think they come from my own attempt to silence GCC (bug clang doesn't recognize them).

I still et quite a few EXTRA_DIST warnings:

memcheck/tests/Makefile.am:1: error: leak-segv-jmp.stderr.exp.orig is missing in EXTRA_DIST
memcheck/tests/loongarch64-linux/Makefile.am:1: error: scalar.stderr.exp.orig is missing in EXTRA_DIST
memcheck/tests/loongarch64-linux/Makefile.am:1: error: filter_stderr.orig is missing in dist_noinst_SCRIPTS
massif/tests/Makefile.am:1: error: big-alloc.post.exp-loongarch64.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: atomic.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: branch.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: cpucfg.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault.stderr.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault_fp.stderr.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: fault_fp.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: float.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: integer.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: llsc.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: memory.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: move.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: pc.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: special.stdout.exp.orig is missing in EXTRA_DIST
none/tests/loongarch64/Makefile.am:1: error: filter_stderr.orig is missing in dist_noinst_SCRIPTS
none/tests/loongarch64/Makefile.am:1: error: atomic.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: branch.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: cpucfg.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: float.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: integer.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: llsc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: memory.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: move.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: pc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: special.stderr.exp is in EXTRA_DIST but doesn't exist

EXTRA_DIST is for hidden dependencies that need to be included in the tarball for targets like dist-bzip2
Comment 11 Paul Floyd 2023-02-09 21:48:14 UTC
Same mistake as last time, didn't delete the merge artifacts.

paulf> gmake post-regtest-checks
tests/post_regtest_checks /usr/home/paulf/scratch/valgrind_ports/loongson_valgrind2 gdbserver_tests memcheck cachegrind callgrind helgrind drd massif dhat lackey none exp-bbv
...checking makefile consistency
none/tests/loongarch64/Makefile.am:1: error: atomic.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: branch.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: cpucfg.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: float.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: integer.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: llsc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: memory.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: move.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: pc.stderr.exp is in EXTRA_DIST but doesn't exist
none/tests/loongarch64/Makefile.am:1: error: special.stderr.exp is in EXTRA_DIST but doesn't exist
Comment 12 Feiyang Chen 2023-02-10 11:10:01 UTC
(In reply to Paul Floyd from comment #11)
> Same mistake as last time, didn't delete the merge artifacts.
> 
> paulf> gmake post-regtest-checks
> tests/post_regtest_checks
> /usr/home/paulf/scratch/valgrind_ports/loongson_valgrind2 gdbserver_tests
> memcheck cachegrind callgrind helgrind drd massif dhat lackey none exp-bbv
> ...checking makefile consistency
> none/tests/loongarch64/Makefile.am:1: error: atomic.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: branch.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: cpucfg.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: float.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: integer.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: llsc.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: memory.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: move.stderr.exp is in
> EXTRA_DIST but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: pc.stderr.exp is in EXTRA_DIST
> but doesn't exist
> none/tests/loongarch64/Makefile.am:1: error: special.stderr.exp is in
> EXTRA_DIST but doesn't exist

Most of these files were introduced by the v4-0104 patch.
I don't know why these empty files are missing :)
Or can I just remove them from my local tree and EXTRA_DIST?

Subject: [PATCH v4 104/123] loongarch64: Add dummy none tests

---
 .gitignore                                | 15 ++++++++++++++
 configure.ac                              |  1 +
 none/tests/Makefile.am                    |  9 +++++---
 none/tests/allexec_prepare_prereq         | 13 ++++++------
 none/tests/loongarch64/Makefile.am        | 25 +++++++++++++++++++++++
 none/tests/loongarch64/allexec.c          |  1 +
 none/tests/loongarch64/atomic.c           |  5 +++++
 none/tests/loongarch64/atomic.stderr.exp  |  0
 none/tests/loongarch64/atomic.stdout.exp  |  0
 none/tests/loongarch64/atomic.vgtest      |  2 ++
 none/tests/loongarch64/branch.c           |  5 +++++
 none/tests/loongarch64/branch.stderr.exp  |  0
 none/tests/loongarch64/branch.stdout.exp  |  0
 none/tests/loongarch64/branch.vgtest      |  2 ++
 none/tests/loongarch64/filter_stderr      |  3 +++
 none/tests/loongarch64/float.c            |  5 +++++
 none/tests/loongarch64/float.stderr.exp   |  0
 none/tests/loongarch64/float.stdout.exp   |  0
 none/tests/loongarch64/float.vgtest       |  2 ++
 none/tests/loongarch64/integer.c          |  5 +++++
 none/tests/loongarch64/integer.stderr.exp |  0
 none/tests/loongarch64/integer.stdout.exp |  0
 none/tests/loongarch64/integer.vgtest     |  2 ++
 none/tests/loongarch64/memory.c           |  5 +++++
 none/tests/loongarch64/memory.stderr.exp  |  0
 none/tests/loongarch64/memory.stdout.exp  |  0
 none/tests/loongarch64/memory.vgtest      |  2 ++
 27 files changed, 93 insertions(+), 9 deletions(-)
 create mode 100644 none/tests/loongarch64/Makefile.am
 create mode 120000 none/tests/loongarch64/allexec.c
 create mode 100644 none/tests/loongarch64/atomic.c
 create mode 100644 none/tests/loongarch64/atomic.stderr.exp
 create mode 100644 none/tests/loongarch64/atomic.stdout.exp
 create mode 100644 none/tests/loongarch64/atomic.vgtest
 create mode 100644 none/tests/loongarch64/branch.c
 create mode 100644 none/tests/loongarch64/branch.stderr.exp
 create mode 100644 none/tests/loongarch64/branch.stdout.exp
 create mode 100644 none/tests/loongarch64/branch.vgtest
 create mode 100755 none/tests/loongarch64/filter_stderr
 create mode 100644 none/tests/loongarch64/float.c
 create mode 100644 none/tests/loongarch64/float.stderr.exp
 create mode 100644 none/tests/loongarch64/float.stdout.exp
 create mode 100644 none/tests/loongarch64/float.vgtest
 create mode 100644 none/tests/loongarch64/integer.c
 create mode 100644 none/tests/loongarch64/integer.stderr.exp
 create mode 100644 none/tests/loongarch64/integer.stdout.exp
 create mode 100644 none/tests/loongarch64/integer.vgtest
 create mode 100644 none/tests/loongarch64/memory.c
 create mode 100644 none/tests/loongarch64/memory.stderr.exp
 create mode 100644 none/tests/loongarch64/memory.stdout.exp
 create mode 100644 none/tests/loongarch64/memory.vgtest
Comment 13 Paul Floyd 2023-02-10 11:53:20 UTC
(In reply to Feiyang Chen from comment #12)
> Most of these files were introduced by the v4-0104 patch.
> I don't know why these empty files are missing :)
> Or can I just remove them from my local tree and EXTRA_DIST?

Many of the testcases have a 0 sized expected, 500 or so of them. regtest still needs them to check that the output is also empty (no false positives).

I was using 'patch' for my testing. Maybe that's the problem. I'll try again with 'git apply'.
Comment 14 Mark Wielaard 2023-02-10 11:57:06 UTC
(In reply to Feiyang Chen from comment #12)
> Most of these files were introduced by the v4-0104 patch.
> I don't know why these empty files are missing :)
> Or can I just remove them from my local tree and EXTRA_DIST?

If the tests expect no output, then an empty .exp file is needed.
You can just git add them to the commit (it looks like you did for most, but not all new .exp files).
And they should all be listed under EXTRA_DIST.
Comment 15 Paul Floyd 2023-02-10 19:08:23 UTC
It was my fault.

for p in v4*.patch ; do git apply --allow-empty $p ; done       
- a few minor messages -
gmake post-regtest-checks
tests/post_regtest_checks /usr/home/paulf/scratch/valgrind_ports/loongson_valgrind gdbserver_tests memcheck cachegrind callgrind helgrind drd massif dhat lackey none exp-bbv
...checking makefile consistency
...checking header files and include directives

No warnings this time.
Comment 16 Feiyang Chen 2023-06-30 09:52:19 UTC
Created attachment 159998 [details]
patches-v5

Rebase on b4cc7815ba722426c5456831f858a2aeceb3761f and squash commits.
Comment 17 Feiyang Chen 2023-06-30 09:56:51 UTC
Test on Fedora 38:
https://mirrors.wsyu.edu.cn/fedora/linux/development/rawhide/Everything/loongarch64/iso/livecd-fedora-mate-4.loongarch64.iso

== 689 tests, 3 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
helgrind/tests/pth_mempcpy_false_races   (stderr)
drd/tests/pth_mutex_signal               (stderr)
none/tests/libvexmultiarch_test          (stderr)
Comment 18 Feiyang Chen 2024-01-06 08:46:10 UTC
Created attachment 164702 [details]
patches-v6

Changes:
- Rebased on 6c949b85762849c70b65db803eae547874edffa3.
- Add basic 128-bit/256-bit vector support.
- Squashed commits into 4 patches.

Test environment:
# uname -a
Linux fedora 6.6.0-0.rc4.20231005git3006adf3be79.36.fc38.loongarch64 #1 SMP PREEMPT Sun Oct  8 14:18:09 CST 2023 loongarch64 GNU/Linux
# ld --version
GNU ld version 2.41-5.fc38
# gcc --version
gcc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-2)
# ldd --version
ldd (GNU libc) 2.38.9000
# cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (MATE-Compiz Prerelease)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (MATE-Compiz Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
VARIANT="MATE-Compiz"
VARIANT_ID=matecompiz

Test results:
== 717 tests, 2 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
drd/tests/pth_mutex_signal               (stderr)
none/tests/libvexmultiarch_test          (stderr)
Comment 19 Feiyang Chen 2024-04-28 12:28:28 UTC
Created attachment 168969 [details]
patches-v7

Based on 42ec38caebf9024ed2f875f0eae5d6b801a9dd04.

== 728 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
helgrind/tests/getaddrinfo               (stderr)
drd/tests/getaddrinfo                    (stderr)
drd/tests/pth_mutex_signal               (stderr)
none/tests/libvexmultiarch_test          (stderr)
Comment 20 Feiyang Chen 2024-11-14 11:32:52 UTC
Created attachment 175810 [details]
patches-v8

Based on 1698bd8d62fa6d3c9cf4628e289bb7aafb858136.

== 750 tests, 2 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
drd/tests/pth_mutex_signal               (stderr)
none/tests/libvexmultiarch_test          (stderr)