From: Brian Norris <computersforpeace@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Brian Norris <computersforpeace@gmail.com>,
Peter Hurley <peter@hurleysoftware.com>,
Leif Lindholm <leif.lindholm@linaro.org>,
stable@vger.kernel.org, Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] of: unittest: Add option string test case with longer path
Date: Tue, 17 Mar 2015 12:30:32 -0700 [thread overview]
Message-ID: <1426620632-23383-2-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1426620632-23383-1-git-send-email-computersforpeace@gmail.com>
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 <computersforpeace@gmail.com>
---
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
next prev parent reply other threads:[~2015-03-17 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 18:03 [PATCH 0/2] of: fix handling of '/' in path options Leif Lindholm
2015-03-09 18:03 ` [PATCH 1/2] of: fix handling of '/' in options for of_find_node_by_path() Leif Lindholm
2015-03-17 19:30 ` [PATCH 1/2] of: handle both '/' and ':' in path strings Brian Norris
2015-03-17 19:30 ` Brian Norris [this message]
[not found] ` <1426620632-23383-2-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-17 21:12 ` [PATCH 2/2] of: unittest: Add option string test case with longer path Leif Lindholm
2015-03-17 21:11 ` [PATCH 1/2] of: handle both '/' and ':' in path strings Leif Lindholm
2015-03-22 20:04 ` Rob Herring
2015-03-09 18:03 ` [PATCH 2/2] of: unittest: Add options string testcase variants Leif Lindholm
2015-03-11 12:49 ` [PATCH 0/2] of: fix handling of '/' in path options Rob Herring
[not found] ` <CAL_JsqK=cODtAgt5jRQ-ASPBVatUztjOwDcZ6vzOh9bDKMdSBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-11 13:00 ` Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426620632-23383-2-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=leif.lindholm@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).