cannon: Add more 64-bit tests #12839
Open
+825
−827
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add differential tests for 64-bit functionality. This modifies the
TestEVM...
andFuzzState...
tests in two ways:The latter approach is used for tests that have noticeable different behavior (usually due to full-word register ops and sign-extension). So most of the changes here is a refactor the existing test setups so they can be used by the cannon32 and cannon64 tests.
The tests suffixed with
32
run only oncannon32
builds. While tests suffixed with64
run only oncannon64
. The rest run on both 32/64-bit VMs.The complete list of tests updated can be found using
go test -tags=cannon64 -list=. ./mipsevm/tests/... | grep -E '(TestEVM|FuzzState)' | sort
:FuzzStateConsistencyMulOp
FuzzStateConsistencyMultOp
FuzzStateConsistencyMultuOp
FuzzStateHintRead
FuzzStateHintWrite
FuzzStatePreimageRead
FuzzStatePreimageWrite
FuzzStateSyscallBrk
FuzzStateSyscallCloneMT
FuzzStateSyscallExitGroup
FuzzStateSyscallFcntl
FuzzStateSyscallMmap
TestEVM_ClaimProgram
TestEVM_EmptyThreadStacks
TestEVM_EntryProgram
TestEVM_Fault
TestEVM_HelloProgram
TestEVM_MMap
TestEVM_MT64_LL
TestEVM_MT64_LLD
TestEVM_MT64_SC
TestEVM_MT64_SCD
TestEVM_MT_LL
TestEVM_MT_SC
TestEVM_MT_StoreOpsClearMemReservation32
TestEVM_MT_StoreOpsClearMemReservation64
TestEVM_MT_SysRead_Preimage32
TestEVM_MT_SysRead_Preimage64
TestEVM_NoopSyscall32
TestEVM_NoopSyscall64
TestEVM_NormalTraversalStep_HandleWaitingThread
TestEVM_NormalTraversal_Full
TestEVM_OpenMIPS
TestEVM_PopExitedThread
TestEVM_SchedQuantumThreshold
TestEVM_SingleStep_Bitwise32
TestEVM_SingleStep_Bitwise64
TestEVM_SingleStep_Branch32
TestEVM_SingleStep_Branch64
TestEVM_SingleStep_Jump
TestEVM_SingleStep_LoadStore32
TestEVM_SingleStep_LoadStore64
TestEVM_SingleStep_MfhiMflo
TestEVM_SingleStep_MovzMovn
TestEVM_SingleStep_MthiMtlo
TestEVM_SingleStep_MulDiv
TestEVM_SingleStep_MulDiv64
TestEVM_SingleStep_Operators
TestEVM_SingleStep_Operators64
TestEVM_SingleStep_Shift64
TestEVM_SysClockGettimeMonotonic
TestEVM_SysClockGettimeNonMonotonic
TestEVM_SysClockGettimeRealtime
TestEVM_SysClone_FlagHandling
TestEVM_SysClone_Successful
TestEVM_SysExit
TestEVM_SysFutex_UnsupportedOp
TestEVM_SysFutex_WaitPrivate
TestEVM_SysFutex_WakePrivate
TestEVM_SysGetPID
TestEVM_SysGetTID
TestEVM_SysNanosleep
TestEVM_SysOpen
TestEVM_SysWriteHint
TestEVM_SysYield
TestEVM_UnsupportedSyscall32
TestEVM_UnsupportedSyscall64
TestEVM_WakeupTraversalStep
TestEVM_WakeupTraversal_Full
TestEVM_WakeupTraversal_WithExitedThreads
Meta
Fixes #12598