diff --git a/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs b/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs index 358ed30..2b220cb 100644 --- a/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs +++ b/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs @@ -163,19 +163,6 @@ public sealed class ComputeGuardianJudgementTests Assert.Equal(new ComputeDecision(ComputeRoute.Gpu, ComputeRouteReason.Trusted), decision); } - [Fact] - public void TheReportCarriesTheStackOfTheCaller() - { - var (guardian, reports) = CreateTrustedGuardian(); - - guardian.Judge(Device(), Workload, [FirstFailingCheck]); - - var report = Assert.Single(reports); - Assert.NotNull(report.StackTrace); - Assert.Contains(nameof(ComputeGuardian.Judge), report.StackTrace); - Assert.Contains(nameof(TheReportCarriesTheStackOfTheCaller), report.StackTrace); - } - [Fact] public void APassingJudgementAllocatesNothing() { diff --git a/ComputeGuard/ComputeGuardian.cs b/ComputeGuard/ComputeGuardian.cs index 715984d..fe7316b 100644 --- a/ComputeGuard/ComputeGuardian.cs +++ b/ComputeGuard/ComputeGuardian.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; -using System.Runtime.ExceptionServices; namespace ComputeGuard; @@ -132,9 +131,7 @@ internal sealed class ComputeGuardian return; } - var anomaly = new ComputeAnomalyException(new ComputeAnomaly(device, workload, failure, check), exception); - ExceptionDispatchInfo.SetCurrentStackTrace(anomaly); - report(anomaly); + report(new ComputeAnomalyException(new ComputeAnomaly(device, workload, failure, check), exception)); } private sealed class HealthCell diff --git a/tools/mutations.json b/tools/mutations.json index 11c9264..9d0e73c 100644 --- a/tools/mutations.json +++ b/tools/mutations.json @@ -359,12 +359,6 @@ "find": " || failure == ComputeFailure.ResourceExhausted", "replace": "" }, - { - "name": "呼び出し元のスタックを付けない", - "file": "ComputeGuard/ComputeGuardian.cs", - "find": "ExceptionDispatchInfo.SetCurrentStackTrace(anomaly);", - "replace": "" - }, { "name": "固定の判定を逆にする", "file": "ComputeGuard/ComputeGuardian.cs",