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

fuzz: Refactor Fuzzers based on Go native fuzzing #723

Merged
merged 2 commits into from
Sep 10, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Sep 6, 2022

The existing fuzzers are converted into the Go native format. This
works well with most fuzzers, apart from the one that fuzzes the
controller.

That specific test depends on funcs and vars that are defined on
suite_test.go, which is not supported when building fuzzers leveraging
Go native fuzz for oss-fuzz. That test is therefore ignored when
executed with make fuzz-native. But, all tests are covered with
make fuzz-smoketest, in order to support oss-fuzz.

Once the controller is rewritten we can revist this and ensure that
fuzzers does not require envtest nor embedded CRDs.

Relates to fluxcd/flux2#2417.

@pjbgf pjbgf added the area/ci CI related issues and pull requests label Sep 6, 2022
Paulo Gomes added 2 commits September 7, 2022 12:26
The existing fuzzers are converted into the Go native format. This
works well with most fuzzers, apart from the one that fuzzes the
controller.

That specific test depends on funcs and vars that are defined on
suite_test.go, which is not supported when building fuzzers leveraging
Go native fuzz for oss-fuzz. That test is therefore ignored when
executed with make fuzz-native. But, all tests are covered with
make fuzz-smoketest, in order to support oss-fuzz.

Once the controller is rewritten we can revist this and ensure that
fuzzers does not require envtest nor embedded CRDs.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@pjbgf
Copy link
Member Author

pjbgf commented Sep 8, 2022

The build failure is orthogonal to the changes but did not have the time to get to the bottom of it:

=== CONT  TestKustomizationReconciler_DependsOn
    kustomization_dependson_test.go:185:
        Timed out after 30.001s.
        Expected
            <bool>: false
        to be true
=== CONT  TestKustomizationReconciler_DependsOn/reconciles_when_source_is_found
    testing.go:1336: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
--- FAIL: TestKustomizationReconciler_DependsOn (31.01s)
    --- PASS: TestKustomizationReconciler_DependsOn/fails_due_to_source_not_found (0.00s)
    --- FAIL: TestKustomizationReconciler_DependsOn/reconciles_when_source_is_found (30.00s)

Main is broken, although the same commit at the time worked.

@stefanprodan
Copy link
Member

It's due to using deprecated APIs in tests, HPA v2beta1 was removed from Kubernetes 1.25 and we're running the tests on latest stable. I've fixed it in main now.

@stefanprodan stefanprodan merged commit 9e0930c into fluxcd:main Sep 10, 2022
@pjbgf pjbgf deleted the native-fuzz branch September 28, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI related issues and pull requests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants