From patchwork Thu Nov 13 11:59:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 5296011 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 19FCB9F2F1 for ; Thu, 13 Nov 2014 11:59:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 565CE201ED for ; Thu, 13 Nov 2014 11:59:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8850120136 for ; Thu, 13 Nov 2014 11:59:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBF536EB37; Thu, 13 Nov 2014 03:59:16 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AF9A6EB37 for ; Thu, 13 Nov 2014 03:59:15 -0800 (PST) Received: by mail-wi0-f171.google.com with SMTP id r20so8011758wiv.10 for ; Thu, 13 Nov 2014 03:59:14 -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=UIbDJnhg9Ub/pNRSgcFMKOBZeuD/FRKGUgkfooH6PLU=; b=YhTwWW3KixM1zUQgw9uiQjM5AAzAkq7FSAH7fH2MdiqYuP39465O3jCxUYqIRgA6AK KVBN1XTBLlXZvf2zYRB9kh9amyyOgg0XNrtMItovCrHK+VUcIZYkAQw+F4e7iMJO36NS ogEeL1Slt9iEMbDLiwbnhWanqxgQho790JAKR7lQ/Xjd+uEIm0Ab6SY5RCWyfXlcRRD/ eKSm/SZwLHrWsXG4tsAkCsc/GF3gypCDUSFUFesJgYvybDMKUGI2n79eLU3cLB5Rvz+S k5X9DH6ySsOtTy9WqgFAh845vDLGdTWq+AYNhQ6v15stvM/RO83CRJDijd4YvU3OVQoJ e6mA== X-Gm-Message-State: ALoCoQmZwEBeTTBnqe/ZZwzLdH5QnGH4VUaWOyHc8R3n4wM5m+s+9wTGpmmG8Dnk+EG+GFY+sg0Y X-Received: by 10.180.86.38 with SMTP id m6mr3048920wiz.65.1415879954219; Thu, 13 Nov 2014 03:59:14 -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.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2014 03:59:13 -0800 (PST) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Thu, 13 Nov 2014 11:59:04 +0000 Message-Id: <1415879945-3975-2-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 2/3] tests/kms_flip: add a timeout for the nonblocking-read test 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 kms_flip/nonblocking-read will block indefinitely if it fails, so introduce a timeout to indicate test failure. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718 Signed-off-by: Thomas Wood --- tests/kms_flip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 612d7a9..cce9594 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1521,7 +1521,9 @@ static void test_nonblocking_read(int in) } igt_require(ret != -1); + igt_set_timeout(5); ret = read(fd, buffer, sizeof(buffer)); + igt_set_timeout(0); igt_assert_eq(ret, -1); igt_assert_eq(errno, EAGAIN);