Azure / go-amqp

AMQP 1.0 client library for Go.
https://github.com/Azure/go-amqp
MIT License
109 stars 59 forks source link

Investigate fuzz tests #53

Open jhendrixMSFT opened 3 years ago

jhendrixMSFT commented 3 years ago

The idea is sound, but it's not clear if invalid input actually triggers any test failures.

jhendrixMSFT commented 3 years ago

Also of interest is the TEST_CORPUS environment var to run a few additional tests. This should be removed as part of the fuzz testing clean-up.

jhendrixMSFT commented 1 month ago

There also appears to be a race someplace that only manifests on Windows. When I run the corpus tests I sometimes see the following failure. Doesn't appear to repro on Linux.

--- FAIL: TestFuzzConnCorpus (17.35s)
    --- FAIL: TestFuzzConnCorpus/c9da71996e0b7341b701e74eb4cbf30380eaf47a-14 (5.03s)
        leaktest.go:132: leaktest: timed out checking goroutines
        leaktest.go:150: leaktest: leaked goroutine: goroutine 787 [select]:
            github.com/Azure/go-amqp.(*Conn).connWriter(0xc0000bc000)
                C:/git/Azure/go-amqp/conn.go:768 +0x1ac
            created by github.com/Azure/go-amqp.(*Conn).start in goroutine 786
                C:/git/Azure/go-amqp/conn.go:370 +0x250
jhendrixMSFT commented 1 month ago

The race mentioned above was fixed in https://github.com/Azure/go-amqp/pull/337.