Bug 262982

Summary: REGRESSION(262625-262645@main?): [ Ventura+ arm64 ] 2 tests under imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/* are constantly failing.
Product: WebKit Reporter: Ben Schwartz <ben_schwartz>
Component: Web AudioAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cdumez, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=255427

Description Ben Schwartz 2023-10-10 15:20:08 PDT
The following tests are constantly failing on macOS Ventura+, arm64:

imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-audiobuffersource-connections.html
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections.html

HISTORY:

https://results.webkit.org/?suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fwebaudio%2Fthe-audio-api%2Fthe-audioparam-interface%2Fk-rate-audiobuffersource-connections.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fwebaudio%2Fthe-audio-api%2Fthe-audioparam-interface%2Fk-rate-dynamics-compressor-connections.html&platform=mac&recent=false&version_name=Ventura

TEXT DIFF (similar between the two):

 PASS   detune: mod.connect(tstNode[detune]) did not throw an exception.
 PASS   Expected k-rate detune AudioParam with input is not constantly 0.
 PASS   Actual k-rate detune AudioParam with input is not constantly 0.
-PASS   k-rate detune AudioParam with input equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
-PASS < [detune] All assertions passed. (total 11 assertions)
-PASS # AUDIT TASK RUNNER FINISHED: 2 tasks ran successfully.
+FAIL X k-rate detune AudioParam with input does not equal [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
+	Index	Actual			Expected		AbsError		RelError		Test threshold
+	[405]	1.120331e-1	1.120331e-1	7.450581e-9	6.650337e-8	0.000000e+0
+	[431]	1.205153e-1	1.205153e-1	7.450581e-9	6.182268e-8	0.000000e+0
+	[450]	1.267139e-1	1.267139e-1	1.490116e-8	1.175969e-7	0.000000e+0
+	[465]	1.316075e-1	1.316074e-1	1.490116e-8	1.132243e-7	0.000000e+0
+	[491]	1.400897e-1	1.400896e-1	1.490116e-8	1.063688e-7	0.000000e+0
+	...and 157 more errors.
+	Max AbsError of 5.960464e-8 at index of 1305.
+	[1305]	5.078439e-1	5.078438e-1	5.960464e-8	1.173681e-7	0.000000e+0
+	Max RelError of 1.189577e-7 at index of 787.
+	[787]	2.505288e-1	2.505288e-1	2.980232e-8	1.189577e-7	0.000000e+0
+ assert_true: expected true got false
+FAIL < [detune] 1 out of 11 assertions were failed. assert_true: expected true got false
+FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 2 tasks were failed. assert_true: expected true got false
 
DIFF URL:

https://build.webkit.org/results/Apple-Sonoma-Release-AppleSilicon-WK1-Tests/269139@main%20(219)/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-audiobuffersource-connections-pretty-diff.html

REPRODUCIBILITY:

I was able to reproduce this issue on macOS Ventura (13.5, 22G74/arm64) ToT using the following command:

run-webkit-tests --verbose --clobber-old-results imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-audiobuffersource-connections.html imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections.html

REGRESSION:

According to the flakiness dashboard, the regression point appears to be between 262625@main and 262645@main; however, the issue reproduces on a local environment when testing commits earlier than 262625@main.
Comment 1 Radar WebKit Bug Importer 2023-10-10 15:20:31 PDT
<rdar://problem/116768739>
Comment 2 Ben Schwartz 2023-10-10 15:23:36 PDT
Test expectations have already been filed for this issue under bug #255427.
Comment 3 Chris Dumez 2023-10-11 15:06:19 PDT
Likely just a precision issue. The test probably needs updating to allow for slightly less precise values. It is common with these web audio tests and is very hardware-specific.