llvm-test-suite
llvm-test-suite copied to clipboard
Port gcc-dg tests from GCC
This was copied from a snapshot of gcc at 0c37fef39fa. The allowlist was tested using glibc and qemu on riscv. Would appreciate any help regarding copyrights, what notices should be included
Cool, I am going to test it in our downstream.
In the main
branch, lit
has 2437 test cases. However, in your branch, lit
is missing 1503 test cases.
Why not keep these tests out-of-tree like SPEC benchmarks? I think they are licensed under GPL.
Why not keep these tests out-of-tree like SPEC benchmarks? I think they are licensed under GPL.
The test suite already has a variety of different licenses, including GPL. I think it's convenient to have the sources in-tree when the license allows it. Are there any other tests that are kept out of tree that are open source?
Build failed on my end, please consider add the following
Fixed. The error flags where supposed to be excluded by regex
In the
main
branch,lit
has 2437 test cases. However, in your branch,lit
is missing 1503 test cases.
Do you mean gcc main? This PR only added the tests directly in gcc.dg without the subdirectories. If you mean the main of this repo, this PR only adds tests. It doesn't remove.
Do you mean gcc main? This PR only added the tests directly in gcc.dg without the subdirectories. If you mean the main of this repo, this PR only adds tests. It doesn't remove.
No. I meant llvm-test-suite.
Your patch causes the entire test suite to lose many test cases. Another thing I noticed is that your newly added tests don't even start. You can check the test.log
for more details.
The test result of llvm-test-suite main
********************
Failed Tests (2):
test-suite :: SingleSource/UnitTests/X86/x86-dyn_stack_alloc_realign.test
test-suite :: SingleSource/UnitTests/X86/x86-dyn_stack_alloc_realign2.test
Testing Time: 152.57s
Passed: 2509
Failed: 2
On your branch
********************
Failed Tests (2):
test-suite :: SingleSource/UnitTests/X86/x86-dyn_stack_alloc_realign.test
test-suite :: SingleSource/UnitTests/X86/x86-dyn_stack_alloc_realign2.test
Testing Time: 151.32s
Passed: 948
Failed: 2
Your patch causes the entire test suite to lose many test cases.
Oh that was probably because my branch wasn't rebased to latest master. I did now
Another thing I noticed is that your newly added tests don't even start
It wasn't included by default. Had to be included explcitly with -DTEST_SUITE_SUBDIRS. Now changed to include by default.
Gentle ping for this
I'm getting the following error on x86 clang 17.0.4
FAILED: SingleSource/Regression/C/gcc-dg/GCC-DG_atomic-compare-exchange-5
: && /home/jzhangjian/scratch/llvm-test-suite/build/tools/timeit --summary SingleSource/Regression/C/gcc-dg/GCC-DG_atomic-compare-exchange-5.link.time /sifive/tools/clang/17.0.4/bin/clang -O3 SingleSource/Regression/C/gcc-dg/CMakeFiles/GCC-DG_atomic-compare-exchange-5.dir/atomic-compare-exchange-5.c.o -o SingleSource/Regression/C/gcc-dg/GCC-DG_atomic-compare-exchange-5 && cd /home/jzhangjian/scratch/llvm-test-suite/build/SingleSource/Regression/C/gcc-dg && /sifive/tools/clang/17.0.4/bin/llvm-size --format=sysv /home/jzhangjian/scratch/llvm-test-suite/build/SingleSource/Regression/C/gcc-dg/GCC-DG_atomic-compare-exchange-5 > /home/jzhangjian/scratch/llvm-test-suite/build/SingleSource/Regression/C/gcc-dg/GCC-DG_atomic-compare-exchange-5.size
SingleSource/Regression/C/gcc-dg/CMakeFiles/GCC-DG_atomic-compare-exchange-5.dir/atomic-compare-exchange-5.c.o: In function `main':
atomic-compare-exchange-5.c:(.text+0x31): undefined reference to `__atomic_compare_exchange'
atomic-compare-exchange-5.c:(.text+0x7d): undefined reference to `__atomic_compare_exchange'
atomic-compare-exchange-5.c:(.text+0xd7): undefined reference to `__atomic_compare_exchange'
atomic-compare-exchange-5.c:(.text+0x149): undefined reference to `__atomic_compare_exchange'
atomic-compare-exchange-5.c:(.text+0x199): undefined reference to `__atomic_compare_exchange'
SingleSource/Regression/C/gcc-dg/CMakeFiles/GCC-DG_atomic-compare-exchange-5.dir/atomic-compare-exchange-5.c.o:atomic-compare-exchange-5.c:(.text+0x205): more undefined references to `__atomic_compare_exchange' follow
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
I suppose that we need -latomic
linker flag to fix this.
Hi all, I've picked up and continued Mohammed's work in a new MR here - I hope this is the appropriate workflow, please let me know if I should do this differently.