summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2024-01-17 13:15:33 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2024-01-17 13:15:33 +0100
commitba976cb1b1a71b7c87c2003768d74db8c5afc3ff (patch)
tree315971393574d3798b422d6c56b565b3dd9b52da
parente51cfc2b93de245dd7a54d05445fd9eab6644a81 (diff)
downloadfuzzer-ba976cb1b1a71b7c87c2003768d74db8c5afc3ff.tar.gz
allow undo to Both, log current state to console
-rwxr-xr-xrtt-module.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/rtt-module.js b/rtt-module.js
index 5fe60ba..6c35fd2 100755
--- a/rtt-module.js
+++ b/rtt-module.js
@@ -140,7 +140,7 @@ module.exports.fuzz = function(fuzzerInputData) {
}
if (action === "undo") {
- if (state.active !== active) {
+ if (state.active !== active && state.active !== "Both") {
log_crash(replay, state, view, step, active)
throw new UndoActiveError(`undo caused active to switch from ${active} to ${state.active}`)
}
@@ -160,9 +160,9 @@ function log_crash(replay, state, view, step, active, action=undefined, args=und
console.log("VIEW", view)
console.log("SETUP", replay[0].split("\t")[2])
if (action !== undefined) {
- console.log(`STEP=${step} ACTIVE=${active} ACTION: ${action} ` + JSON.stringify(args))
+ console.log(`STEP=${step} ACTIVE=${active} STATE=${state?.state} ACTION: ${action} ` + JSON.stringify(args))
} else {
- console.log(`STEP=${step} ACTIVE=${active}`)
+ console.log(`STEP=${step} ACTIVE=${active} STATE=${state?.state}`)
}
// console.log("STATE & REPLAY dumped to 'crash-state.json' and 'crash-replay.txt'")
fs.writeFileSync("crash-state.json", JSON.stringify(state))