Add threadPool unit tests to fuzzer.c#2604
Merged
senhuang42 merged 1 commit intofacebook:devfrom May 7, 2021
Merged
Conversation
aca15e0 to
092e6dc
Compare
Cyan4973
reviewed
May 4, 2021
| int err; | ||
| } threadPoolTests_compressionJob_payload; | ||
|
|
||
| static void* threadPoolTests_compressionJob(void* payload) { |
Contributor
There was a problem hiding this comment.
tests/fuzzer.c:350:14: error: ‘threadPoolTests_compressionJob’ defined but not used [-Werror=unused-function]
350 | static void* threadPoolTests_compressionJob(void* payload) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
May need ZSTD_MULTITHREAD too.
4a2ecee to
7e0259e
Compare
terrelln
approved these changes
May 5, 2021
Cyan4973
reviewed
May 5, 2021
tests/fuzzer.c
Outdated
|
|
||
| if (nbTests < testNb) nbTests = testNb; | ||
|
|
||
| result = threadPoolTests(); |
Contributor
There was a problem hiding this comment.
This invocation of threadPoolTests() could be done inside basicUnitTests().
It would make it similar to other unit tests, which can be skipped on demand.
Author
There was a problem hiding this comment.
Sure, I've added it to the end of basicUnitTests().
7e0259e to
92e9078
Compare
Cyan4973
approved these changes
May 6, 2021
92e9078 to
1789c97
Compare
senhuang42
pushed a commit
to senhuang42/zstd
that referenced
this pull request
May 7, 2021
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
threadPoolAPI tests for basic functionality. We test pool re-use and simultaneous use (I think in practice these are pretty similar scenarios). It's gated behindZSTD_MULTITHREAD.We add a dependency to
fuzzer.cin order to give us access toZSTD_pthread_create/join, (whichpoolTests.calready includes too).