diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2024-01-17 13:15:33 +0100 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2024-01-17 13:15:33 +0100 |
commit | ba976cb1b1a71b7c87c2003768d74db8c5afc3ff (patch) | |
tree | 315971393574d3798b422d6c56b565b3dd9b52da | |
parent | e51cfc2b93de245dd7a54d05445fd9eab6644a81 (diff) | |
download | fuzzer-ba976cb1b1a71b7c87c2003768d74db8c5afc3ff.tar.gz |
allow undo to Both, log current state to console
-rwxr-xr-x | rtt-module.js | 6 |
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)) |