Conversation
|
7d96591 to
254fbf0
Compare
|
another option that isn't blocked on updating to go 1.18 would be using fast-check: https://github.com/dubzzz/fast-check/tree/main/packages/fast-check/documentation this allows for creating property tests to augment unit tests by generating data of a certain shape and asserting certain properties of it, like that a parse should contain only unicode strings or an error. ex: https://github.com/dubzzz/fast-check/blob/main/examples/001-simple/fibonacci/main.spec.ts ex closer to the compiler: https://github.com/dubzzz/fast-check/blob/main/examples/001-simple/indexOf/main.spec.ts |
This can be run via `go test ./internal/transform -fuzz=FuzzScopeHTML` from the root directory to run an ongoing fuzz test of the html scoping. Uses https://tip.golang.org/doc/tutorial/fuzz
254fbf0 to
648c882
Compare
|
This is ready for review now that go is > 1.18! This can be run in CI with something like https://github.com/jidicula/go-fuzz-action or something similar, or often able to be run in person. I'd say merge && run in person for now - though eventually hopefully all immediate bugs are found that would make this fail outright I'd probably recc https://google.github.io/oss-fuzz/getting-started/continuous-integration/ actually, since they have the most experience running fuzzing continuously in CI. Though this would be a more of "catch bugs in recently commited code" setup |
Changes
Small bugfixes that will be eventually moved to other PRs
Testing
This PR is tracking the addition of a simple go based fuzzer to test the html parser / scoped styles generator.
I'll add fixes to bugs I discover as I go along, and then eventually I'll break out the bugs and this fuzzer into individually mergable PRs
This can be run via
go test ./internal/transform -fuzz=FuzzScopeHTMLfrom the root directory to run an ongoing fuzz test of the html scoping.Uses https://tip.golang.org/doc/tutorial/fuzz
Docs
There should be contributor docs for how the fuzzer works, how to run it && how to update fuzz tests