From patchwork Mon Mar 9 18:03:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 45554 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EE438214BF for ; Mon, 9 Mar 2015 18:02:54 +0000 (UTC) Received: by wivz2 with SMTP id z2sf13081040wiv.1 for ; Mon, 09 Mar 2015 11:02:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=hUzhUtZkj0H5+kCxxcBAAb7dtvxuVW1fepoG6K6qTfY=; b=I3x5qKNexkNj1FgM00ApxDfdSlMLbGCeSpU7jYyfOk5IRksWiVEJpnQ5N605t48Zbf c3Zan7PVMYPsTpHnUCUfyLQO3wKxyMfScmQQO/NMNu6BZZho60N3z6K9/TNBiojFn/JN a9dWZMYzUgDGlynyc6dNBLyJxKQU+cnwAR49NlMrBV6je7RyF+X8knOhie1X4c1rWclM phuosA9xpzCiGieGqqpjWwPCOMUIjlNSOkaBVMPgaBQsNLVqoapXY3LdBtrVhv3mCpKn Ay9e+HAEcO5+yX75xKMWzn6yObe97Vj2ZNfiJALUsru/edRXngtVFFiMXbMgDNsjgEIJ PH9A== X-Gm-Message-State: ALoCoQmJKTjhMK3kupNomKpzbQfWGj6E4uJJIIpEjtdjdtrinyn7TYovuI0BxxxWZ47r2VodZfKq X-Received: by 10.194.53.225 with SMTP id e1mr4163970wjp.4.1425924174230; Mon, 09 Mar 2015 11:02:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.194 with SMTP id a2ls309934lak.88.gmail; Mon, 09 Mar 2015 11:02:54 -0700 (PDT) X-Received: by 10.152.87.3 with SMTP id t3mr27142779laz.19.1425924174005; Mon, 09 Mar 2015 11:02:54 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id ai6si699769lbc.147.2015.03.09.11.02.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Mar 2015 11:02:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by labgf13 with SMTP id gf13so48239293lab.10 for ; Mon, 09 Mar 2015 11:02:53 -0700 (PDT) X-Received: by 10.152.120.134 with SMTP id lc6mr26610230lab.72.1425924173735; Mon, 09 Mar 2015 11:02:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1639574lbj; Mon, 9 Mar 2015 11:02:52 -0700 (PDT) X-Received: by 10.202.232.65 with SMTP id f62mr21535694oih.116.1425924171854; Mon, 09 Mar 2015 11:02:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id he4si19162795pac.34.2015.03.09.11.02.50; Mon, 09 Mar 2015 11:02:51 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754187AbbCISCc (ORCPT + 28 others); Mon, 9 Mar 2015 14:02:32 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:46288 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753528AbbCISC1 (ORCPT ); Mon, 9 Mar 2015 14:02:27 -0400 Received: by wiwh11 with SMTP id h11so13342733wiw.5 for ; Mon, 09 Mar 2015 11:02:26 -0700 (PDT) X-Received: by 10.194.23.39 with SMTP id j7mr61627678wjf.9.1425924146240; Mon, 09 Mar 2015 11:02:26 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id cj9sm13768530wjc.42.2015.03.09.11.02.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Mar 2015 11:02:25 -0700 (PDT) From: Leif Lindholm To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: grant.likely@linaro.org, robh+dt@kernel.org, peter@hurleysoftware.com Subject: [PATCH 2/2] of: unittest: Add options string testcase variants Date: Mon, 9 Mar 2015 18:03:45 +0000 Message-Id: <1425924225-22748-3-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1425924225-22748-1-git-send-email-leif.lindholm@linaro.org> References: <1425924225-22748-1-git-send-email-leif.lindholm@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Peter Hurley 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);