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

disasm-test: Overhaul treatment of LLVM version ranges #220

Merged
merged 8 commits into from
May 3, 2023

Conversation

RyanGlScott
Copy link
Contributor

@RyanGlScott RyanGlScott commented Apr 24, 2023

This is a minor rewrite of the logic used to check for LLVM version ranges in disasm-llvm test cases. The new approach is similar to Case 3/3a from this tasty-sugar document:
https://github.com/kquick/tasty-sugar/blob/1fc06bee124e02f49f6478bc1e1df13704cc4916/Ranges.org#case-3---explicit-and-a-weaker-match

In particular:

  • We have adopted the convention that the test output for the most recent version of LLVM is always contained in a bare .ll file.
  • There are no longer any at-least-llvm* files, just pre-llvm*. This greatly simplifies the number of cases to consider and the number of checks to implement.
  • We now skip test configurations by having SKIP_TEST as the first line of the .ll file. Again, this greatly simplifies the logic needed to skip test cases on certain configurations.

This is heavily inspired by a similar change made in GaloisInc/crucible#1083.

This is a minor rewrite of the logic used to check for LLVM version ranges in
`disasm-llvm` test cases. The new approach is similar to Case 3/3a from this
`tasty-sugar` document:
https://github.com/kquick/tasty-sugar/blob/1fc06bee124e02f49f6478bc1e1df13704cc4916/Ranges.org#case-3---explicit-and-a-weaker-match

In particular:

* We have adopted the convention that the test output for the most recent
  version of LLVM is always contained in a bare `.ll` file.
* There are no longer any `at-least-llvm*` files, just `pre-llvm*`. This
  greatly simplifies the number of cases to consider and the number of checks
  to implement.
* We now skip test configurations by having `SKIP_TEST` as the first line of the
  `.ll` file. Again, this greatly simplifies the logic needed to skip test
  cases on certain configurations.

This is heavily inspired by a similar change made in GaloisInc/crucible#1083.
@RyanGlScott RyanGlScott requested a review from kquick April 24, 2023 13:42
@RyanGlScott RyanGlScott marked this pull request as ready for review May 3, 2023 15:31
@RyanGlScott
Copy link
Contributor Author

The CI failure is due to fosskers/versions#65. I'll restrict the upper version bounds on versions accordingly.

@RyanGlScott RyanGlScott merged commit 4c857a8 into master May 3, 2023
@RyanGlScott RyanGlScott deleted the tasty-sugar-revamp branch May 3, 2023 16:55
@@ -135,7 +135,7 @@ Test-suite disasm-test
tasty-hunit,
tasty-sugar >= 2.2 && < 2.3,
text,
versions,
versions < 6,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to undo this, as I've just released 6.0.1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @fosskers!

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

Successfully merging this pull request may close these issues.

3 participants