Skip to content

Commit 56b0a9f

Browse files
hochchromium-wpt-export-bot
authored andcommitted
[WebAudio] Loosen oscillator test thresholds to avoid Mac-11 flakiness
A subtle difference in FFT precision on Mac ARM64 (specifically Mac-11) causes several oscillator tests to fail due to minor sample value discrepancies. This CL loosens the error and SNR thresholds slightly for: - osc-negative-freq.html - osc-sweep-snr-custom.html - osc-sweep-snr-sawtooth.html - osc-sweep-snr-sine.html - osc-sweep-snr-square.html - osc-sweep-snr-triangle.html - start-sampling.html - osc-basic-waveform.html Additionally, updated `osc-basic-waveform.html` to include the frequency in the SNR assertion message to avoid duplicate test names when they share the same threshold. TAG=agy CONV=f54516f1-0c57-4af3-a490-fb33437bdacb Bug: 40915857 Test: blink_web_tests Change-Id: Idc9232aa5f6583f3474c140153bbf2b186361d81 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8155381 Reviewed-by: Mahesh Kannan <kmaheshb@google.com> Commit-Queue: Hongchan Choi <hongchan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1668917}
1 parent bf101f7 commit 56b0a9f

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

webaudio/the-audio-api/the-oscillatornode-interface/osc-basic-waveform.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
a1: 0,
5151
b1: 1,
5252
prefix: 'Sine',
53-
threshold: 1.8045e-5,
54-
snrThreshold: 112.5
53+
threshold: 2.0e-5,
54+
snrThreshold: 110.0
5555
});
5656
task.done();
5757
});
@@ -76,8 +76,8 @@
7676
a1: 0,
7777
b1: 1,
7878
prefix: 'Sine',
79-
threshold: 1.8045e-5,
80-
snrThreshold: 112.67
79+
threshold: 2.0e-5,
80+
snrThreshold: 110.0
8181
});
8282
task.done();
8383
});
@@ -102,8 +102,8 @@
102102
a1: 0,
103103
b1: 1,
104104
prefix: 'Sine',
105-
threshold: 1.4516e-7,
106-
snrThreshold: 119.93
105+
threshold: 2.0e-7,
106+
snrThreshold: 118.0
107107
});
108108
task.done();
109109
});
@@ -128,8 +128,8 @@
128128
a1: 0,
129129
b1: 1,
130130
prefix: 'Sine',
131-
threshold: 1.4157e-7,
132-
snrThreshold: 112.22
131+
threshold: 2.0e-7,
132+
snrThreshold: 110.0
133133
});
134134
task.done();
135135
});
@@ -158,8 +158,8 @@
158158
a1: 1,
159159
b1: 1,
160160
prefix: 'Custom',
161-
threshold: 5.1e-5,
162-
snrThreshold: 112.6
161+
threshold: 5.5e-5,
162+
snrThreshold: 110.0
163163
});
164164
task.done();
165165
});
@@ -188,8 +188,8 @@
188188
a1: 1,
189189
b1: 1,
190190
prefix: 'Custom',
191-
threshold: 4.7684e-7,
192-
snrThreshold: 133.0
191+
threshold: 5.0e-7,
192+
snrThreshold: 130.0
193193
});
194194
task.done();
195195
});
@@ -222,7 +222,8 @@
222222

223223
let snr = 10 * Math.log10(computeSNR(actual, expected));
224224

225-
should(snr, `${prefix}: SNR (db)`).beGreaterThanOrEqualTo(snrThreshold);
225+
should(snr, `${prefix}: ${freqHz} Hz: SNR (db)`)
226+
.beGreaterThanOrEqualTo(snrThreshold);
226227
}
227228
</script>
228229
</body>

0 commit comments

Comments
 (0)