diff --git a/commands.md b/commands.md index 1ba2243..50abf24 100644 --- a/commands.md +++ b/commands.md @@ -231,7 +231,7 @@ $ solana-test-suite run-tests [OPTIONS] * `-v, --verbose`: Verbose output: log failed test cases * `-c, --consensus-mode`: Only fail on consensus failures. One such effect is to normalize error codes when comparing results * `-f, --failures-only`: Only log failed test cases -* `-sf, --save-failures`: Saves failed test cases to results directory [default: True] +* `-sf, --save-failures`: Saves failed test cases to results directory * `-ss, --save-successes`: Saves successful test cases to results directory * `-l, --log-level INTEGER`: FD logging level [default: 5] * `--help`: Show this message and exit. diff --git a/src/test_suite/fuzz_context.py b/src/test_suite/fuzz_context.py index f52fb99..cf2898f 100644 --- a/src/test_suite/fuzz_context.py +++ b/src/test_suite/fuzz_context.py @@ -31,6 +31,7 @@ SyscallHarness = HarnessCtx( fuzz_fn_name="sol_compat_vm_syscall_execute_v1", fixture_desc=vm_pb.SyscallFixture.DESCRIPTOR, + context_human_encode_fn=syscall_codec.encode_input, effects_human_encode_fn=syscall_codec.encode_output, ) diff --git a/src/test_suite/syscall/codec_utils.py b/src/test_suite/syscall/codec_utils.py index 8fd17e1..05e091d 100644 --- a/src/test_suite/syscall/codec_utils.py +++ b/src/test_suite/syscall/codec_utils.py @@ -1,6 +1,15 @@ import base64 +import test_suite.invoke_pb2 as invoke_pb import test_suite.vm_pb2 as vm_pb from test_suite.fuzz_interface import encode_hex_compact +from test_suite.instr.codec_utils import encode_input as instr_encode_input + + +def encode_input(input: vm_pb.SyscallContext): + instr_ctx = invoke_pb.InstrContext() + instr_ctx.CopyFrom(input.instr_ctx) + instr_encode_input(instr_ctx) + input.instr_ctx.CopyFrom(instr_ctx) def encode_output(effects: vm_pb.SyscallEffects): diff --git a/src/test_suite/test_suite.py b/src/test_suite/test_suite.py index d304e23..b8e8c98 100644 --- a/src/test_suite/test_suite.py +++ b/src/test_suite/test_suite.py @@ -361,7 +361,7 @@ def run_tests( help="Only log failed test cases", ), save_failures: bool = typer.Option( - True, + False, "--save-failures", "-sf", help="Saves failed test cases to results directory",