From e147d4311f9bb08dcb24ebfa84abe75e75830e46 Mon Sep 17 00:00:00 2001 From: Eric Long Date: Fri, 11 Apr 2025 15:32:03 +0800 Subject: [PATCH] test: increase protocol-test-valgrind timeout Currently libei's valgrind test setup has 100x timeout (3000s), but the standalone protocol-test-valgrind still has 30s timeout, which is not enough for RISC-V hardware. On Milk-V Pioneer (SG2042) it takes ~70s to complete. In addition, `kill_gently` sends SIGKILL before the process terminates and fails the test. Bump protocol-test-valgrind timeout to 300s and increase timeout between kill signals to 3s to solve the issue. Part-of: --- test/meson.build | 3 ++- test/test_protocol.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/meson.build b/test/meson.build index 294d18e..c609f25 100644 --- a/test/meson.build +++ b/test/meson.build @@ -195,7 +195,8 @@ if enable_pytest args: pytest_args + ['-k', 'TestEiProtocol'], suite: 'python', workdir: meson.project_build_root(), - env: env + env: env, + timeout: 300 ) endif diff --git a/test/test_protocol.py b/test/test_protocol.py index 1f9949b..9f25eef 100644 --- a/test/test_protocol.py +++ b/test/test_protocol.py @@ -337,7 +337,7 @@ class Eis: stdout, stderr = None, None for _ in kill_gently(self.process): try: - stdout, stderr = self.process.communicate(timeout=1) + stdout, stderr = self.process.communicate(timeout=3) break except subprocess.TimeoutExpired: pass