From patchwork Mon May 12 10:35:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 4158391 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2FD20BFF02 for ; Mon, 12 May 2014 10:35:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EE0F2021B for ; Mon, 12 May 2014 10:35:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7AF9720148 for ; Mon, 12 May 2014 10:35:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 111306E6EB; Mon, 12 May 2014 03:35:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by gabe.freedesktop.org (Postfix) with ESMTP id E36756E4C8 for ; Mon, 12 May 2014 03:35:25 -0700 (PDT) Received: by mail-we0-f182.google.com with SMTP id t60so6663595wes.13 for ; Mon, 12 May 2014 03:35:24 -0700 (PDT) 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=EH2qiK6XKn7rmFT5Qfn/VONbPBYqExdYdllGTGuC8rQ=; b=k2Ybk4pgxdtWJgkTDRj8o/EDHAD89NMgJIFZFfO6ljLV0QmDzTHGAlCkEojFlL1zD6 aWSMrGbZF55nkodrPu4G6PQQ/9JqFMH2KcFI16iTDd2lWlXazC1Z8Y+OvbGug00g5n5+ ZtCW8DFLwQZWYeKz2uUyzsGedx7qiiW6p9fddYaYMs1rWnfnrgqvirSWXZmvkNfM+Uon 2lLDra7m9W/OYh49Lz9yk99FuFlxXeBa03BULhci6WDf0pJyTcl7sIsWxEHNLRvIq6xI Gats4QpfUvrutX3bGUnyPLqsVfDzqlQIfad1VihcwK+0oqnUzKEjsOzqNp/8ukmfMIpH ZRKw== X-Gm-Message-State: ALoCoQlZgpqOHKny+cclvPcq3aMdJYDy5P7mIJO1I5+2a4bnWvpdjlwOPyz4rC8kN5HE8JWXbH/7 X-Received: by 10.194.19.161 with SMTP id g1mr20531399wje.20.1399890924930; Mon, 12 May 2014 03:35:24 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id cw2sm17362761wjb.39.2014.05.12.03.35.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 May 2014 03:35:24 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Mon, 12 May 2014 11:35:21 +0100 Message-Id: <1399890921-13068-2-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1399890921-13068-1-git-send-email-thomas.wood@intel.com> References: <1399890921-13068-1-git-send-email-thomas.wood@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/2] lib: set a timeout when reading crc values X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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=-4.8 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 Signed-off-by: Thomas Wood --- lib/igt_debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 4fd2e5a..0912f5b 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -459,7 +459,10 @@ static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out) ssize_t bytes_read; char buf[pipe_crc->buffer_len]; + igt_set_timeout(5); bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len); + igt_set_timeout(0); + igt_assert_cmpint(bytes_read, ==, pipe_crc->line_len); buf[bytes_read] = '\0';