[audio] Fix flake if virtual audio transfer bytes is non-zero

Before this CL, the virtual audio StreamConfig driver would
report a start time driver_transfer_bytes in the future with
the intent of starting to report position notifications after
the time equivalent to driver_transfer_bytes has passed,
this should not be needed per clarification in
fxrev.dev/871737.

The position reported by virtual audio as part of position
notifications should not start at a negative value, we have
assertions to make sure this is the case. Before this CL
the first position notification was intended to happen after
a time equivalent to driver_transfer_bytes has passed and
hence it would have been position 0+. However, the virtual
audio FIDL API allows for updating the position notification
frequency via the SetNotificationFrequency API call, and
in e2e tests this would change the timestamp used to report
the position notification. In fxrev.dev/858124 we
changed driver_transfer_bytes for e2e tests from 0 to 48
(the default value provided by the driver), this would
change the timestamp used to report the position
notification sometimes to a value before
driver_transfer_bytes had passed, triggering the assertion
mentioned above manifesting in the flake.

By not returning a start time driver_transfer_bytes in the
future and also not setting the start of position
notifications in the future, we both comply with the
clarifications in fxrev.dev/871737 and avoid the flake
condition since a SetNotificationFrequency could not result
in a position with a negative value anymore.

Fixed: 129056
Test: host_x64/knowledge_card_test
(with driver_transfer_bytes=1024 to make the failure deterministic)

Change-Id: I287762b227368a8130f247ca524f83720f90b435
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/871738
Commit-Queue: Andres Oportus <andresoportus@google.com>
Reviewed-by: Cam Lloyd <camlloyd@google.com>
Reviewed-by: Martin Puryear <mpuryear@google.com>
2 files changed
tree: 0a1d35db5e9086519c71ee7df8e0b9ea34613365
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. infra/
  7. products/
  8. scripts/
  9. sdk/
  10. src/
  11. third_party/
  12. tools/
  13. zircon/
  14. .clang-format
  15. .clang-tidy
  16. .editorconfig
  17. .git-blame-ignore-revs
  18. .gitattributes
  19. .gitignore
  20. .gitmodules
  21. .gn
  22. .ignore
  23. .style.yapf
  24. analysis_options.yaml
  25. AUTHORS
  26. BUILD.gn
  27. CODE_OF_CONDUCT.md
  28. CONTRIBUTING.md
  29. fuchsia.code-workspace
  30. LICENSE
  31. OWNERS
  32. PATENTS
  33. pyrightconfig.json
  34. README.md
  35. rustfmt.toml
README.md

Fuchsia

What is Fuchsia?

Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.

We expect everyone interacting with our project to respect our code of conduct.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.