You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LoongArch64: Track the progress of nativeaot test cases passing on LoongArch64. #104661
Currently, I've just tested the smoke tests of nativeaot, in runtime/src/tests/nativeaot/SmokeTests.
In smoke tests, linux-loongarch64 requires testing 15 test cases. And currently, 13 cases can be passed through.
The two failed tests are SmokeTests/DynamicGenerics/DynamicGenerics/native/DynamicGenerics and SmokeTests/UnitTests/UnitTests/native/UnitTests, each have a small test failure. ThreadLocalStatics.TLSTesting.ThreadLocalStatics_Test failed in DynamicGenerics and BasicThreading.Run failed in UnitTests. I think they maybe both related to TLS, but LoongArch64 currently lacks TLS support, and is working toward it.
Another issue is, while compiling smoke tests SharedLibrary, it will report errors like ld.lld : error : relocation R_LARCH_PCALA_LO12 cannot be used against symbol 'memmove'; recompile with -fPIC [/home/sunlijun/runtime/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj] [/home/sunlijun/runtime/src/tests/build.proj].
The reason why I didn't test coreclr tests and libraries tests is that it usually reports an unstable error like EXEC : error : One or more errors occurred. (Code generation failed for method '[S.P.CoreLib]System.Globalization.CalendricalCalculationsHelper.EquationOfTime(float64)') [/home/sunlijun/runtime_test/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux] while compiling the .o file using ilc-published/ilc. It's currently too unstable to test them. We are analyzing and trying to solve it.
Another issue is, while compiling smoke tests SharedLibrary, it will report errors like ld.lld : error : relocation R_LARCH_PCALA_LO12 cannot be used against symbol 'memmove'; recompile with -fPIC [/home/sunlijun/runtime/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj] [/home/sunlijun/runtime/src/tests/build.proj].
Another issue is, while compiling smoke tests SharedLibrary, it will report errors like ld.lld : error : relocation R_LARCH_PCALA_LO12 cannot be used against symbol 'memmove'; recompile with -fPIC [/home/sunlijun/runtime/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj] [/home/sunlijun/runtime/src/tests/build.proj].
No, it doesn't. CMAKE_POSITION_INDEPENDENT_CODE should have already been set up in eng/native/configureplatform.cmake, so it seems unralated to the error.
Thanks!
Great! You can open an issue in llvm repo with SharedLibrary's .o file attached; that bfd links the object while lld doesn't accept R_LARCH_PCALA_LO12. The default is bfd in production targets so it's not critical. When building the repo we use lld for everything unless otherwise specified.
The two failed tests are SmokeTests/DynamicGenerics/DynamicGenerics/native/DynamicGenerics and SmokeTests/UnitTests/UnitTests/native/UnitTests, each have a small test failure. ThreadLocalStatics.TLSTesting.ThreadLocalStatics_Test failed in DynamicGenerics and BasicThreading.Run failed in UnitTests. I think they maybe both related to TLS, but LoongArch64 currently lacks TLS support, and is working toward it.
The two failed tests are SmokeTests/DynamicGenerics/DynamicGenerics/native/DynamicGenerics and SmokeTests/UnitTests/UnitTests/native/UnitTests, each have a small test failure. ThreadLocalStatics.TLSTesting.ThreadLocalStatics_Test failed in DynamicGenerics and BasicThreading.Run failed in UnitTests. I think they maybe both related to TLS, but LoongArch64 currently lacks TLS support, and is working toward it.
No, they still cannot pass. More precisely, they have a very low probability of passing, possibly less than 20%. And they have many types of errors when they fail.
Activity
sunlijun-610 commentedon Jul 11, 2024
Currently, I've just tested the smoke tests of nativeaot, in
runtime/src/tests/nativeaot/SmokeTests.In smoke tests, linux-loongarch64 requires testing 15 test cases. And currently, 13 cases can be passed through.
The two failed tests are
SmokeTests/DynamicGenerics/DynamicGenerics/native/DynamicGenericsandSmokeTests/UnitTests/UnitTests/native/UnitTests, each have a small test failure.ThreadLocalStatics.TLSTesting.ThreadLocalStatics_Testfailed inDynamicGenericsandBasicThreading.Runfailed inUnitTests. I think they maybe both related to TLS, but LoongArch64 currently lacks TLS support, and is working toward it.Another issue is, while compiling smoke tests
SharedLibrary, it will report errors likeld.lld : error : relocation R_LARCH_PCALA_LO12 cannot be used against symbol 'memmove'; recompile with -fPIC [/home/sunlijun/runtime/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj] [/home/sunlijun/runtime/src/tests/build.proj].The reason why I didn't test coreclr tests and libraries tests is that it usually reports an unstable error like
EXEC : error : One or more errors occurred. (Code generation failed for method '[S.P.CoreLib]System.Globalization.CalendricalCalculationsHelper.EquationOfTime(float64)') [/home/sunlijun/runtime_test/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux]while compiling the.ofile usingilc-published/ilc. It's currently too unstable to test them. We are analyzing and trying to solve it.am11 commentedon Jul 11, 2024
Does this fix the error: am11@5d76762?
sunlijun-610 commentedon Jul 12, 2024
No, it doesn't.
CMAKE_POSITION_INDEPENDENT_CODEshould have already been set up ineng/native/configureplatform.cmake, so it seems unralated to the error.Thanks!
am11 commentedon Jul 12, 2024
Ah, it's included by
INC_PLATFORM_DIR. You can try setting<LinkerFlavor>bfd</LinkerFlavor>in that test project to see if it works. It might be the problem with lld's LA64 port. See similar reports https://github.com/search?q=repo%3Allvm%2Fllvm-project+%22cannot+be+used+against+symbol%22&type=issuessunlijun-610 commentedon Jul 12, 2024
Yes, you're right! I tried to use ld.bfd to link, and it was compiled and run successfully. Thanks a lot for your help!
am11 commentedon Jul 12, 2024
Great! You can open an issue in llvm repo with SharedLibrary's
.ofile attached; that bfd links the object whilellddoesn't acceptR_LARCH_PCALA_LO12. The default isbfdin production targets so it's not critical. When building the repo we uselldfor everything unless otherwise specified.am11 commentedon Aug 13, 2024
TLS is now supported #106254 (comment), they should be passing now?
sunlijun-610 commentedon Aug 13, 2024
No, they still cannot pass. More precisely, they have a very low probability of passing, possibly less than 20%. And they have many types of errors when they fail.
filipnavara commentedon Feb 20, 2025
Given the progress made on RISC-V NativeAOT port, can you retry running the
DynamicGenericstest withDOTNET_gcConservative=1environment variable?shushanhf commentedon Apr 15, 2025
This issue will be fixed by #114616 and #114618.