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

chore: use unique tempdir prefixes in fuzzing temp dirs (fixes: #3960) #4022

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

ranjanmangla1
Copy link
Contributor

@ranjanmangla1 ranjanmangla1 commented Apr 11, 2024

fixes #3960
I have used the following nomenclature for temp dir: cve-bin-tool-FUZZ_<UTILITY / USED FOR>

@ranjanmangla1 ranjanmangla1 force-pushed the chore-uniq-tempdir-prefixes branch from 7bb57d5 to 00821cf Compare April 12, 2024 17:15
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

This is looking pretty good. Can you remove the changes to the files in fuzz/generated/* ? We don't really want to change those.

@ranjanmangla1
Copy link
Contributor Author

@terriko Thanks, the changes in fuzz/generated/* are due to the linter. If you still want them to the original state, I can fix it!

@terriko
Copy link
Contributor

terriko commented Apr 16, 2024

Yes, original state please! The linter as we have it configured in pre-commit should ignore anything in that directory; if that's not working then we should fix that separately.

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.44%. Comparing base (d6cbe40) to head (e7f2496).
Report is 185 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4022      +/-   ##
==========================================
+ Coverage   75.41%   75.44%   +0.03%     
==========================================
  Files         808      822      +14     
  Lines       11983    12699     +716     
  Branches     1598     1734     +136     
==========================================
+ Hits         9037     9581     +544     
- Misses       2593     2752     +159     
- Partials      353      366      +13     
Flag Coverage Δ
longtests 75.44% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: ranjanmangla1 <ranjanmangla1@gmail.com>
@ranjanmangla1 ranjanmangla1 force-pushed the chore-uniq-tempdir-prefixes branch from d9bcd01 to 2c261d7 Compare April 17, 2024 11:27
@ranjanmangla1
Copy link
Contributor Author

@terriko Please review, I have fixed it!

@terriko terriko changed the title chore : use unique tempdir prefixes in fuzzing temp dirs (fixes: #3960) chore: use unique tempdir prefixes in fuzzing temp dirs (fixes: #3960) Apr 18, 2024
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Looks like there's still a few generated files in here that need to be removed:

  • fuzz/generated/cargo_lock_pb2.py
  • fuzz/generated/composer_lock_pb2.py
  • fuzz/generated/pom_xml_pb2.py

@ranjanmangla1
Copy link
Contributor Author

ranjanmangla1 commented Apr 18, 2024

Actually, I had changed the generated files to the latest remote ones. In diff checker, you can verify:
image
, they are exactly the same as previous ones. Don't know, why it is showing them to be modified

@ranjanmangla1 ranjanmangla1 requested a review from terriko April 18, 2024 19:24
@terriko
Copy link
Contributor

terriko commented Apr 19, 2024

The diff checker is explaining why: there's a difference in the final carriage return/line feed/new line on them.

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

You may need to use git checkout origin/main filename and then git add those again to fix them to be exactly what main has.

@joydeep049
Copy link
Contributor

Hello @ranjanmangla1 , as @terriko said, you should remove all the changes to the generated pb2 files as we would not wanna touch them at this point.
Also, if you're interested, the generated pb2 files had only one small pyupgrade linter change where they used = instead of is which is more of a python 3.11 way of doing stuff.

Signed-off-by: ranjanmangla1 <ranjanmangla1@gmail.com>
@ranjanmangla1
Copy link
Contributor Author

@terriko @joydeep049 I have fixed it. Thank you for your patience @terriko and sorry for bothering you for a silly mistake by me in this pr.

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

All good now! Thanks for iterating on this @ranjanmangla1 ; I know generated files and non-obvious whitespace changes at the end of file can both be dreadful traps in git, so hurray for finally managing to evade them all!

@terriko terriko merged commit 15638f1 into intel:main Apr 24, 2024
22 checks passed
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.

chore: use unique tempdir prefixes in fuzzing temp dirs
4 participants