From patchwork Tue Jan 22 03:50:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 14203 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B976323E2E for ; Tue, 22 Jan 2013 03:51:02 +0000 (UTC) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by fiordland.canonical.com (Postfix) with ESMTP id 705E1A18827 for ; Tue, 22 Jan 2013 03:51:02 +0000 (UTC) Received: by mail-ve0-f180.google.com with SMTP id cz11so420060veb.11 for ; Mon, 21 Jan 2013 19:51:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=Qh+nxz9X4PX3Dtq9ZP8Aw7XaoH5eMcmJ+3FzR77Ph7o=; b=RdjBgwh0LIcvetaQDOyLFGKa5Re0/faMBvy2KIx0rvial1d3jK2AOUnOrVmd4OPR95 nmj/Ms21R0FgLfzbMyj2aj1KN+0SLmuNH7dGJddEP8xn+AWY6cayJftDSaoYgVFh7AiO 64kpmbRdK9sc7DDf0uaRpz1whTqcgqE/t8WBsHGON4Yx7oozOp3yVuMFFANWOSlGCK0i WUFaMJFBkwaRNmRNFWbeQghpWMgovwBLgaSwjgc2WqVROAAG+sGNSIny2fj9XrsyGAFM 9iWH5mA0kRvBV1UXBZTDv3k7Zv0KEJ+3bPQ8LTfxyc+wihUHvf/Ar38W1dJPbiEFmuwa PD7w== X-Received: by 10.220.238.139 with SMTP id ks11mr21549679vcb.49.1358826661945; Mon, 21 Jan 2013 19:51:01 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp232201veb; Mon, 21 Jan 2013 19:51:01 -0800 (PST) X-Received: by 10.50.151.238 with SMTP id ut14mr10530679igb.72.1358826661400; Mon, 21 Jan 2013 19:51:01 -0800 (PST) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx.google.com with ESMTPS id cf7si15803646icc.39.2013.01.21.19.51.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 19:51:01 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.178 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=209.85.223.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.223.178 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) smtp.mail=tom.gall@linaro.org Received: by mail-ie0-f178.google.com with SMTP id c12so10814899ieb.23 for ; Mon, 21 Jan 2013 19:51:01 -0800 (PST) X-Received: by 10.50.152.198 with SMTP id va6mr10858156igb.42.1358826661142; Mon, 21 Jan 2013 19:51:01 -0800 (PST) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id e9sm10009971igp.11.2013.01.21.19.50.59 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 19:51:00 -0800 (PST) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 2/2] shader_runner.c only read one [require] section Date: Mon, 21 Jan 2013 21:50:45 -0600 Message-Id: <1358826645-31350-2-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358826645-31350-1-git-send-email-tom.gall@linaro.org> References: <1358826645-31350-1-git-send-email-tom.gall@linaro.org> X-Gm-Message-State: ALoCoQmZtp/cobw/K3yql3TDQf58/mJDYZHRL4B+lUb3gVkokol/YddYEMtLeh5kmKp34n3wIkei When shader_runner parses the shader_test data file, only parse one [required] section, no longer parse the rest of the file. v2: better description. Remove warning. Signed-off-by: Tom Gall --- tests/shaders/shader_runner.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 8dfeb2a..d83228e 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -868,8 +868,12 @@ parse_required_versions(struct requirement_parse_results *results, } while (line[0] != '\0') { - if (line[0] == '[') - in_requirement_section = false; + if (line[0] == '[') { + if (in_requirement_section) + break; + else + in_requirement_section = false; + } if (!in_requirement_section) { if (string_match("[require]", line)) {