services/device/device: make tapes thread-safe, add unit tests for tapes

Make the tapes thread-safe s.t. they can be used for servicing rpc requests that
are performed in parallel.

Add unit test cases to cover tape functionality, and in particular, one test
case runs tape operations in parallel to verify thread-safety (in practice, the
test has been observed to fail when not using locking in tapes).

Also, change SetResponses to take a variable arg list instead of a slice.  This
is mostly for convenience, since the overwhelmingly common case is to only set
one response.

Change-Id: I90df6acfc02934fcffc0d042129cff530fcd52be
5 files changed
tree: 6071bbc31d50c4594eec439e61c3862ba4cdd70e
  1. cmd/
  2. envvar/
  3. examples/
  4. internal/
  5. lib/
  6. runtime/
  7. services/
  8. test/
  9. .gitignore
  10. AUTHORS
  11. CONTRIBUTORS
  12. LICENSE
  13. PATENTS
  14. README.md
  15. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.