From patchwork Wed Jul 12 09:17:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abdiel Janulgue X-Patchwork-Id: 9836377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA38260393 for ; Wed, 12 Jul 2017 09:19:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC497285B5 for ; Wed, 12 Jul 2017 09:19:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0C18285DB; Wed, 12 Jul 2017 09:19:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ADA09285B5 for ; Wed, 12 Jul 2017 09:19:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E52A36E380; Wed, 12 Jul 2017 09:19:49 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 79A386E380 for ; Wed, 12 Jul 2017 09:19:48 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2017 02:19:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,349,1496127600"; d="scan'208";a="110354768" Received: from skylake-nuc.fi.intel.com ([10.237.72.185]) by orsmga002.jf.intel.com with ESMTP; 12 Jul 2017 02:19:46 -0700 From: Abdiel Janulgue To: intel-gfx@lists.freedesktop.org Date: Wed, 12 Jul 2017 12:17:24 +0300 Message-Id: <1499851044-4678-1-git-send-email-abdiel.janulgue@linux.intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH i-g-t] tests/debugfs_test: Add a shorter timeout when reading sysfs entries 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-Virus-Scanned: ClamAV using ClamSMTP This allows us to proceed gracefully without invoking the global CI-level timeout especially when opening the buggy crtc-data file descriptor. Signed-off-by: Abdiel Janulgue Reviewed-by: Arkadiusz Hiler --- tests/debugfs_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c index fb1735b..aefc123 100644 --- a/tests/debugfs_test.c +++ b/tests/debugfs_test.c @@ -52,8 +52,11 @@ static void read_and_discard_sysfs_entries(int path_fd, bool is_crc) read_and_discard_sysfs_entries(sub_fd, !strcmp(dirent->d_name, "crc")); close(sub_fd); } else { - char *buf = igt_sysfs_get(path_fd, dirent->d_name); + char *buf; + igt_set_timeout(5, "reading sysfs entry"); + buf = igt_sysfs_get(path_fd, dirent->d_name); + igt_reset_timeout(); /* * /crtc-XX/crc/data may fail with -EIO if the CRTC * is not active.