Skip to content

A set of commits aimed at reducing the occurences of CI test failures.#777

Open
borine wants to merge 6 commits intoarkq:masterfrom
borine:test-fixes
Open

A set of commits aimed at reducing the occurences of CI test failures.#777
borine wants to merge 6 commits intoarkq:masterfrom
borine:test-fixes

Conversation

@borine
Copy link
Copy Markdown
Collaborator

@borine borine commented Aug 21, 2025

There are still some occasional failures remaining, but overall the failure rate is greatly improved.

Tests with known races that can still cause failure:

  • test-alsa-pcm:test_playback_hw_set_free
  • test-utils-aplay:test_play_dbus_signals
  • test-rfcomm

Tests that may still occasionally fail for unknown reasons:

  • test-dbus
  • test-alsa-midi

borine added 5 commits August 21, 2025 10:56
snd_seq_event_input() blocks until the event timestamp is reached,
according to the system clock. The ble_midi_decode() function
limits the time drift from system clock to 500ms. So in the worst
case, with 9 events to process, a total of 4500ms will pass just
blocked in calls to snd_seq_event_input(). Added to the total of
2100ms in usleep() calls, this gives a worst-case test time of
6600ms. The default default test timeout in libcheck is 4000ms,
and so we get occasional test timeout failures.

This commit increases the test-ble-midi timeout to 7000ms to avoid
these failures.
If a client re-opens a pcm immediately after closing the file
descriptor then there is a race between setting the "stopping"
flag and starting the new acquisition procedure. It is not
possible to make closing the fd and setting the flag into an
atomic operation, so this race in unavoidable and there is always
a non-zero risk that acquistion will collide with an in-progress
release procedure. This has been one of the causes of occasional
CI test failures in test-alsa-pcm:test-test_playback_hw_set_free.

The risk is significantly reduced by applying a short delay into
the acquisition procedure if the transport is not already idle.
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.22%. Comparing base (3851218) to head (bed15cd).

Files with missing lines Patch % Lines
test/test-alsa-midi.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #777      +/-   ##
==========================================
- Coverage   70.52%   70.22%   -0.30%     
==========================================
  Files         101      101              
  Lines       16788    16797       +9     
  Branches     2643     2645       +2     
==========================================
- Hits        11839    11796      -43     
- Misses       4833     4885      +52     
  Partials      116      116              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Insert a brief sleep before switching codecs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant