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

Ignore testing.runFuzzing and testing.runFuzzTests #105

Merged
merged 1 commit into from Jun 28, 2023

Conversation

EstebanOlmedo
Copy link
Contributor

When Fuzz testing, if the -fuzz flag is used then the fuzzing engine is used to generate test cases out of the seed corpus, this causes testing.runFuzzTests to be blocked until a failing input is found or there is a signal to stop generating.
On the other hand testing.runFuzzTests is called even without the use of the -fuzz flag, executes the input testing with all the elements in the seed corpus and it's blocked until every test has run.

On both cases, goleak detects them as leaking goroutines, but this are expected goroutines.

Internal Ref: GO-2002
Fix #104

When Fuzz testing, if the `-fuzz` flag is used then the fuzzing engine
is used to generate test cases out of the seed corpus, this causes
`testing.runFuzzTests` to be blocked until a failing input is found or
there is a signal to stop generating.
On the other hand `testing.runFuzzTests` is called even without the use
of the `-fuzz` flag, executes the input testing with all the elements
in the seed corpus and it's blocked until every test has run.

On both cases, goleak detects them as leaking goroutines, but this are
expected goroutines.

Internal Ref: GO-2002
Fix uber-go#104
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #105 (06ae223) into master (4a14d38) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
+ Coverage   96.52%   96.58%   +0.05%     
==========================================
  Files           5        5              
  Lines         230      234       +4     
==========================================
+ Hits          222      226       +4     
  Misses          5        5              
  Partials        3        3              
Impacted Files Coverage Δ
options.go 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@r-hang r-hang merged commit 3e8744f into uber-go:master Jun 28, 2023
5 checks passed
@mway mway mentioned this pull request Oct 24, 2023
mway added a commit that referenced this pull request Oct 24, 2023
### Fixed
- Built-in ignores now match function names more accurately.
  They will no longer ignore stacks because of file names
  that look similar to function names. (#112)
### Added
- Add an `IgnoreAnyFunction` option to ignore stack traces
  that have the provided function anywhere in the stack. (#113)
- Ignore `testing.runFuzzing` and `testing.runFuzzTests` alongside
  other already-ignored test functions (`testing.RunTests`, etc). (#105)

### Changed
- Miscellaneous CI-related fixes. (#103, #108, #114)

---------

Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
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.

Is these function in testing package should be filtered in default?
3 participants