From patchwork Mon Mar 30 10:30:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 6119791 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D75DA9F32E for ; Mon, 30 Mar 2015 10:30:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 177B7203AD for ; Mon, 30 Mar 2015 10:30:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C2F8920374 for ; Mon, 30 Mar 2015 10:30:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1DBB86E081; Mon, 30 Mar 2015 03:30:45 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 41CEA6E081 for ; Mon, 30 Mar 2015 03:30:43 -0700 (PDT) Received: by wibg7 with SMTP id g7so97204129wib.1 for ; Mon, 30 Mar 2015 03:30:42 -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:cc:subject:date:message-id; bh=A07Ou+bgWiz2WvxWK8xLyaek+zx9JlKSPm70ha87b9k=; b=gOj3U9IrVMROIpi6D/zshVW20jLWPdZX5OkCnMHi/tsYAOwm9XcSNZ/I3m/rdXmyu2 jNhSwC2cNQoCfcb7FC0ExE3p9ARQYHHmIlFMe4pdlgfQKUmChgAh6WJixZui6JXkJetx /Sbohs+Z4nGeL34FWhMvmBUrfDk7w/svnQ1Q+NCNCBk85jCnFvp0mHECWxgEv4zDXiK9 Ri3YxOo1JLGP0jDGPu1vbDsLxb/1AolUZPEeVThXUFcmrPIPsKQ4skJHGSc8AlW3GZXi hUgnbxZShIt2se6vmlKFgDHD9uZpnwNhEEZ4LCnSTaNk7JSn3/ec91FtMktw1aezKOv8 JhIw== X-Gm-Message-State: ALoCoQmt2QlrFlkAMZ8/l8hWPTJUte/53KjRSW+EwJJHogqsV1jjVUEB/bqW5eV2Mm1KNjfIxvDA X-Received: by 10.194.85.129 with SMTP id h1mr62982090wjz.147.1427711442172; Mon, 30 Mar 2015 03:30:42 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id g2sm19455879wib.1.2015.03.30.03.30.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2015 03:30:41 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Mon, 30 Mar 2015 11:30:41 +0100 Message-Id: <1427711442-4083-1-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 2.1.0 Subject: [Intel-gfx] [PATCH i-g-t 1/2] gem_exec_blt: fix subtest enumeration 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 Wrap the sysfs_read and sysfs_write calls in an igt_fixture block so they are not executed during subtest enumeration. Cc: Chris Wilson Signed-off-by: Thomas Wood --- tests/gem_exec_blt.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c index 8f03b20..820478c 100644 --- a/tests/gem_exec_blt.c +++ b/tests/gem_exec_blt.c @@ -384,8 +384,10 @@ int main(int argc, char **argv) return 0; } - min = sysfs_read("gt_min_freq_mhz"); - max = sysfs_read("gt_max_freq_mhz"); + igt_fixture { + min = sysfs_read("gt_min_freq_mhz"); + max = sysfs_read("gt_max_freq_mhz"); + } for (r = rps; r->suffix; r++) { igt_fixture r->func(); @@ -400,10 +402,12 @@ int main(int argc, char **argv) run(OBJECT_SIZE, true); } - if (min > 0) - sysfs_write("gt_min_freq_mhz", min); - if (max > 0) - sysfs_write("gt_max_freq_mhz", max); + igt_fixture { + if (min > 0) + sysfs_write("gt_min_freq_mhz", min); + if (max > 0) + sysfs_write("gt_max_freq_mhz", max); + } igt_exit(); }