From patchwork Tue Aug 2 09:50:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594862 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp4218207maz; Tue, 2 Aug 2022 03:30:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sPD3CxqMm/hxfS6/4ogadATiN6Ob/1+2zPsfQpZ9ZEsmf4RvYEFGuecSMEwrEy21VSIxPZ X-Received: by 2002:a05:622a:49:b0:31f:27b7:ff54 with SMTP id y9-20020a05622a004900b0031f27b7ff54mr17624945qtw.602.1659436236117; Tue, 02 Aug 2022 03:30:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659436236; cv=none; d=google.com; s=arc-20160816; b=MgI3shlWkg2casx1pZ2rR3dK1mYubjEJ90RY3lrp4RA2KCBbBLkFX1TVt3DErx4g+I y0OE3Op3V1YIBZyOPU69zzoJB6QUuHnPI4ePX3gfKwt/zNcn6QPv5yTJHl41bXxe0tQq tRBqGKNKa1SY+achqe+yDE6nJ9lDFeb1bAcPbJLOZ+bsOW739tM3VrusNp3JoEFpxDks J4Zvsmjmj+SGhSjnJKBSPWPInq5rLZbnVNqPa0nML4c5ASD6JAPXcYfcxu25NwR8JeX6 hHQIYFJ87Z6NXquiBFUe0dgoq/jZCQ+AbMNhUwiz4bcTkFuRktQETEj/OYzJ8wVTZRm4 mqEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c6gCqIJw8yCV7CUCpwJSaqkLGHMke2sDpgsD4kivFT0=; b=bvoA8sGgAZmPIn4Vj0ylikv9kirZmSgTaoOBRZDR23cl8P0a4zmuysBtwbGJ2aGEVQ XHc9q3LFZ4sxSFmYA/APcc6HyrvAeQOMaHHs2y32yze8fVLPyMAV+PD7Ckf8fDRhBWuF ZrQWCPI8WuA99HGvzFwu1hr+5qx0SCGpM0mVqBXgvLv8RtSD7WG1CeUN1MamMWQaq6Cs HtViZv3s8AF2CoadIGjV8TIvPZKy/KgP6s7fLFo9ZLMKBptdPuGRsXFptYAo5b+VEX54 6GC1WnOhSrDPDJsJKbPsM5PrTbWlPOIbPADBQ+oadyNndrQYKl4sCfMUCHCDpAEuvKNu z37Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z6InKbnX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bv21-20020a05622a0a1500b0031814e04df1si7762249qtb.162.2022.08.02.03.30.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Aug 2022 03:30:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z6InKbnX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIpAZ-0000pN-Be for patch@linaro.org; Tue, 02 Aug 2022 06:30:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIohN-00055Y-D4 for qemu-devel@nongnu.org; Tue, 02 Aug 2022 06:00:25 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIohI-0006Oa-Iw for qemu-devel@nongnu.org; Tue, 02 Aug 2022 06:00:25 -0400 Received: by mail-wr1-x434.google.com with SMTP id bv3so3283905wrb.5 for ; Tue, 02 Aug 2022 03:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=c6gCqIJw8yCV7CUCpwJSaqkLGHMke2sDpgsD4kivFT0=; b=z6InKbnXMEFjzUDcE1l2HPIZfCAminWu0mPvyhTzaP+hTtpI4yJiBGyXfyRIGcEZcC 9IVlu3nXdNK9OlLdqpcPSqup7dxDAHtiXd5T9giGZA49a2Nqs6cxodsv/fP5/gly2BW5 +Q+5aUbvpyA21aHHyDPBSW9+HCSToixsRbNxNmUtmchz/mkEjCN4maTyQvDb4L4ZJB1/ cyU8VyrImvciokmcdWwq85HMDPy+WwQtwkTxqSXMQrdJ606SxcSpcTfDMy0GOLB2QGRS G3s20jd7gYjLwaAR8AYL8khzLzuLavEDY+kAjsxWd32stOc7GTvigwd3bX67JWpDHbdK 8Umw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=c6gCqIJw8yCV7CUCpwJSaqkLGHMke2sDpgsD4kivFT0=; b=n0DgQ7HZaJMJQks2t+64k/z8tCUZiDH4opUmQdVb0J3WbILzx1C0Gh/Fe18FYBBaeU mpJTjjl8qLgf8L45wpMrx0Ut/N5PgJVqIiDnTXMlm8oG+UdXfLbVpFR78ZK52uzTXnWc 0LFl+jI0m2rnxkM2r9tcntuc1EMd+aM5HDKvJh7ZL0AxHL2X9w1gMmnUWLukN6qW2fXy Qnw4m+tCoLX/YwQGUXeUud/FpU+WateacUo642fm/6jfKFzHJ+mGcPfxu1hv07rcuNcr 0f0mN4pDiP5s0GOau8hh/hO9uuZJobjU0UxdjpefqNb2S82+KmuUw/ivkHUe9n/nUdrn dXWQ== X-Gm-Message-State: ACgBeo0b8U5NYpIwQia5q0eJ/dvs5F9Xjp0AfXONTi9f6SePMRjPuB7R gBJ+MBOUYkBmBtfZBZGFWVrqug== X-Received: by 2002:a05:6000:178d:b0:21d:a453:b7c6 with SMTP id e13-20020a056000178d00b0021da453b7c6mr13635813wrg.275.1659434419258; Tue, 02 Aug 2022 03:00:19 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id k18-20020a5d6292000000b0021ec32d130asm14765519wru.74.2022.08.02.03.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 03:00:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 143F91FFC7; Tue, 2 Aug 2022 10:50:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: slp@redhat.com, mst@redhat.com, marcandre.lureau@redhat.com, stefanha@redhat.com, mathieu.poirier@linaro.org, viresh.kumar@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v4 15/22] tests/qtest: add a timeout for subprocess_run_one_test Date: Tue, 2 Aug 2022 10:50:03 +0100 Message-Id: <20220802095010.3330793-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220802095010.3330793-1-alex.bennee@linaro.org> References: <20220802095010.3330793-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hangs have been observed in the tests and currently we don't timeout if a subprocess hangs. Rectify that. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- v3 - expand timeout to 180 at Thomas' suggestion v4 - fix merge conflict with earlier patch --- tests/qtest/qos-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/qos-test.c b/tests/qtest/qos-test.c index 01a9393399..d958ef4be3 100644 --- a/tests/qtest/qos-test.c +++ b/tests/qtest/qos-test.c @@ -185,7 +185,7 @@ static void run_one_test(const void *arg) static void subprocess_run_one_test(const void *arg) { const gchar *path = arg; - g_test_trap_subprocess(path, 0, + g_test_trap_subprocess(path, 180 * G_USEC_PER_SEC, G_TEST_SUBPROCESS_INHERIT_STDOUT | G_TEST_SUBPROCESS_INHERIT_STDERR); g_test_trap_assert_passed();