Skip to contentSkip to conversation

kselftest/alsa: Increase kselftest timeout

PATCH Superseded Nícolas F. R. A. Prado 4 participants 6 messages Dec 13, 2022 – Jun 16, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kselftest/alsa: Increase kselftest timeout

The default timeout for kselftests is 45 seconds, but pcm-test can take longer than that to run depending on the number of PCMs present on a device.

As a data point, running pcm-test on mt8192-asurada-spherion takes about 1m15s.

Set the timeout to 10 minutes, which should give enough slack to run the test even on devices with many PCMs.

---

 tools/testing/selftests/alsa/settings | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 tools/testing/selftests/alsa/settings
tools/testing/selftests/alsa/settings new file +1 -0
new file mode 100644
index 000000000000..a62d2fa1275c
@@ -0,0 +1 @@
+timeout=600
Signature · 1 line
2.39.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Nícolas F. R. A. Prado

The default timeout for kselftests is 45 seconds, but pcm-test can take longer than that to run depending on the number of PCMs present on a device.

This is also useful for mixer-test with slower control buses and fancier CODECs.

maintainer
#2 lore raw
In reply to Nícolas F. R. A. Prado
Quoted 10 lines · Nícolas F. R. A. Prado

The default timeout for kselftests is 45 seconds, but pcm-test can take longer than that to run depending on the number of PCMs present on a device.

As a data point, running pcm-test on mt8192-asurada-spherion takes about 1m15s.

Set the timeout to 10 minutes, which should give enough slack to run the test even on devices with many PCMs.

10 minutes is way too long.

Quoted 14 lines

---

  tools/testing/selftests/alsa/settings | 1 +
  1 file changed, 1 insertion(+)

create mode 100644 tools/testing/selftests/alsa/settings

tools/testing/selftests/alsa/settings new file +0 -0
new file mode 100644
index 000000000000..a62d2fa1275c

tools/testing/selftests/alsa/settings line 1

Quoted 1 line
tools/testing/selftests/alsa/settings new file +1 -0
@@ -0,0 +1 @@
+timeout=600

Adding timeouts like this especially 10 minutes will increase the time it takes to run tests. We run the risk of people not wanting to run tests anymore.

thanks,
-- Shuah

#3 lore raw
Quoted 22 lines · Shuah Khan
Quoted 10 lines · Nícolas F. R. A. Prado

The default timeout for kselftests is 45 seconds, but pcm-test can take longer than that to run depending on the number of PCMs present on a device.

As a data point, running pcm-test on mt8192-asurada-spherion takes about 1m15s.

Set the timeout to 10 minutes, which should give enough slack to run the test even on devices with many PCMs.

10 minutes is way too long.

Quoted 8 lines

---

  tools/testing/selftests/alsa/settings | 1 +
  1 file changed, 1 insertion(+)

create mode 100644 tools/testing/selftests/alsa/settings

Quoted 11 lines

tools/testing/selftests/alsa/settings line 1

Quoted 7 lines
tools/testing/selftests/alsa/settings new file +1 -0
new file mode 100644
index 000000000000..a62d2fa1275c
@@ -0,0 +1 @@
+timeout=600

Adding timeouts like this especially 10 minutes will increase the time it takes to run tests. We run the risk of people not wanting to run tests anymore.

I set it high because I suspect the time it takes to run pcm-test might be a lot higher in some machines (even on mt8192-asurada-spherion, it takes 1m15s, but only ~10% of the tests are actually running, since many of the PCMs are disabled).

But I can lower it to, say, 3 minutes, and we can increase the timeout as needed.

Thanks,
Nícolas

#4 lore raw
In reply to Shuah Khan

Hi Shuah,

Bumping an old thread, this is still an issue for this test [1] and it could end up affecting many others.

Quoted 5 lines · Shuah Khan
Quoted 4 lines · Nícolas F. R. A. Prado

The default timeout for kselftests is 45 seconds, but pcm-test can take longer than that to run depending on the number of PCMs present on a device.

Quoted 8 lines
Quoted 6 lines

As a data point, running pcm-test on mt8192-asurada-spherion takes about 1m15s.

Set the timeout to 10 minutes, which should give enough slack to run the test even on devices with many PCMs.

10 minutes is way too long.

Is there a downside to that? There'll be some tests that take more time, I don't think that's a problem with the tests or a reason to let them timeout. IMO it's the test framework which should adapt to the needs of different types of tests, and the solution provided by this patch is good enough, it addresses the problem for this particular test suite.

If the solution is still unacceptable, do you have an alternative proposal in mind that we can try to implement?

Thanks,
Ricardo

[1] https://linux.kernelci.org/test/case/id/646127cf62438996ba2e8648/

#5 lore raw

Hi Shuah,

Gentle ping for this

Quoted 8 lines · Ricardo Cañuelo

Is there a downside to that? There'll be some tests that take more time, I don't think that's a problem with the tests or a reason to let them timeout. IMO it's the test framework which should adapt to the needs of different types of tests, and the solution provided by this patch is good enough, it addresses the problem for this particular test suite.

If the solution is still unacceptable, do you have an alternative proposal in mind that we can try to implement?

There are some tests failing because of this and we're trying to address these problems to clean up the regression results.

Thanks,
Ricardo