[PATCH] tests/qemu-iotests/183: Fix timeout issue when running tests in parallel

Thomas Huth posted 1 patch 9 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230814145124.886292-1-thuth@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
tests/qemu-iotests/183 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH] tests/qemu-iotests/183: Fix timeout issue when running tests in parallel
Posted by Thomas Huth 9 months, 1 week ago
When running "make check-block SPEED=slow -j$(nproc)", the test 183
fails due to the very low default timeout value since the system is
quite loaded and thus slower in this case. We need a much higher
value when running tests in parallel, so let's try to detect this
situation by looking for "-j..." in the MAKEFLAGS environment variable.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 PS: Yeah, I know, this is a little bit ugly ... if someone has a better
 idea how to fix this, please let me know.

 tests/qemu-iotests/183 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/183 b/tests/qemu-iotests/183
index ee62939e72..b50e0d2b85 100755
--- a/tests/qemu-iotests/183
+++ b/tests/qemu-iotests/183
@@ -97,7 +97,9 @@ if echo "$reply" | grep "compiled without old-style" > /dev/null; then
 fi
 
 timeout_comm=$QEMU_COMM_TIMEOUT
-if [ "${VALGRIND_QEMU}" == "y" ]; then
+if echo "$MAKEFLAGS" | grep -q "\-j"; then
+    QEMU_COMM_TIMEOUT=10
+elif [ "${VALGRIND_QEMU}" == "y" ]; then
     QEMU_COMM_TIMEOUT=4
 else
     QEMU_COMM_TIMEOUT=0.1
-- 
2.39.3