From a089b9de645fde6830c65a7ce2d168320ba1a291 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 28 Apr 2023 12:08:12 -0700 Subject: [PATCH] vat-warehouse: include replay syscall results in slog The results are coming directly from the transcript, so this isn't recording anything new, but it's recording it in the most useful place, and this allows the analysis tools to expect consistently-matched syscall/syscall-result pairs. --- packages/SwingSet/src/kernel/vat-warehouse.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SwingSet/src/kernel/vat-warehouse.js b/packages/SwingSet/src/kernel/vat-warehouse.js index 73a490fe7be..eeec27ca632 100644 --- a/packages/SwingSet/src/kernel/vat-warehouse.js +++ b/packages/SwingSet/src/kernel/vat-warehouse.js @@ -137,7 +137,8 @@ export function makeSyscallSimulator( }; const syscallHandler = vso => { - kernelSlog.syscall(vatID, undefined, vso); // TODO: finish()? + // slog entries have no kernel-translated kso/ksr + const finish = kernelSlog.syscall(vatID, undefined, vso); const expected = syscallsExpected[syscallsMade.length]; syscallsMade.push(vso); if (!expected) { @@ -153,6 +154,7 @@ export function makeSyscallSimulator( throw error; } syscallStatus.push('ok'); + finish(undefined, expected.r); return expected.r; };