graphics: harden weston-simple-egl against wall-clock steps - #552
Merged
Srikanth Muppandam (smuppand) merged 2 commits intoAug 26, 2026
Conversation
Srikanth Muppandam (smuppand)
approved these changes
Aug 26, 2026
Srikanth Muppandam (smuppand)
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Srikanth Muppandam (smuppand)
self-requested a review
August 26, 2026 08:20
Srikanth Muppandam (smuppand)
requested changes
Aug 26, 2026
Ricardo Salveti (ricardosalveti)
force-pushed
the
harden-weston-egl-clock-step
branch
2 times, most recently
from
August 26, 2026 15:37
c609604 to
5399afc
Compare
Ricardo Salveti (ricardosalveti)
force-pushed
the
harden-weston-egl-clock-step
branch
from
August 26, 2026 16:03
5399afc to
1f90f47
Compare
Boards without a valid RTC boot at the epoch, get bumped to a build-time fallback by systemd, then stepped to real time once NTP reaches them: rtc-pm8xxx ...: setting system clock to 1970-01-01T00:00:16 UTC (16) A step landing inside a measurement invalidates every wall-clock interval taken across it. Add get_monotonic_seconds() for interval measurement, clock_step_seconds() to report how far the wall clock moved beyond an interval's monotonic duration, and wait_for_time_sync() to settle the clock beforehand, bounded and skipped when no time source exists. These live in functestlib.sh rather than lib_display.sh because nothing about them is display-specific; they validate input through the existing is_unsigned_number(), and rt_now_seconds() in lib_rt.sh now delegates to get_monotonic_seconds() instead of carrying its own copy, so display and real-time suites share one timing implementation. Whether a time source exists is decided by time_sync_service_active(), not by timedatectl being installed: timedatectl ships on every systemd image, configured or not, and waiting on its presence alone would stall every run on images with no synchronization service. Check the timedated NTP property, the systemd-timesyncd runtime directory, and running systemd-timesyncd, chronyd or ntpd daemons instead. Also count single-frame samples in display_parse_fps_log() and export DISPLAY_FPS_SINGLE_FRAME. A clock step turns every reporting window into one, so a high count next to a healthy max distinguishes bad samples from slow rendering. Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
weston-simple-egl fails intermittently on iq-9075-evk while every other test on the same boot passes, including weston-simple-shm and KMSCube. A failing run: Client finished, rc=143 elapsed=2885113s FPS stats, samples=1471 avg=0.253841 min=0.200000 max=74.800003 A passing run on the same board: Client finished, rc=143 elapsed=30s FPS stats, samples=4 avg=74.850002 min=74.800003 max=75.000000 The difference is not the GPU. In failing runs the clock steps 33 days mid-measurement, from the image's build-time fallback to real time, which is the 2885113s. The client's frame accounting jumps with it and prints one single-frame report per frame; those flood the sample set and drag the mean under the gate, even though the first window read 74.8 fps, the same figure the passing run averages on a 75Hz link. Whether the correction lands inside the 30s window is timing, hence the flakiness. Wait for the clock to settle, take elapsed from a monotonic source, and check for a step afterwards. When one occurred, report SKIP rather than asserting on numbers that cannot be right, and record the step size and single-frame count in the summary. The wait bound and step tolerance are tunable through TIME_SYNC_WAIT and CLOCK_STEP_TOLERANCE, exposed as parameters in the LAVA test definition so jobs can override them consistently. Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Ricardo Salveti (ricardosalveti)
force-pushed
the
harden-weston-egl-clock-step
branch
from
August 26, 2026 16:12
1f90f47 to
f4b03bb
Compare
Srikanth Muppandam (smuppand)
approved these changes
Aug 26, 2026
Srikanth Muppandam (smuppand)
merged commit Aug 26, 2026
abe0960
into
qualcomm-linux:main
14 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
weston-simple-egl fails intermittently on iq-9075-evk while every other test
on the same boot passes, including weston-simple-shm, KMSCube and core_auth,
with EGL running on real hardware (freedreno FD663).
Failing run:
Passing run, same test, same board:
The difference is not the GPU. These boards have no valid RTC:
systemd bumps the clock to the image's build-time fallback, and NTP later
steps it 33 days to real time — that is the 2885113s. When the step lands
inside the 30s window the client's frame accounting jumps with it and prints
one single-frame report per frame; those flood the sample set and drag the
mean under the gate, even though the first window read 74.8 fps, the same
figure the passing run averages on a 75Hz link. Whether the correction lands
inside the window is timing, hence the flakiness.
Wait for the clock to settle before measuring, take elapsed from a monotonic
source, and check for a step afterwards. When one occurred, report SKIP
instead of asserting on numbers that cannot be right, and record the step
size and single-frame count in the summary.
Single-frame samples are counted, not filtered out: dropping them would hide
this flake but would equally hide a genuine 0.2 fps regression.
Tested:
single=0; the 1471-line stepped log gives single=1470
step, and malformed input
Runner/suites/Multimedia/Graphics/X11_GLX/run.sh uses the same FPS parser and
has the same exposure; left alone here for lack of failing data.