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

Add comprehensive unit tests for LFVM's interpreter #684

Open
9 tasks done
HerbertJordan opened this issue Aug 26, 2024 · 0 comments
Open
9 tasks done

Add comprehensive unit tests for LFVM's interpreter #684

HerbertJordan opened this issue Aug 26, 2024 · 0 comments
Assignees

Comments

@HerbertJordan
Copy link
Collaborator

HerbertJordan commented Aug 26, 2024

This issue is closely related to #751
Refined responsibilities for the interpreter tests are:

  • different configurations (normal mode, step-wise, statistics, logging), evaluate the following:

    • TestRunWithLogging
    • TestRunBasic -> TestInterpreter_Vanilla_RunsWithoutOutput
  • Stop conditions: end of code, stopping codes, error triggered

    • TestRunReturnsEmptyResultOnEmptyCode rewrite to test reaching end of code (and case for empty code)
  • stack bounds violations

    • TestInterpreter_step_DetectsLowerStackLimitViolation
    • TestInterpreter_step_DetectsUpperStackLimitViolation
  • static gas costs

    • TestContext_useGas_HandlesTerminationIfOutOfGas use gas handles no termination any more
    • TestStepsFailsOnTooLittleGas rewrite to tests static gas costs.
    • TestInstructionsGasConsumption move to instructions tests
  • Detects non-executable code

    • TestStepsDetectsNonExecutableCode
  • error/state propagation

Add/check unit tests for context utilities:

  • useGas
  • stack limits check
  • getOutput
  • generateResult

Responsibilities which are to be handled in #751 (therefore not in interpreter tests):

  • minimum required revision
  • static-mode violations
  • jumps are correctly processed (JUMPDEST)
  • context calls are issued

Tests to be migrated to instruction tests:

  • TestStepsProperlyHandlesJUMP_TO
  • TestStepsDoesNotExecuteCodeIfStatic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants