[autotest-client-tests][PATCH] UBUNTU: SAUCE: ubuntu_kernel_selftests: allow ftrace to finish on riscv64 kernel

Po-Hsu Lin po-hsu.lin at canonical.com
Thu May 19 14:42:54 UTC 2022


The ftrace test in ubuntu_kernel_selftests cannot finish properly on
riscv64 kernels and causing the test result in "Incomplete" state.

This is because of the autotest framework timeout handling on RISCV64
instance is incorrect (lp:1940971). According to Dimitri's
investigation 1800 seconds timeout is actually reached in about 10
minutes. Thus the ftracetest test always got aborted early, leave the
whole test suite in a bad state.

To solve this, simply disable the timeout to give it a chance to
finish. It will take up to about 35 minutes to run on 5.13 kernel,
22 minutes on 5.15 kernel.

The potential risk for this change are:
  * If ftrace test hangs, we will need to wait until the 4 hours
    timeout on jenkins to kick in to terminate the jenkins job. But
    I think it's OK at the moment as all the other tests in
    ubuntu_kernel_selftests will take > 3 hours to run, we're not too
    far from this threshold.
  * Test shows with ftracetest running correctly, it will bring the
    time cost of ubuntu_kernel_selftests to 3h55m, very close to our
    4h bar on bare-metal jenkins. It's possible to see test being
    killed with jenkins timeout in the future. But there is nothing
    we can do unless we want to skip some tests.

Patch tested with F-5.13 / I-5.13 / J-5.15 RISCV instance, test can
finish properly with this patch.

Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
---
 ubuntu_kernel_selftests/control | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ubuntu_kernel_selftests/control b/ubuntu_kernel_selftests/control
index 30663f6d..f9cd20da 100644
--- a/ubuntu_kernel_selftests/control
+++ b/ubuntu_kernel_selftests/control
@@ -18,7 +18,8 @@ categories = ['breakpoints', 'cpu-hotplug', 'efivarfs', 'memfd', 'memory-hotplug
 #
 kver = platform.release().split(".")[:2]
 kver = int(kver[0])*100 + int(kver[1])
-if 'seccomp' in categories and kver > 418 and platform.machine() not in ['x86_64', 'ppc64le']:
+arch = platform.machine()
+if 'seccomp' in categories and kver > 418 and arch not in ['x86_64', 'ppc64le']:
     categories.remove('seccomp')
 
 result = job.run_test_detail(NAME, test_name='setup', tag='setup', timeout=60*45)
@@ -58,6 +59,10 @@ else:
                 timeout_threshold = 60*30
                 if item == 'ftracetest':
                     timeout_threshold = 60*45
+                    if arch == 'riscv64':
+                        # autotest timeout on riscv64 is incorrect (lp:1940080), disable it
+                        # It takes about 22 mins on 5.15 and about 35 mins on 5.13
+                        timeout_threshold = 0
                 test = "{}:{}".format(category, item)
                 job.run_test_detail(NAME, test_name=test, tag=test, timeout=timeout_threshold)
 
-- 
2.25.1




More information about the kernel-team mailing list