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

Prevent regressions #1243

Merged
merged 2 commits into from
Nov 25, 2023
Merged

Prevent regressions #1243

merged 2 commits into from
Nov 25, 2023

Conversation

sashashura
Copy link
Contributor

No description provided.

@sashashura sashashura force-pushed the regr branch 4 times, most recently from 11289d2 to 359beb2 Compare November 18, 2023 23:33
Copy link

codecov bot commented Nov 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8f26f95) 82.72% compared to head (02f2c6b) 82.71%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1243      +/-   ##
==========================================
- Coverage   82.72%   82.71%   -0.01%     
==========================================
  Files         159      159              
  Lines       20404    20404              
  Branches     7711     7711              
==========================================
- Hits        16879    16878       -1     
- Misses       2903     2914      +11     
+ Partials      622      612      -10     
Flag Coverage Δ
alpine317 72.31% <ø> (ø)
centos7 74.41% <ø> (ø)
fedora37 72.32% <ø> (ø)
macos-11 61.28% <ø> (ø)
macos-12 61.33% <ø> (-0.02%) ⬇️
macos-ventura 61.31% <ø> (ø)
mingw32 70.20% <ø> (-0.02%) ⬇️
mingw64 70.22% <ø> (+<0.01%) ⬆️
npcap 83.24% <ø> (-0.05%) ⬇️
ubuntu1804 74.88% <ø> (+0.03%) ⬆️
ubuntu2004 73.09% <ø> (ø)
ubuntu2204 72.16% <ø> (ø)
ubuntu2204-icpx 59.24% <ø> (+0.03%) ⬆️
unittest 82.71% <ø> (-0.01%) ⬇️
windows-2019 83.28% <ø> (-0.02%) ⬇️
windows-2022 83.27% <ø> (-0.03%) ⬇️
winpcap 83.24% <ø> (-0.03%) ⬇️
xdp ∅ <ø> (∅)
zstd 73.70% <ø> (ø)

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.

@sashashura sashashura force-pushed the regr branch 6 times, most recently from 451cb4f to 5e8b8ad Compare November 19, 2023 01:10
@sashashura
Copy link
Contributor Author

sashashura commented Nov 19, 2023

This pr uncomments memory sanitizer regressions tests and adds a quick fuzzing tests. I see you had concerns in the past that that CIFuzz may give alerts not related to the pr and make for people harder to contribute. However it is written in the documentation:
If CIFuzz doesn’t find a crash during the allotted time, the CI test passes (green check). If CIFuzz finds a crash, it reports the crash only if both of following are true:

  • The crash is reproducible (on the PR/commit build).
  • The crash does not occur on older OSS-Fuzz builds. (If the crash does occur on older builds, then it was not introduced by the PR/commit being tested.)

So if it is something that can be reproduced with the old build it won't fail.

@sashashura sashashura marked this pull request as ready for review November 19, 2023 01:28
@sashashura sashashura requested a review from seladb as a code owner November 19, 2023 01:28
@seladb
Copy link
Owner

seladb commented Nov 22, 2023

This pr uncomments memory sanitizer regressions tests and adds a quick fuzzing tests. I see you had concerns in the past that that CIFuzz may give alerts not related to the pr and make for people harder to contribute. However it is written in the documentation: If CIFuzz doesn’t find a crash during the allotted time, the CI test passes (green check). If CIFuzz finds a crash, it reports the crash only if both of following are true:

* The crash is reproducible (on the PR/commit build).

* The crash does not occur on older OSS-Fuzz builds. (If the crash does occur on older builds, then it was not introduced by the PR/commit being tested.)

So if it is something that can be reproduced with the old build it won't fail.

What does an "older build" mean? I'd expect that CIFuzz will try to reproduce the crash on the branch the PR will be merged to (in our case - it's dev most of the time). Is that the case?

@sashashura
Copy link
Contributor Author

sashashura commented Nov 22, 2023 via email

@seladb
Copy link
Owner

seladb commented Nov 22, 2023

I guess so. Is there anything wrong about it? It is quite effective strategy - even if the crash wasn't known before, just rerun the single reproducer case. If it reliably crashes with the target branch, then it wasn't introduced with the pr and there is no need to fail the check.

I'd like to make sure that if the CIFuzz run fails it's only because of something related to the changes in the PR. The only way to verify is to run the same scenario on the branch the PR will be merged to and make sure it doesn't crash. Is there any way to make sure?

What I'd like to avoid is a scenario where CIFuzz discovered a crash in a certain PR that is also reproducible in dev, which means the crash is not related to the changes in that PR. This will make the contributor frustrated because the PR cannot be merged due to things not related to their changes

@clementperon
Copy link
Collaborator

@selab they are lot of projects using CiFuzz and not small ones.

I would say let's try it and if this kind of issue happens we can always disable it.

My understanding is that in case of new fuzzing discovery they redo the test with the previous commit just to be sure it's not an improvement of the fuzzing engine.

- name: Compile fuzzer
run: |
export FUZZING_LANGUAGE=c
export ARCHITECTURE=x86_64
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick but I'm not fan of using environment variable to pass value to a script.

I prefer to properly pass it as parameters, so we can properly check the input, have default and explain what we want.

But not a big deal as it's only for CI and not related to this MR

@sashashura
Copy link
Contributor Author

The only way to verify is to run the same scenario on the branch the PR will be merged

It seems this is how it already works.
I agree with Clement - let's try it and see. We can always disable it.

Copy link
Owner

@seladb seladb left a comment

Choose a reason for hiding this comment

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

Ok, let's go for it!

@seladb seladb merged commit 8d04e18 into seladb:dev Nov 25, 2023
39 checks passed
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