[roll] Roll fuchsia [seriallistener][iomisc] Match strings split across multiple reads

It is possible for seriallistener to not match strings that are split
across multiple reads because each read creates a MatchingReader of its
own, thereby losing the matched pattern between reads. The fix replaces
MatchingReader and ReadUntilMatch* with Matcher for the reasons below.

ReadUntilMatch* functions are unsafe. Canceling their context doesn't
guarantee that an ongoing Read will be interrupted. Instead, it leaks
the goroutine wrapping the Read which is masked only by the fact that
the process is likely to exit soon after leaking the goroutine.

More importantly, io.Reader doesn't impose any concurrency requirements
on implementations. It is possible to invoke an unsafe operation on the
implementation of an io.Reader while its Read operation is blocked. In
particular, a retried Read may skip data.

Finally, MatchingReader in incorrect. It doesn't match patterns like
"AB" when read in steps of "A", "AB".

Matcher is simpler. It matches a single pattern and does so with an API
that allows multiple patterns to be matched in parallel. It returns a
boolean to confirm that its pattern matched instead of making the user
compare the returned string. Tests are more straightforward.

Original-Bug: 42085023
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1481137
Original-Revision: 9e9d22ec1007df48cf2339abe11385bc7580cc64
GitOrigin-RevId: 3e2555b6d247744ffef6fe21d58d8016fc13da29
Change-Id: I23de50a9680d1edc4c52042a36faaee115260418
1 file changed
tree: 64a4cced8b40e8da6922b1526708b587bdafc781
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cobalt
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.