報告の例外に呼び出し元のスタックを付ける処理を除く
このコミットが含まれているのは:
3ファイル変更
+1
-23
検索条件に一致するファイルはありません
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -359,12 +359,6 @@
|
||||
"find": " || failure == ComputeFailure.ResourceExhausted",
|
||||
"replace": ""
|
||||
},
|
||||
{
|
||||
"name": "呼び出し元のスタックを付けない",
|
||||
"file": "ComputeGuard/ComputeGuardian.cs",
|
||||
"find": "ExceptionDispatchInfo.SetCurrentStackTrace(anomaly);",
|
||||
"replace": ""
|
||||
},
|
||||
{
|
||||
"name": "固定の判定を逆にする",
|
||||
"file": "ComputeGuard/ComputeGuardian.cs",
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする