From patchwork Fri Mar 6 18:59:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hurley X-Patchwork-Id: 5957341 Return-Path: X-Original-To: patchwork-linux-arm@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 D00769F380 for ; Fri, 6 Mar 2015 19:02:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 148E5201F5 for ; Fri, 6 Mar 2015 19:02:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2DD38200F3 for ; Fri, 6 Mar 2015 19:02:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTxU5-0001c0-1j; Fri, 06 Mar 2015 19:00:29 +0000 Received: from mail-qc0-f179.google.com ([209.85.216.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTxTy-0000MK-Df for linux-arm-kernel@lists.infradead.org; Fri, 06 Mar 2015 19:00:23 +0000 Received: by qcwb13 with SMTP id b13so15155628qcw.9 for ; Fri, 06 Mar 2015 11:00:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=RDntDfQjd/bToeuBU9dcNCQAdPTOkVYVG8V2Z8brHGg=; b=I9jZb0kVZG6dmyVJgcRxkwcJfiomib6PfudmPNi2smhDU3A2CNK7iRqDRwEj6YjZWZ kL1Szb88vGgwiun1FDQ2QKezblKp4YeG8UOI0UbP6wccVXYgGeENxmbRHoPSqXLo7Kls KsyWuDFUdP3QcSXRnFzf7E8VuwH6jx7lQvhS0vVLYeveTvhoHTLDTp1G4+5D9w5+4F+n Ib3BvXNP9MBNKbxn2syQQtI5rDmByrCZJIbBrigIL57B40k6bA7lWhCQHsH54cyLfEpQ Ag4Z6dyuBDK913uATKR2TFTujYFALoZvgdqcPzSX6yfNvdfor6QtZT6a6/uWsEPKhEKk 3+BA== X-Gm-Message-State: ALoCoQkbonfleiApiojzKKVPHYj5zwWoicjCXCisp97p09i9xu54SAGmAvZERLKzCZc3zlhPmGcs X-Received: by 10.140.147.22 with SMTP id 22mr17367513qht.59.1425668400484; Fri, 06 Mar 2015 11:00:00 -0800 (PST) Received: from [192.168.1.139] (h96-61-87-245.cntcnh.dsl.dynamic.tds.net. [96.61.87.245]) by mx.google.com with ESMTPSA id 142sm6304777qhg.16.2015.03.06.10.59.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2015 11:00:00 -0800 (PST) Message-ID: <54F9F92F.7080900@hurleysoftware.com> Date: Fri, 06 Mar 2015 13:59:59 -0500 From: Peter Hurley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Leif Lindholm Subject: Re: [PATCH v3 2/3] of: add optional options parameter to of_find_node_by_path() References: <1417110967-16284-1-git-send-email-leif.lindholm@linaro.org> <1417110967-16284-3-git-send-email-leif.lindholm@linaro.org> <54F7287E.6060302@hurleysoftware.com> <20150306165253.GJ4278@bivouac.eciton.net> <54F9EDE8.1090902@hurleysoftware.com> In-Reply-To: <54F9EDE8.1090902@hurleysoftware.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150306_110022_554258_BAE3B25A X-CRM114-Status: GOOD ( 11.35 ) X-Spam-Score: -0.7 (/) Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, andrew@lunn.ch, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, robh+dt@kernel.org, ijc@debian.org, grant.likely@linaro.org, plagnioj@jcrosoft.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 On 03/06/2015 01:11 PM, Peter Hurley wrote: > On 03/06/2015 11:52 AM, Leif Lindholm wrote: [...] >> Could you give the below a spin, and if it works for you, send me the >> above tests as a full patch so that I can post both as a series? > > Will do as soon as I finish testing. All passed with your patch; patch for testcases below. Regards, Peter Hurley --- >% --- From: Peter Hurley Subject: [PATCH] of: unittest: Add options string testcase variants Add testcase variants with '/' in the options string to test for scan beyond end path name terminated by ':'. Signed-off-by: Peter Hurley --- drivers/of/unittest.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 0cf9a23..b2d7547 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -92,6 +92,11 @@ static void __init of_selftest_find_node_by_name(void) "option path test failed\n"); of_node_put(np); + np = of_find_node_opts_by_path("/testcase-data:test/option", &options); + selftest(np && !strcmp("test/option", options), + "option path test, subcase #1 failed\n"); + of_node_put(np); + np = of_find_node_opts_by_path("/testcase-data:testoption", NULL); selftest(np, "NULL option path test failed\n"); of_node_put(np); @@ -102,6 +107,12 @@ static void __init of_selftest_find_node_by_name(void) "option alias path test failed\n"); of_node_put(np); + np = of_find_node_opts_by_path("testcase-alias:test/alias/option", + &options); + selftest(np && !strcmp("test/alias/option", options), + "option alias path test, subcase #1 failed\n"); + of_node_put(np); + np = of_find_node_opts_by_path("testcase-alias:testaliasoption", NULL); selftest(np, "NULL option alias path test failed\n"); of_node_put(np);