Skip to content

Commit

Permalink
Skip re-encoding in the AsyncMessages fuzz tester
Browse files Browse the repository at this point in the history
Re-encoding is a significant slowdown that is causing
some tests to time out.  Since this isn't yet
giving us much value, just comment it out for now.
  • Loading branch information
tbkka authored and thomasvl committed Nov 11, 2023
1 parent a146c4a commit cc3dd41
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions FuzzTesting/Sources/FuzzAsyncMessageSequence/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ public func FuzzAsyncMessageSequence(_ start: UnsafeRawPointer, _ count: Int) ->
Task {
do {
for try await msg in decoding {
// Test serialization for completeness.
// There is no output sequence version, so generate the bytes.
let _: [UInt8] = try! msg.serializedBytes()
// TODO: Test serialization for completeness.
// We could serialize individual messages like this:
// let _: [UInt8] = try! msg.serializedBytes()
// but we don't have a stream writer which is what
// we really want to exercise here.

// Also, serialization here more than doubles the total
// run time, leading to timeouts for the fuzz tester. :(
}
} catch {
// Error parsing are to be expected since not all input will be well formed.
Expand Down

0 comments on commit cc3dd41

Please sign in to comment.