Skip to content

Commit

Permalink
vat-warehouse: include replay syscall results in slog
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
warner committed Apr 28, 2023
1 parent 7220e29 commit a089b9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/SwingSet/src/kernel/vat-warehouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -153,6 +154,7 @@ export function makeSyscallSimulator(
throw error;
}
syscallStatus.push('ok');
finish(undefined, expected.r);
return expected.r;
};

Expand Down

0 comments on commit a089b9d

Please sign in to comment.