Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LoongArch64, RISC-V] Fix handling ThreadAbortException at the end of catch for LoongArch64 and RISC-V. #91531

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

LuckyXu-HF
Copy link
Contributor

@LuckyXu-HF LuckyXu-HF commented Sep 4, 2023

This PR is part of the issue #69705 to amend the LA's port.

Fix handling ThreadAbortException at the end of catch for LoongArch64 and RISC-V.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Sep 4, 2023
@LuckyXu-HF
Copy link
Contributor Author

LuckyXu-HF commented Sep 4, 2023

This PR mainly fixes System.Runtime.Tests.ControlledExecutionTests.CancelInTryAndExitCatchNormally in System.Runtime.Tests after #89781.
Based on this PR, The System.Runtime.Tests has all passed on LoongArch64:
Maybe RISC-V has the same problem.

Testing: @@@@@ home/xuliangyu/libs-8-tests/System.Runtime.Tests/Release/net8.0-unix @@@@@
  Discovering: System.Runtime.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Runtime.Tests (found 9232 of 9279 test cases)
  Starting:    System.Runtime.Tests (parallel test collections = on, max threads = 4)
    System.Tests.ArgIteratorTests.ArgIterator_GetNextArgType [SKIP]
      Condition(s) not met: "IsArgIteratorSupported"
    System.Tests.ArgIteratorTests.ArgIterator_GetRemainingCount_GetNextArg [SKIP]
      Condition(s) not met: "IsArgIteratorSupported"
    System.Tests.StringTests.IndexOf_SingleLetter(s: "Hello", target: '\0', startIndex: 0, count: 5, expected: -1) [SKIP]
      Target \0 is not supported in ICU
    System.Tests.StringTests.LastIndexOf_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.IndexOf_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.EndsWith_NullInStrings_NonOrdinal [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.StartsWith_NullInStrings_NonOrdinal [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.EndsWith_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.StartsWith_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Runtime.Tests.JitInfoTests.JitInfoIsNotPopulated [SKIP]
      Condition(s) not met: "IsMonoAOT"
    System.Tests.DateTimeOffsetTests.ToLocalTime_MinValue [SKIP]
      Condition(s) not met: "IsMinValueNegativeLocalOffset"
    System.Tests.DateTimeOffsetTests.ToLocalTime_Ambiguous [SKIP]
      Condition(s) not met: "IsPacificTime"
    System.Tests.TimeZoneInfoTests.UnsupportedImplicitConversionTest [SKIP]
      Condition(s) not met: "DoesNotSupportIanaNamesConversion"
  Finished:    System.Runtime.Tests
=== TEST EXECUTION SUMMARY ===
   System.Runtime.Tests  Total: 65391, Errors: 0, Failed: 0, Skipped: 13, Time: 42.992s

@LuckyXu-HF
Copy link
Contributor Author

cc @shushanhf ,Could you please review this PR?
Thanks

Copy link
Contributor

@shushanhf shushanhf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks

@shushanhf shushanhf added the arch-riscv Related to the RISC-V architecture label Sep 5, 2023
@LuckyXu-HF LuckyXu-HF changed the title [LoongArch64] Fix handling ThreadAbortException at the end of catch for LoongArch64. [LoongArch64, RISC-V] Fix handling ThreadAbortException at the end of catch for LoongArch64 and RISC-V. Sep 5, 2023
@shushanhf
Copy link
Contributor

cc @clamp03
Also add RISC-V64.

Copy link
Member

@clamp03 clamp03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!!!

cc @alpencolt @t-mustafin @gbalykov @tomeksowi

@shushanhf
Copy link
Contributor

@jkotas Could you please review this PR ?

Use RedirectForThreadAbort to call ThrowControlForThread directly.
Use RedirectForThreadAbort to call ThrowControlForThread directly.
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jkotas jkotas merged commit 68dd900 into dotnet:main Sep 7, 2023
105 of 109 checks passed
@LuckyXu-HF LuckyXu-HF deleted the main-LA64A branch September 7, 2023 06:29
@ghost ghost locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-loongarch64 arch-riscv Related to the RISC-V architecture area-VM-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants