]> Cypherpunks.ru repositories - gostls13.git/commit
net/http: test index exhaustively
authorJonathan Amsterdam <jba@google.com>
Tue, 19 Sep 2023 21:03:45 +0000 (17:03 -0400)
committerJonathan Amsterdam <jba@google.com>
Tue, 19 Sep 2023 21:50:48 +0000 (21:50 +0000)
commit4d700a719bacb4286032c66e4e68d74024f8e748
treea3766a21c5174595a0adc48efb7c4c0098d38a29
parent2b462646edefe47650851e8ba23cc787c57ae745
net/http: test index exhaustively

Replace the fuzz test with one that enumerates all relevant patterns
up to a certain length.

For conflict detection, we don't need to check every possible method,
host and segment, only a few that cover all the possibilities. There
are only 2400 distinct patterns in the corpus we generate, and the
test generates, indexes and compares them all in about a quarter of a
second.

Change-Id: I9fde88e87cec07b1b244306119e4e71f7205bb77
Reviewed-on: https://go-review.googlesource.com/c/go/+/529556
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/http/routing_index_test.go
src/net/http/testdata/fuzz/FuzzIndex/48161038f0c8b2da [deleted file]
src/net/http/testdata/fuzz/FuzzIndex/716514f590ce7ab3 [deleted file]