Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][Compiler-v2] test mode check does not work when running integration tests in move-vm #13345

Closed
rahxephon89 opened this issue May 20, 2024 · 0 comments · Fixed by #13346
Closed
Assignees
Labels
bug Something isn't working compiler-v2 stale-exempt Prevents issues from being automatically marked and closed as stale

Comments

@rahxephon89
Copy link
Contributor

rahxephon89 commented May 20, 2024

🐛 Bug

When running the following command cargo test -p move-vm-integration-tests --lib, the following error is raised:

---- tests::binary_format_version::test_run_script_with_custom_max_binary_format_version stdout ----
thread 'tests::binary_format_version::test_run_script_with_custom_max_binary_format_version' panicked at third_party/move/move-vm/integration-tests/src/tests/binary_format_version.rs:117:10:
called `Result::unwrap()` on an `Err` value: VMError { major_status: CODE_DESERIALIZATION_ERROR, sub_status: None, message: Some("[VM] deserializer for script returned error: PartialVMError { major_status: UNKNOWN_VERSION, sub_status: None, message: Some(\"bytecode version 7 only allowed in test code\"), exec_state: None, indices: [], offsets: [] }"), exec_state: None, location: Script, indices: [], offsets: [] }

The reason is that the check whether the code is being run in test mode here thinks the code is run in the normal mode even if it is triggered in a unit test.

@rahxephon89 rahxephon89 added bug Something isn't working compiler-v2 labels May 20, 2024
@rahxephon89 rahxephon89 changed the title [Bug][Compiler-v2] test mode check when creating VersionedBinary does not work [Bug][Compiler-v2] test mode check does not work when running transactional tests in move-vm May 20, 2024
@sausagee sausagee added the stale-exempt Prevents issues from being automatically marked and closed as stale label May 20, 2024
@rahxephon89 rahxephon89 changed the title [Bug][Compiler-v2] test mode check does not work when running transactional tests in move-vm [Bug][Compiler-v2] test mode check does not work when running integration tests in move-vm May 20, 2024
@rahxephon89 rahxephon89 self-assigned this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler-v2 stale-exempt Prevents issues from being automatically marked and closed as stale
Projects
Status: Done
2 participants