-
Notifications
You must be signed in to change notification settings - Fork 361
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
FuzzParseDN test was failed on GitHub Actions #472
Comments
Rarely, but I could reproduce it in my local environment. It's a concurrent race condition issue, I guess. |
The job is here. - name: Build and Validate
run: |
cd ${{ matrix.branch }}
go vet .
go test .
go test -cover -race -cpu 1,2,4 .
go build . |
I confirmed this CLI would fail.
|
I understood this configuration is module global variable and multiple goroutines access to the variable. In FuzzParseDN(), the variable changed, so it occurred DATA RACE. ber.MaxPacketLengthBytes = 65536 |
Fuzz test has two modes. So
|
There are different requirements for each test.
|
Setting a value before all tests by TestMain resolves it. func TestMain(m *testing.M) {
// For fuzz tests
// See https://github.com/go-asn1-ber/asn1-ber/blob/04301b4b1c5ff66221f8f8a394f814a9917d678a/fuzz_test.go#L33-L37
// for why this limitation is necessary
ber.MaxPacketLengthBytes = 65536
code := m.Run()
os.Exit(code)
} |
I don't know why v3 directory doesn't have |
… of changing ber's module global variable for fuzz tests go-ldap#472
Yes, we should make sure the v3 directory matches the root (until we develop a proper branch strategy) |
… of changing ber's module global variable for fuzz tests go-ldap#472 (go-ldap#473)
I encountered some failures with the result of a job on GitHub Actions.
I will investigate why this error happens on GitHub Actions.
The text was updated successfully, but these errors were encountered: