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

Adjustments to bug reports, enable collecting bug reports for all proofs #2047

Merged
merged 12 commits into from
Sep 7, 2023

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented Aug 25, 2023

Blocked on: #2034
Blocked on: runtimeverification/pyk#623
Blocked on: #2041

This makes some adjustments to how bug report generation in handled in KEVM:

  • The --bug-report PATH option is used from upstream, where you actually specify the path to dump the bug report. The path can contain directory structure, which will be created.
  • The various exec_* functions in __main__.py now accept the fully created BugReport, which is produced by the --bug-report PATH option, rather than just a bool.
  • This makes it possible to pass in a BugReport from the testing fixtures when calling these functions, so that you can do --bug-report --bug-report-dir SOME_DIR argument to pytest, and it will generate bug reports for all tests.

To generate bug reports for ALL proof tests, you can run:

make test-prove PYTEST_PARALLEL=12 PYTEST_ARGS='-vv --bug-report --bug-report-dir brs/prove'
make test-prove PYTEST_PARALLEL=12 PYTEST_ARGS='-vv --bug-report --bug-report-dir brs/prove-booster --use-booster'
make test-foundry-prove PYTEST_PARALLEL=12 PYTEST_ARGS='-vv --bug-report --bug-report-dir brs/foundry'
make test-foundry-prove PYTEST_PARALLEL=12 PYTEST_ARGS='-vv --bug-report --bug-report-dir brs/foundry-booster --use-booster'

This will produce a folder in KEVM at kevm-pyk/brs, with subdirectory structure:

  • kevm-pyk/brs/prove/test_pyk_prove: Bug reports of proofs run with RPC prover.
  • kevm-pyk/brs/prove/test_legacy_prove: Ignore.
  • kevm-pyk/brs/prove-booster/test_pyk_prove: Bug reports of proofs run with the RPC prover with the booster turned on.
  • kevm-pyk/brs/prove-booster/test_legacy_prove: Ignore.
  • kevm-pyk/brs/foundry/: Bug reports of Foundry proofs run with the RPC prover.
  • kevm-pyk/brs/foundry-booster/: Bug reports of Foundry proofs run with the RPC prover with the booster turned on.

@ehildenb ehildenb self-assigned this Aug 25, 2023
rv-jenkins added a commit to runtimeverification/pyk that referenced this pull request Sep 6, 2023
In runtimeverification/evm-semantics#2047, we
have a minor race condition when creating bug reports where one thread
will check if the directory to create the report in exists, see that it
doesn't and then create it. Meanwhile, another thread will already have
created the directory, so it the first thread will fail because now the
directory does exist. This allows for that case.

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
@ehildenb ehildenb marked this pull request as ready for review September 6, 2023 20:10
@ehildenb ehildenb requested review from nwatson22 and tothtamas28 and removed request for nwatson22 September 6, 2023 20:11
@ehildenb
Copy link
Member Author

ehildenb commented Sep 6, 2023

Note that this works as-is, but until runtimeverification/pyk#637 is merged into KEVM, this race condition will exist. Rerunning the tests usually fixes it, because on second run the directories already exist.

@rv-jenkins rv-jenkins merged commit 692a31c into master Sep 7, 2023
@rv-jenkins rv-jenkins deleted the bug-reports branch September 7, 2023 19:02
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
In runtimeverification/evm-semantics#2047, we
have a minor race condition when creating bug reports where one thread
will check if the directory to create the report in exists, see that it
doesn't and then create it. Meanwhile, another thread will already have
created the directory, so it the first thread will fail because now the
directory does exist. This allows for that case.

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
…tion/pyk#637)

In runtimeverification/evm-semantics#2047, we
have a minor race condition when creating bug reports where one thread
will check if the directory to create the report in exists, see that it
doesn't and then create it. Meanwhile, another thread will already have
created the directory, so it the first thread will fail because now the
directory does exist. This allows for that case.

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
…tion/pyk#637)

In runtimeverification/evm-semantics#2047, we
have a minor race condition when creating bug reports where one thread
will check if the directory to create the report in exists, see that it
doesn't and then create it. Meanwhile, another thread will already have
created the directory, so it the first thread will fail because now the
directory does exist. This allows for that case.

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
…tion/pyk#637)

In runtimeverification/evm-semantics#2047, we
have a minor race condition when creating bug reports where one thread
will check if the directory to create the report in exists, see that it
doesn't and then create it. Meanwhile, another thread will already have
created the directory, so it the first thread will fail because now the
directory does exist. This allows for that case.

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
…tion/pyk#637)

In runtimeverification/evm-semantics#2047, we
have a minor race condition when creating bug reports where one thread
will check if the directory to create the report in exists, see that it
doesn't and then create it. Meanwhile, another thread will already have
created the directory, so it the first thread will fail because now the
directory does exist. This allows for that case.

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants