From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754419AbbCQVMh (ORCPT ); Tue, 17 Mar 2015 17:12:37 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:33653 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753925AbbCQVMf (ORCPT ); Tue, 17 Mar 2015 17:12:35 -0400 Date: Tue, 17 Mar 2015 21:12:28 +0000 From: Leif Lindholm To: Brian Norris Cc: Rob Herring , Peter Hurley , stable@vger.kernel.org, Grant Likely , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] of: unittest: Add option string test case with longer path Message-ID: <20150317211228.GR4278@bivouac.eciton.net> References: <1425924225-22748-2-git-send-email-leif.lindholm@linaro.org> <1426620632-23383-1-git-send-email-computersforpeace@gmail.com> <1426620632-23383-2-git-send-email-computersforpeace@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426620632-23383-2-git-send-email-computersforpeace@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2015 at 12:30:32PM -0700, Brian Norris wrote: > There were regressions seen with commit 106937e8ccdc ("of: fix handling > of '/' in options for of_find_node_by_path()"), where we couldn't handle > extra '/' before the ':'. Let's test for this now. > > Confirmed that this test fails without the previous patch and passes > when patched. All other tests pass. > > Signed-off-by: Brian Norris > --- > drivers/of/unittest.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c > index aba8946cac46..52c45c7df07f 100644 > --- a/drivers/of/unittest.c > +++ b/drivers/of/unittest.c > @@ -97,6 +97,11 @@ static void __init of_selftest_find_node_by_name(void) > "option path test, subcase #1 failed\n"); > of_node_put(np); > > + np = of_find_node_opts_by_path("/testcase-data/testcase-device1:test/option", &options); > + selftest(np && !strcmp("test/option", options), > + "option path test, subcase #2 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); > -- > 1.9.1 Acked-by: Leif Lindholm