From patchwork Thu Nov 13 11:59:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 5296021 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CA1149F2F1 for ; Thu, 13 Nov 2014 11:59:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9E07201ED for ; Thu, 13 Nov 2014 11:59:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0D21720136 for ; Thu, 13 Nov 2014 11:59:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 64DB56EB39; Thu, 13 Nov 2014 03:59:22 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by gabe.freedesktop.org (Postfix) with ESMTP id C65266EB39 for ; Thu, 13 Nov 2014 03:59:20 -0800 (PST) Received: by mail-wi0-f176.google.com with SMTP id ex7so687443wid.15 for ; Thu, 13 Nov 2014 03:59:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=QqbC+nl7Ckn4EvjdjUMS7Ink/SYiiL8jKNs2hlqRlcE=; b=IH3GvCb9MOd/I2kNTPpXU4W/mLy8UvhkORfIYGJjryrO1KoYkU1e8B/V5r12df8dZf Pj/Ja4LnmEjQwokRxbdGXoF2vT9rIceqEwmPwy0JjS49xb/xpHfdr5WhLKTW0ccBwaQg tx8CPqmYe+VDIVCn/vcpWDfaNgw9Gf/br5krXeW4HvRUVeiIVQhdnMSIR5sljyM8n8zT /yjf+ziwRrekyvXaadAdoZwuQjpyGciAv36bm8kjUBrSQenRhiOFjnvbFORx8AmozTTe a7X1M0oiM/XKI7jO24Qs71g0IrCltK873K7H0AGbmufcij69y3kzKtcxiaaSzZmx5RFg XQ+Q== X-Gm-Message-State: ALoCoQkZLPLaZJnICd8cEAEmiN8b3E+/W9YZE2WQtSoAlWr04eCyLIpWhU0Zx0NlRPCmhFh548KH X-Received: by 10.181.27.135 with SMTP id jg7mr3168704wid.56.1415879957471; Thu, 13 Nov 2014 03:59:17 -0800 (PST) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id lm9sm35237107wjc.45.2014.11.13.03.59.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2014 03:59:16 -0800 (PST) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Thu, 13 Nov 2014 11:59:05 +0000 Message-Id: <1415879945-3975-3-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1415879945-3975-1-git-send-email-thomas.wood@intel.com> References: <1415879945-3975-1-git-send-email-thomas.wood@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 3/3] lib: only skip subsequent tests if a timeout occurs outside of a subtest X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make timeout behaviour more consistent with igt_fail, where subsequent subtests are only skipped if the failure occurs outside of a subtest. Signed-off-by: Thomas Wood --- lib/igt_core.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 3861121..b937f43 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1481,9 +1481,6 @@ void igt_vlog(enum igt_log_level level, const char *format, va_list args) static void igt_alarm_handler(int signal) { - /* subsequent tests are skipped */ - skip_subtests_henceforth = SKIP; - /* exit with timeout status */ igt_fail(IGT_EXIT_TIMEOUT); } @@ -1492,11 +1489,13 @@ static void igt_alarm_handler(int signal) * igt_set_timeout: * @seconds: number of seconds before timeout * - * Stop the current test and skip any subsequent tests after the specified - * number of seconds have elapsed. The test will exit with #IGT_EXIT_TIMEOUT - * status. Any previous timer is cancelled and no timeout is scheduled if - * @seconds is zero. + * Fail a test and exit with #IGT_EXIT_TIMEOUT status after the specified + * number of seconds have elapsed. If the current test has subtests and the + * timeout occurs outside a subtest, subsequent subtests will be skipped and + * marked as failed. * + * Any previous timer is cancelled and no timeout is scheduled if @seconds is + * zero. */ void igt_set_timeout(unsigned int seconds) {