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

initial commit for enhancing fuzz tests #2745

Merged
merged 8 commits into from
Nov 28, 2023
Merged

Conversation

sepehrdaddev
Copy link
Member

@sepehrdaddev sepehrdaddev commented Nov 21, 2023

Adds multiple fuzz targets with new directory structure and makefile.

libfuzzer and sanitizer options mirror oss-fuzz.

Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
initialized = true
}

conn, err := net.Dial("tcp", "localhost:9090")
Copy link
Member

Choose a reason for hiding this comment

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

you might want to loop and test if you can Dial before, because there is no guarantee that skipper.Run was already executed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have added a retry mechanism as per your suggestion.

…erver

Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
}

conn, err := connect("localhost:9090")
conn, err := connect(address)
Copy link
Member

Choose a reason for hiding this comment

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

you need to do something like:

var (
    err error
    conn *tcp.Conn // out of my head so maybe other type
)
for i:=0; i<10; i++ {
    conn, err = connect(address)
    if err != nil {
        time.Sleep(100*time.Millisecond)
        continue
    } 
    break
}

Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
…s using func init will affect other fuzz targets.

Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
…rom oss-fuzz.

Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
… option to compile without sanitizers.

Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
@szuecs
Copy link
Member

szuecs commented Nov 27, 2023

👍

1 similar comment
@sepehrdaddev
Copy link
Member Author

👍

@sepehrdaddev
Copy link
Member Author

@szuecs I will create follow up PRs to add these fuzz targets to oss-fuzz and then another one to remove the old ones from eskip directory.

@sepehrdaddev sepehrdaddev merged commit 6460a2f into master Nov 28, 2023
7 checks passed
@sepehrdaddev sepehrdaddev deleted the enhance-fuzz-tests branch November 28, 2023 10:41
DavidKorczynski pushed a commit to google/oss-fuzz that referenced this pull request Nov 29, 2023
…11278)

adds more fuzz targets and also dictionaries to improve the coverage.

continuation of zalando/skipper#2745

Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com>
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.

2 participants