-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests to verify lack of sync loss in RX #761
Conversation
Need to figure out why |
Updated the test to check for and output any changes to the sync status once per second. This should probably happen more often, though. Would something like every 100ms be sufficient? |
This reverts commit de4f113.
@drowe67, OK, so I got RADE tests working on Windows in the GH action. (I know, not strictly necessary, but will be good once we start adding more test coverage.) Still waiting on Walter K5WH to give me results from his machine to update above. I'll ping him when I have a chance. |
That's a neat trick - is there any correlation between the tests failing in the GH actions environment and tests failing with real HW? Just trying to make sure the GH actions tests can trap at least a subset of bugs in this area. Yep results from a few typical machines/sound cards would be very useful. |
@tmiw - did the tests in this PR lead you to any improvements in the sound code, or was it all OK and passed the tests without modification? |
I've found some correlation on the Linux/PulseAudio side, at least. I also found some error handling bugs that will be handled separately: #772
I ended up fixing some issues with the PulseAudio side. Otherwise I think things mostly matched up. |
@drowe67, just added the results I got from Walter to the top of the PR. Looks like we might be good? |
Adds additional ctests to verify that FreeDV does not lose sync during RX.
Test Setup
Test Procedure
Linux/macOS
Example execution from Ubuntu 22.04 aarch64 VM with above hardware:
(Optional) Load is added by running X number of
yes >/dev/null &
untiltop
/Activity Monitor/other OS equivalent shows 75-80% CPU usage across all cores/threads before running the "With Load" tests.Windows
Copy
TestFreeDVFullDuplex.ps1
andfreedv-ctest-fullduplex.conf.tmpl
to the FreeDV install location (i.e.C:\Program Files\FreeDV 2.0.0...\bin
), then open PowerShell and execute the following:(replace the various audio devices and mode to test as needed; the iMic devices above are the ones corresponding to the USB audio device with the loopback cable.)
Note that you may need to mute and unmute audio in Windows to allow it to be passed through to FreeDV prior to initially executing tests (Windows bug?)
(Optional) For load tests, see https://am2.co/2018/06/generating-artificial-cpu-load/ for a script that will generate the CPU load needed.
Success Criteria
ctest
and the PowerShell script above start FreeDV in "full duplex" mode, causing TX and RX to occur at the same time. Because of the audio cable linking the Mic and Speaker ports on the USB audio device, FreeDV receives the signal that was just "transmitted". While this is happening, the tests look for "Sync changed" output on FreeDV'sstderr
and count the number of times this occurs. "Sync changed" occurs whenfreedv_get_sync()
/rade_get_sync()
changes from 0 to 1 (or vice versa). A "pass" is defined as this occurring only once, when FreeDV initially gets sync. Each scenario/mode must pass ten times in order for it to count as "passing".Test Results
No Load (FreeDV only active task)
Load Tests (Informational Only)
10/10 (50% load)