Merge main (3930ef2) into phase5/ui-vm-2
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
commit
4491ecee25
21 files changed
+820
-198
No files matched your search
+95
-6
@@ -46,17 +46,20 @@ the separate `release.yml` workflow below.
|
||||
this label (the left side must match the workflow's `runs-on`):
|
||||
|
||||
```text
|
||||
ubuntu-24.04:docker://ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04
|
||||
```
|
||||
|
||||
Configure this in the runner's labels when registering/configuring it;
|
||||
an `ubuntu-latest` label alone does not match. The job image must provide
|
||||
Bash, Git, the OpenSSH client, Node.js for checkout v4, and root or
|
||||
passwordless sudo for apt.
|
||||
an `ubuntu-latest` label alone does not match. This is the image of the
|
||||
runner that runs this repository's CI, and the one the tests are checked
|
||||
against ([Tests under the job image](#tests-under-the-job-image)). The job
|
||||
image must provide Bash, Git, the OpenSSH client, Node.js for checkout v4,
|
||||
and root or passwordless sudo for apt.
|
||||
3. Allow network access from the runner and job container to the Gitea
|
||||
instance, GitHub (checkout action, dependencies and RustSec advisories),
|
||||
GHCR (runner image), Ubuntu apt mirrors, rustup distribution servers,
|
||||
crates.io and dependency/license sources used by cargo-about. The
|
||||
`docker.gitea.com` (runner image), Ubuntu apt mirrors, rustup
|
||||
distribution servers, crates.io and dependency/license sources used by
|
||||
cargo-about. The
|
||||
workspace also depends on the **private** VoelinProtocol repository
|
||||
(`voelin-identity`, over SSH), so the job needs read access to it and the
|
||||
server's SSH port. The workflows set that up themselves from a repository
|
||||
@@ -102,6 +105,92 @@ all step results. Local YAML/shell checks do not prove that a particular
|
||||
Gitea instance, runner registration, network policy or resource allocation
|
||||
can complete this job.
|
||||
|
||||
### Tests under the job image
|
||||
|
||||
The test step runs as **root** in an Ubuntu 24.04 container of the
|
||||
`ubuntu-24.04` label ([Runner setup](#runner-setup):
|
||||
`docker.gitea.com/runner-images:ubuntu-24.04`, `HOME=/root`) to which only
|
||||
the apt packages of the system-dependencies action are added. A test that
|
||||
assumes a developer machine fails there, and a run takes about an hour, so
|
||||
check a change to the tests the way CI runs them, with every failing test of
|
||||
every crate listed in one go (`--no-fail-fast`):
|
||||
|
||||
```sh
|
||||
# A bare clone of the private VoelinProtocol repository (see below the block):
|
||||
# git clone --bare ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git <dir>
|
||||
: "${PROTOCOL_GIT:?path of a bare clone of VoelinProtocol}"
|
||||
# Root owns what the container writes: keep it in a directory of its own
|
||||
# (.scratch/ is in .gitignore; see below the block for its removal).
|
||||
mkdir -p .scratch
|
||||
docker run --rm --init -v "$PWD":/src -w /src -e HOME=/root \
|
||||
-v "$PROTOCOL_GIT":/protocol.git:ro -e CARGO_NET_GIT_FETCH_WITH_CLI=true \
|
||||
-e CARGO_HOME=/src/.scratch/cargo -e RUSTUP_HOME=/src/.scratch/rustup \
|
||||
-e CARGO_TARGET_DIR=/src/.scratch/target \
|
||||
docker.gitea.com/runner-images:ubuntu-24.04 bash -c '
|
||||
git -C / config --global url."file:///protocol.git".insteadOf \
|
||||
ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential ca-certificates cmake curl git jq pkg-config python3 \
|
||||
libasound2-dev libfontconfig1-dev libxkbcommon-dev libvpx-dev \
|
||||
libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev xvfb xauth
|
||||
curl --proto =https --tlsv1.2 -sSf https://sh.rustup.rs | \
|
||||
sh -s -- -y --profile minimal --default-toolchain none
|
||||
. "$CARGO_HOME/env" && rustup toolchain install
|
||||
xvfb-run -a bash -c "VOELIN_X11_TEST_DISPLAY=\$DISPLAY \
|
||||
cargo test --workspace --locked --no-fail-fast"'
|
||||
```
|
||||
|
||||
`--init` is required: `bash -c` runs its last command, `xvfb-run`, as the
|
||||
container's process 1, and that never gets to start `cargo` (the command
|
||||
hangs). The runner starts its steps with `docker exec` in a container whose
|
||||
process 1 is something else, so CI itself is not affected.
|
||||
|
||||
The private VoelinProtocol dependency needs the deploy key
|
||||
([below](#voelinprotocol-access)). The block reads it from a local bare clone
|
||||
instead: `PROTOCOL_GIT` is mounted at `/protocol.git` and git is told to use
|
||||
it in place of the SSH URL (with `CARGO_NET_GIT_FETCH_WITH_CLI=true`, as in CI,
|
||||
so that cargo runs the `git` command), which leaves `Cargo.lock` as it is.
|
||||
The `git config` is run with `-C /` because a git worktree's `.git` file points
|
||||
outside the mount, and `git config` in `/src` then fails with `fatal: not a git
|
||||
repository: (null)` (exit 128). To use the deploy key instead, set it up as
|
||||
described below and leave out the `PROTOCOL_GIT` lines and the `git config`
|
||||
command. What the container wrote under `.scratch/` belongs to root; remove it
|
||||
from a container as well:
|
||||
|
||||
```sh
|
||||
docker run --rm -v "$PWD/.scratch":/s alpine:3.20 rm -rf /s/target /s/cargo /s/rustup
|
||||
```
|
||||
|
||||
What the image lacks, and what the tests do about it. A test that is about
|
||||
the missing piece returns without testing it, in most cases after printing a
|
||||
line that says it skipped and names the piece (the wording differs from test
|
||||
to test), or is `#[ignore]`d with the reason, and passes; any other test does
|
||||
not need the piece.
|
||||
|
||||
| A test cannot count on | What the tests do |
|
||||
|---|---|
|
||||
| Regular user (root writes anywhere and creates missing directories) | Nothing relies on a permission bit or a missing directory failing. A path that cannot be written is built from something that fails for root too: below a regular file (`ENOTDIR`) or naming a directory (`EISDIR`), as `an_unwritable_path_fails_at_once` of the recorder does. |
|
||||
| Sound card (`/dev/snd`), PipeWire and WirePlumber daemons | `libpipewire` and ALSA are there to build against only. `tests/pipewire_apps.rs` needs `pipewire`, `wireplumber` and `dbus-daemon` and, without them, prints a skipped line that names them. The camera tests are `#[ignore]`d (a camera and PipeWire). |
|
||||
| D-Bus session bus | `voelin-platform`'s portal proxy test runs itself again under `dbus-run-session` on a bus of its own and, where that cannot be run, prints `skipped, nothing was checked: dbus-run-session cannot be run`; the notification and capture-portal tests run only where no bus is configured, and check that talking to a missing service fails cleanly. |
|
||||
| GPU, `/dev/dri`, VA-API, `/dev/udmabuf` | The VA-API and DMA-BUF tests print a skipped line that names what is missing: a usable `h264_vaapi`, `/dev/udmabuf` or VA-API surfaces to export. |
|
||||
| FFmpeg libraries, `ffmpeg` and `ffprobe` | The FFmpeg tests of `voelin-media` and `voelin-core` print a skipped line that names what is missing (the libraries, `ffmpeg`, `ffprobe`). The studio tests that read a recording back with `ffprobe` write and check the file themselves and skip only the `ffprobe` check; the RTMP tests need all three and skip. |
|
||||
| H.264 encoder (no FFmpeg, no GPU, no OpenH264 library: `VOELIN_OPENH264_LIB` is unset and the download test is `#[ignore]`d) | Tests that need an H.264 encoder print a skipped line that says no H.264 encoder is there. Tests of codec choice state what `preferred_codec` promises with whatever the machine can encode. VP8 and VP9 (libvpx) are built in, so their round trips run. |
|
||||
| X11 or Wayland display | `xvfb-run` supplies one X11 display and the step hands it over as `VOELIN_X11_TEST_DISPLAY` to the X11 capture and hotkey tests. `VOELIN_WLROOTS_TEST_DISPLAY` is unset, so the wlroots capture test prints `skipped`. |
|
||||
| Playwright and Chromium (the image has Node) | The browser interop tests print `skipped: set VOELIN_INTEROP=1 (needs node, Playwright and Chromium)`. |
|
||||
| TeamSpeak dev servers | Without `VOELIN_LIVE=1` the live tests return at once (some print `skipped: set VOELIN_LIVE=1 with the dev servers running`); the gateway's live test is `#[ignore]`d (`needs a running tsgw and TeamSpeak server`). |
|
||||
| DNS and internet while the tests run (the job needs the network for apt, rustup and crates before they start) | The tests use no DNS or internet; those that would are `#[ignore]`d with the reason: four resolver tests of `tsclientlib` (`needs DNS and the internet`) and the OpenH264 download test. |
|
||||
|
||||
`localhost` resolves to `::1` first in this image (it also has `127.0.0.1`).
|
||||
The tests that reach a server of their own go to `127.0.0.1` by name, not
|
||||
through `localhost`, so a machine where connections to `::1` hang (a
|
||||
development machine with a VPN does that) changes nothing for them.
|
||||
|
||||
A test that passes in the image and fails now and then on a busy runner or
|
||||
development machine is another kind of failure, a test of the machine's load:
|
||||
[testing/load.md](testing/load.md) says how to make a machine busy to
|
||||
reproduce one, what the tests that failed that way assert now, and which are
|
||||
known and left alone.
|
||||
|
||||
### VoelinProtocol access
|
||||
|
||||
The workspace depends on `voelin-identity` from the **private** repository
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
# Tests under load
|
||||
|
||||
A test that passes alone and fails one run in a hundred when the machine is
|
||||
busy is a test of the machine. The runner shares its CPUs with other jobs, and
|
||||
a developer's machine with whatever else runs on it, so the suite has to give
|
||||
the same answer on a busy machine as on an idle one. This page says how to
|
||||
make a machine busy, what the fixes of `phase5/test-hygiene` did about the
|
||||
tests that failed only then, and what is known and left alone.
|
||||
|
||||
## The round of `phase5/test-hygiene`
|
||||
|
||||
The branch is `phase5/test-hygiene`, from `2ffe5ff` (main with the session
|
||||
seam, its follow-ups, the CI deploy key and `phase5/tests-under-runner`). It
|
||||
settles the left-overs of the review of the seam follow-ups and of the
|
||||
tests-under-runner round. The `mao-*` agents were not registered in the
|
||||
session, so a general-purpose agent played `mao-implementer` (Sonnet 5.5),
|
||||
attempt 1; an earlier run of the same task was cut off by a restart of the
|
||||
orchestrator, left four commits and an uncommitted tree, and this attempt
|
||||
judged those, kept what was right and finished the rest. No history was
|
||||
rewritten; `THIRD_PARTY_NOTICES.md` is untouched (`Cargo.lock` did not change).
|
||||
|
||||
| Commit | What | Whose |
|
||||
|---|---|---|
|
||||
| `e465a55` | Item 2: the fallback gateway test keeps its "closed" port bound | cut-off run, kept |
|
||||
| `ac957a0` | Item 1: the history test of `gateway.rs` waits for the `-wal` file before it reopens (`tests/common/mod.rs`) | cut-off run, kept |
|
||||
| `35408a3` | Item 5: the portal proxy test requires `1 passed` of its child | cut-off run, kept |
|
||||
| `7e63092` | Item 4: `from_json`'s doc names voelin-core (voelin-store parses the text too: `keystore.rs` `check_teamspeak` and `level`, `store.rs` `list`) | cut-off run, kept |
|
||||
| `0bc6aba` | Item 3: the account-change test names the step it timed out in | this attempt |
|
||||
| `f9bfd5d` | Item 6: `rectangle_span` checks the pattern's structure | cut-off run's tree, committed |
|
||||
| `25be433` | Item 6: the preview test checks its rates against its own timing | cut-off run's tree, committed |
|
||||
| `81c40a4` | Item 6: `audio_sources_change_live` | cut-off run's tree, committed |
|
||||
| `c5bb74f` | Item 6: the server-features test asks one question at a time | cut-off run's tree, committed |
|
||||
| `7730460` | Item 6: the layer-format test waits for the stream task's answer | cut-off run's tree, committed |
|
||||
| `9d04e01` | Item 6: the studio compose test waits for the frame it asks for | cut-off run's tree, committed |
|
||||
| `92d02b0` | Beyond the list: the studio capture-backend test waits for the delivered count | cut-off run's tree, committed |
|
||||
| `661a607` | Beyond the list: the scope test and `streamer_sends_opus` | cut-off run's tree, committed |
|
||||
| `069fd2a` | Item 7: `ts6_banners` runs with the TeamSpeak 6 server to itself | cut-off run's tree, committed |
|
||||
| `5c029a9` | Item 7: the smoke's `roundtrip` waits for its listener | cut-off run's tree, committed |
|
||||
| `94195db` | rustfmt of four spots of the commits above | this attempt |
|
||||
| `f508e5b` | Beyond the list: the automatic-bitrate test counts frames | this attempt |
|
||||
| `ad80660` | The smoke script says which of its checks still flake | this attempt |
|
||||
| `d4ccb8c`, `376925a` | `docs/testing/load.md` and the pointer in `docs/ci.md`; the record of the round, with the table of the checks | this attempt |
|
||||
|
||||
Two hunks of the cut-off run's tree were dropped: the timing instrumentation of
|
||||
the account-change test (`Instant`s and an `eprintln!` of the steps, replaced
|
||||
by the named `expect`s of `0bc6aba`; its numbers are below) and a
|
||||
`#[cfg(test)] FIRST_SNAPSHOT` of 5 s in `ts_session` (it keeps the lib tests
|
||||
from running the 250 ms the engine really has; see "Seen and left alone"). The
|
||||
commits "beyond the list" are fixes of tests that failed in this round's own
|
||||
runs, each in a commit of its own, and can be dropped without touching the
|
||||
others.
|
||||
|
||||
What ran, on the final tree (the dev shell `dev rust-nightly -p cmake -p clang
|
||||
-p pkg-config -p jq -p alsa-lib -p openssl -p libvpx -p dav1d -p pipewire -p
|
||||
fontconfig -p freetype -p libxkbcommon -p expat -p dbus -p procps -p gnumake`
|
||||
with the pinned 1.94 or the nightly of 2026-10-21 in front of `PATH`, and
|
||||
`LIBCLANG_PATH`):
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `cargo fmt $(scripts/own-crates.sh) -- --check`, `cargo clippy $(scripts/own-crates.sh) --all-targets --locked --no-deps -- -D warnings` | 1.94: clean at the head |
|
||||
| The same on nightly | clippy is blocked at sites of the baseline (none in a line of this branch): `chunks_exact_to_as_chunks` (voelin-core `audio.rs` and `media.rs:4057`, voelin-media), `manual_checked_ops`, `unnecessary_sort_by` (voelin-media), `result_large_err` (`ts/voice.rs:476`); with those four allowed the three touched crates are clean with all targets. voelin-platform is clean. `rustfmt` differs at `history.rs`, `ffmpeg/encoder.rs`, `discovery.rs`, `chat.rs` and `voelinctl/src/engine.rs`, none changed here |
|
||||
| Clippy alone, at each of the 16 commits above that touch Rust, checked out detached | 1.94, `voelin-core`, `voelin-media`, `voelin-platform`, all targets, `media-desktop`: clean at each. `rustfmt` was not clean at seven commits from `c5bb74f` to `069fd2a` (the commits that wrote the four spots `94195db` formats, and the shell-only `5c029a9` that sits on that tree); per-commit rustfmt waived by the orchestrator, fixed forward, no history rewrite |
|
||||
| `cargo test -p voelin-core -p voelin-platform -p voelin-media --locked --no-fail-fast`, ten times in a row | 516 tests passed and 13 ignored in each of ten runs, 33 test binaries each; load average 89 to 29 from other jobs |
|
||||
| The same with `--features voelin-core/media-desktop` (the tests of this round's `media` fixes only exist there; `cargo test --workspace` has it on through `voelin-ui`) | 551 passed and 14 ignored in each of ten runs; load average 21 to 25 |
|
||||
| `cargo check --workspace --all-targets --locked` | passes (1.94) |
|
||||
| The tests of the tables below, 100 runs each of the binary of `2ffe5ff` and of the final tree, and the whole lib binaries | The tables below |
|
||||
| `scripts/it-smoke.sh ts3 ts6` | Below, "The live smoke" |
|
||||
|
||||
## Making the machine busy
|
||||
|
||||
The recipe of that round: 32 busy loops beside the run (the machine had 32
|
||||
threads), and the test binary started many times, a few at a time, so that
|
||||
the tests of one binary also meet each other's load:
|
||||
|
||||
```sh
|
||||
# 1. Build the test binaries once and note their paths (the "executable" of
|
||||
# the lib and of each integration test); run those, not `cargo test`.
|
||||
cargo test -p voelin-core --features media-desktop --lib --no-run --message-format=json
|
||||
|
||||
# 2. The busy loops, and 300 runs of one test, 8 at a time. (The
|
||||
# whole binary, without --exact, is the better test of "under full
|
||||
# load": every test of it runs at once.)
|
||||
for _ in $(seq 32); do sh -c 'while :; do :; done' & done
|
||||
trap 'kill $(jobs -p)' EXIT
|
||||
seq 300 | xargs -P 8 -I{} sh -c '<executable> --exact <test> >/dev/null 2>&1 || echo FAIL' | sort | uniq -c
|
||||
```
|
||||
|
||||
Compare a binary built before a change with one built after it, started
|
||||
alternately in the same loop, so that both meet the same load. Write the load
|
||||
average (`/proc/loadavg`) down with the result: other jobs on the shared
|
||||
machine took it from the 32 loops' 32 to over 100 and, for minutes, to 250,
|
||||
and some tests fail only above 150 (see below). A failure rate of one in a
|
||||
hundred tests needs a few hundred runs to show; the whole binary shows its
|
||||
flaky tests faster than each test alone, since its 275 tests compete.
|
||||
|
||||
## What the fixes assert
|
||||
|
||||
The rules the fixes of this round followed, in the order of preference:
|
||||
|
||||
1. **Wait for the state or event the test is about.** A deadline only ends a
|
||||
hang (30 s), it never decides the result. A pause (`sleep`) is never what a
|
||||
test waits for, and a "nothing happened" check waits for something that
|
||||
comes after it (a command the same task answers in order, a count of
|
||||
frames), not for time to pass.
|
||||
2. **Derive a time from the work.** Where a rate is checked, the bounds come
|
||||
from timestamps taken by the test around the calls, not from a constant.
|
||||
3. **Check structure, not values within a tolerance**, where a lossy or
|
||||
adaptive component is involved: an encoder that falls behind lowers its
|
||||
quality, and a tolerance only moves the load at which the test fails.
|
||||
4. **Keep what you reserved.** A port that is "free" because a listener was
|
||||
bound and dropped can be handed to another test of the process at once;
|
||||
a socket that stays bound and never listens refuses connections for the
|
||||
whole test.
|
||||
5. **A test that changes the state of a shared server runs with the server to
|
||||
itself** (a lock in the test binary), however the harness schedules it.
|
||||
|
||||
## The load-only tests of the round
|
||||
|
||||
100 runs of each test alone, the binary of the commit before the round
|
||||
(`2ffe5ff`) and the one after it, started alternately 8 at a time beside 32
|
||||
busy loops (load average 34 to 81 during the runs), and 150 / 100 runs of the
|
||||
whole lib binaries of `voelin-core` / `voelin-media`, 4 at a time beside the
|
||||
same loops (load average 69 to 123). Failed runs, of the runs:
|
||||
|
||||
| Test | Why it failed | It checks now | Alone, before / after | Notes |
|
||||
|---|---|---|---|---|
|
||||
| `media::tests::local_preview_decodes_the_pattern`, `stream::tests::test_pattern_through_stream_tasks` (`media::rectangle_span`) | The VP8 speed control lowers the quality when the encoder falls behind; flat colours moved by 30 and more per channel and failed the tolerance of 24 (one of 40 was tried and reverted) | Each pixel is the nearer of the pattern's two colours; the middle row is background, one run of the rectangle, background; the span's width and movement as before. The preview's `fps` and `bitrate` are the counters' change over the time between the two stats calls, which the test timed | 1 / 0 and 1 / 0 of 100 | In the whole lib binary, before: 6 and 4 failures in 150 runs; after: 0 |
|
||||
| `media::tests::audio_sources_change_live` | The state, mix and limiter were asserted when the meters showed, not waited for; the microphone thread published for one second, which a busy machine delayed past | Waits for the state, the mix and the limiter with the meters; the microphone is fed until the test has heard it | 0 / 0 of 100 | In the whole lib binary, before: 2 failures in 150 runs |
|
||||
| `link::tests::the_features_of_a_server_are_the_hosts_narrowed_by_the_servers_list` | The file list was asked for every 20 ms and the answers fell behind the 16 events of the bus | One question at a time, the next after the answer (`ask_files_until`) | 0 / 0 of 100 | In the whole lib binary, before: 1 failure in 150 runs |
|
||||
| `stream::tests::layer_formats_reach_the_live_stream` | "Nothing changed" was a 200 ms sleep, short of the stream task on a busy machine | A command the task answers with an event, sent after the format, and waited for: the task takes its commands in order | 0 / 0 of 100 | The "late streamer-side keyframe request" of the runner round was never seen and is not proven; a request the viewer's side makes late is not covered |
|
||||
| `studio::tests::it_composes_into_the_preview_and_follows_commands` | The first frame after `SetPreview` can be one composed at the studio's start size (480x270) before the command applied | `preview_until`: the first frame of the size and scene asked for, out of at most 20 | 0 / 0 of 100 | In the whole lib binary of `voelin-media`, before: 0 of 100 runs; seen 2 in 150 earlier in the round |
|
||||
| `gateway.rs`: `the_next_published_gateway_is_used_when_one_fails` | The "closed" port was bound and dropped; another test of the binary could be given it | A socket kept bound without listening, checked to refuse | 0 / 0 of 100 | |
|
||||
| `gateway.rs`: `history_on_open_paging_and_offline_messages` | Dropping an `Engine` does not close its database; reopening waited 5 s for the exclusive lock of the closing connection (`DatabaseBusy`) | Waits for the `-wal` file to go (`tests/common/mod.rs`, shared with `voice_features.rs`) | 0 / 0 of 100 | The same as `contacts_are_kept_in_the_database`, fixed in `0d67dd7`. Beside the busy loops it did not fail; with every fsync of the process delayed by 6 s (`strace -f -qq -e trace=fsync,fdatasync -e inject=fsync,fdatasync:delay_enter=6s`) the old test fails every time at the reopen with `DatabaseBusy` (`gateway.rs:536`), the new one passes |
|
||||
| `voelin-platform` `proxy.rs`: `the_portal_names_the_proxy` | A child that ran no test (its `--exact` name matches none) exits 0 | The wrapper requires `test result: ok. 1 passed;` in the child's output | 0 / 0 of 100 | |
|
||||
|
||||
Found by the same runs, beyond the list, and fixed in their own commits:
|
||||
|
||||
| Test | Why it failed | It checks now | Alone, before / after | Notes |
|
||||
|---|---|---|---|---|
|
||||
| `studio::tests::packets_reach_the_outputs_and_the_studio_is_a_capture_backend` | The studio counts a frame as delivered after handing it over, so the count could still be 0 | Waits for the count | 2 / 0 of 100 | Whole `voelin-media` binary, before: 11 of 150 runs (9 of them this test), then 2 of 100; after: 0 of 100 |
|
||||
| `link::tests::a_scope_bigger_than_the_channel_is_sent_in_bigger_chunks` | 5,000 channels were made after the connector's 250 ms wait for a first snapshot began; the scope was sent before the presence was in | The channels are made first; a voice packet through the link shows the presence is in | 0 / 0 of 100 | 3 failures of about 500 whole-binary runs before, 7 of 300 at a load average of 150 to 250 with the first half of the fix only (the channels first, no voice packet); too rare to count a rate after |
|
||||
| `media::tests::streamer_sends_opus` | Ten frames of audio came before the first frame of video, which a busy machine delays | Waits for ten of audio and one of video | 0 / 0 of 100 | 2 failures of about 500 whole-binary runs before |
|
||||
| `media::tests::an_automatic_bitrate_follows_the_stream` | The sink is told the format at `attach` and again by the encoder before its first frame; the test counted in between after a 200 ms pause | Counts after a frame has come and compares after five more | 2 of 900 before; 0 of 600 after | 1 of 150 in the final whole-binary run of the old test |
|
||||
|
||||
The whole `voelin-core` lib binary failed 12 of 150 runs before and 1 of 150
|
||||
after (the last test of the table, fixed since), the `voelin-media` binary 2
|
||||
of 100 before and 0 of 100 after.
|
||||
|
||||
## `ts::voice::account_tests::account_change_cancels_pending_handshake`
|
||||
|
||||
Seen once in about 130 runs of the whole suite under load by the review of the
|
||||
seam follow-ups; the failure was not kept. It did not fail again in this round
|
||||
(it does not touch the test's code or the code it drives), neither alone nor
|
||||
in the whole lib binary:
|
||||
|
||||
- 600 runs alone, 8 at a time beside 32 busy loops (300 of the unchanged
|
||||
binary, 300 of the timed one): 600 passed; 100 more before and 100 after
|
||||
in the table above, 200 passed.
|
||||
- It is in each whole-binary run of `voelin-core`: about 1,300 runs under
|
||||
the busy loops in this round (150 of them of the final tree), in none of
|
||||
which it failed (load average up to 250), and in the ten full runs of
|
||||
`cargo test -p voelin-core -p voelin-platform -p voelin-media` of each kind
|
||||
(with and without `media-desktop`) of the final tree.
|
||||
- The test, timed (a throw-away build): the first handshake packet after
|
||||
12.5 ms (median; 34 ms at most), the packet of the new socket after an
|
||||
account change 6.9 ms (33 ms at most), the end of the connection after the
|
||||
account source closed 0.2 ms (9 ms at most), in the 300 runs beside the 32
|
||||
loops. Its deadlines are 5 s, 5 s and 2 s: 60 times or more the longest
|
||||
step seen.
|
||||
|
||||
The test and the code were read for a race and none was found: the account
|
||||
watch has seen its version before the connection is made, so a change after
|
||||
the first packet always restarts the connection; the restart opens a socket of
|
||||
its own, so a packet from another port is the new connection's; and dropping
|
||||
the sender makes `changed()` fail, which ends the loop with the reason the test
|
||||
expects. The only ways the test can fail are its three deadlines. That is the
|
||||
evidence for "only load": a failure needs a stall of seconds in one step, and
|
||||
the machine's, not the test's, is the likelier source. The three timeouts now
|
||||
say which step it was, so the next failure is attributable; if it is seen
|
||||
again, keep the output and the load average (`/proc/loadavg`) and see which
|
||||
of the three it names.
|
||||
|
||||
## Seen and left alone
|
||||
|
||||
These failed in the runs of an intermediate tree of this round at load
|
||||
averages of 150 to 250 (other jobs on the machine as well as the 32 loops),
|
||||
and not in the runs of the final tree at 35 to 120. None of them is among the
|
||||
tests this round changed.
|
||||
|
||||
- `link::tests::the_welcome_names_the_host_the_user_and_what_the_link_can_do`:
|
||||
the test tells the connection that it is connected and, in the next
|
||||
statement, gives it the snapshot; the session waits 250 ms for the snapshot
|
||||
(`FIRST_SNAPSHOT` in `ts_session`), and at a load average of 250 the gap was
|
||||
longer: the welcome had the user made up from the uid. Raising that constant
|
||||
in test builds was tried and dropped: it stops the lib tests from running the
|
||||
250 ms the engine really has.
|
||||
- `link::tests::what_the_link_reports_comes_back_as_events` (3 of 300 runs of
|
||||
the whole lib binary), `link::tests::the_stream_tasks_reports_are_not_held_for_ever`
|
||||
(2 of 300) and `stream::tests::layers_through_stream_tasks` (3 of 500): timing
|
||||
of reports against the machine, not looked into further. None failed in the
|
||||
500 runs of the tree before the round, which ran at load averages up to 150.
|
||||
- `media::tests::undecodable_video_is_noticed_through_the_pipeline` (1 of 100
|
||||
runs of the whole `voelin-core` lib binary of the final tree, four at a time
|
||||
beside 32 busy loops, load average 106 to 146; the review's run):
|
||||
`DecodeWatch` called a real VP8 stream undecodable because no picture was
|
||||
decoded within 400 ms and 10 frames. Untouched by this round; it did not fail
|
||||
in 150 before or 150 after runs of the interleaved A/B.
|
||||
`stream::tests::layers_through_stream_tasks` failed again in the same 100.
|
||||
|
||||
## The live smoke (`scripts/it-smoke.sh`)
|
||||
|
||||
The engine stage (`voelin-core`'s `tests/live.rs`, with `stream_live` and
|
||||
`media_live`) failed on `disabled policy must prevent HTTP requests`
|
||||
(`ts6_banners`) in every run that reached it, while the six tests passed
|
||||
one after the other. The cause was the test: it sets the TeamSpeak 6 server's
|
||||
banners and counts the requests that reach its own HTTP server for them, and
|
||||
the other tests of the file, which cargo runs side by side, connect engines to
|
||||
the same server; the server tells each of them the banners' addresses and an
|
||||
engine fetches what it is told, so their requests were counted. With the tests
|
||||
in pairs against the development servers: `ts6_banners` alone passes (62 s),
|
||||
with `ts6_avatars`, `ts6_engine` or `ts6_channel_joins` it fails. It is not
|
||||
the engine (it should fetch what the server announces) and not the order of the
|
||||
script's stages (the tests of one binary run side by side whatever the stage
|
||||
before). The tests that connect to the TeamSpeak 6 server now hold a lock of
|
||||
the binary shared, and `ts6_banners` holds it exclusively.
|
||||
|
||||
Before the change, on `2ffe5ff`'s tests and script (the TeamSpeak 3 and 6
|
||||
dev servers of `dev/docker-compose.yml`, as a compose project of their own):
|
||||
the `live` binary failed `ts6_banners` in each run that reached it, with the
|
||||
six tests side by side (5 passed, 1 failed); the smoke
|
||||
stopped at `FAIL: private message: the action failed` in its TeamSpeak 3 stage
|
||||
(`the client is not on the server`) and, in its TeamSpeak 6 stage, at
|
||||
`FAIL: gateway request {"config_set":...} was not answered`. After it, at the
|
||||
head of the branch: `scripts/it-smoke.sh ts3 ts6`, three times in a row, the
|
||||
`live` binary passing 6 of 6 (66 s) in each run that reached the engine stage:
|
||||
two runs passed every stage (`all smoke tests passed`), one failed in its
|
||||
TeamSpeak 6 stage at `FAIL: the directory did not list the stream`, below.
|
||||
|
||||
What the smoke still does not do reliably, and was not changed for:
|
||||
|
||||
- Each step that starts a background client and then a second one
|
||||
(`roundtrip`) used to wait a fixed 3 s; a dev server that takes 4 s to
|
||||
13 s to let a client in made the action run before the listener was on the
|
||||
server (`the client is not on the server`). It now waits for the listener's
|
||||
`connected:` line. The server's own slowness is not removed.
|
||||
- The stream directory check (step 10, TeamSpeak 6): the late viewer ends as
|
||||
soon as it has 30 frames, and the `"title"` line the script looks for is
|
||||
printed only if the viewer's own gateway session had connected and been
|
||||
told of the directory by then. In the run that failed it had not (the
|
||||
viewer's state stayed `observe=Connecting`): the stream was watched, 30
|
||||
frames came, and the stream was listed through TeamSpeak 6's own listing
|
||||
(`streams: ...`), which says nothing about the gateway's directory. A fix is
|
||||
in `voelinctl engine` (end the viewer when it has both) and was left out of a
|
||||
round about tests.
|
||||
- The gateway stage (`voelinctl gateway --engine`, step 8) has failed in a run
|
||||
with `expected output did not appear` while the engine was still
|
||||
`observe=Connecting`, before the change as well. That may be the same wait
|
||||
for a gateway session; it was not looked into.
|
||||
- `ts6_banners` alone takes 62 s, so the engine stage takes more than a
|
||||
minute longer than the sum of the others.
|
||||
Reference in new issue
Block a user