-
Notifications
You must be signed in to change notification settings - Fork 674
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 a test for pcre2 compatibility #11022
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I'm okay with not having this checked with mypy as the prce2 library doesn't support types.
I was able to get the test to fail by modifying a regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we need to add --no-use-pep517
to the Debian 10 pip install.
@Mab879 Where should I put this option? To pip command in .github/workflows/gate.yaml ? |
Yes |
it seems that pip on Debian doesn't know this option |
I think I found a work around: Add Use |
workaround doesn't work 😿 |
It seems that the Python package |
This test will ensure that the regular expressions used in OVAL checks are compatible with the pcre2 library. This will be important when OpenSCAP will move to use pcre2 internally. The test collects regular expressions used in SCAP source data streams and tries to compile these regular expressions using the code from pcre2 library. Unfortunately, a large amount of regular expressions used in our OVAL checks are composed dynamically using data collected during the scan from the evaluated system. These regular expressions won't be tested by this test that performs a static analysis. I think that possible problems with these expressions could be caught by Automatus test scenarios eventually. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=2128342
Code Climate has analyzed commit 40e2e79 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 53.3% (0.0% change). View more on Code Climate. |
I have made the test running only on the Fedora worker. I have rebased this PR on the top of the latest upstream master branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and the work to get the CI work!
This test will ensure that the regular expressions used in OVAL checks are compatible with the pcre2 library. This will be important when OpenSCAP will move to use pcre2 internally.
The test collects regular expressions used in SCAP source data streams and tries to compile these regular expressions using the code from pcre2 library.
Unfortunately, a large amount of regular expressions used in our OVAL checks are composed dynamically using data collected during the scan from the evaluated system. These regular expressions won't be tested by this test that performs a static analysis. I think that possible problems with these expressions could be caught by Automatus test scenarios eventually.
Related to: https://bugzilla.redhat.com/show_bug.cgi?id=2128342
Review Hints: