From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Luca Weiss <luca-IfPCFPJWly+lVyrhU4qvOw@public.gmane.org>,
Devicetree Compiler
<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v4] pylibfdt: add FdtRo.get_path()
Date: Tue, 26 Apr 2022 16:29:27 +1000 [thread overview]
Message-ID: <YmeRR0n/fo07y4WF@yekko> (raw)
In-Reply-To: <CAPnjgZ2CjKLrCXEcBH0vTN77d7zk29dxnmRta4tTR_Th2arBzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2630 bytes --]
On Wed, Apr 20, 2022 at 03:29:49PM -0600, Simon Glass wrote:
> Hi Luca,
>
> On Wed, 20 Apr 2022 at 12:20, Luca Weiss <luca-IfPCFPJWly+lVyrhU4qvOw@public.gmane.org> wrote:
> >
> > Hi Simon and David,
> >
> > On Mittwoch, 20. April 2022 04:56:15 CEST David Gibson wrote:
> > > On Tue, Apr 19, 2022 at 03:54:07PM -0600, Simon Glass wrote:
> > > > Hi Luca,
> > > >
> > > > On Tue, 19 Apr 2022 at 13:49, Luca Weiss <luca-IfPCFPJWly+lVyrhU4qvOw@public.gmane.org> wrote:
> > > > > Add a new Python method wrapping fdt_get_path() from the C API.
> > > > >
> > > > > Also add a test for the new method.
> > > > >
> > > > > Signed-off-by: Luca Weiss <luca-IfPCFPJWly+lVyrhU4qvOw@public.gmane.org>
> > > > > ---
> > > > > Changes since v3:
> > > > > * add quiet parameter
> > > > > * return integer error when error is quieted
> > > > >
> > > > > Changes since v2:
> > > > > * Remove arbitrary size limit
> > > > > * Change size calculation to increase exponentially
> > > > > * Add test to verify we still get exceptions with bad parameters
> > > > >
> > > > > pylibfdt/libfdt.i | 28 ++++++++++++++++++++++++++++
> > > > > tests/pylibfdt_tests.py | 13 +++++++++++++
> > > > > 2 files changed, 41 insertions(+)
> > > >
> > > > Reviewed-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > > >
> > > > You don't check for when it is output of space, but I think that is
> > > > OK.
> > >
> > > Right, a testcase for that would be good, but it can be a follow up.
> >
> > I don't quite understand what you mean "is output of space".
>
> is out of space (sorry)
>
> >
> > Maybe you mean a test for when the string is longer than 1024 characters
> > ("size = 1024") so the size increase gets triggered?
> >
> > If yes, then I did test that manually before by setting the value absurdly
> > low. Not sure how to properly check that in the tests though. Add a node with
> > a super long name into the test dtb?
>
> Another option is to add a parameter for the max size, just for
> testing, but I doubt David would like that!
Actually I'm fine with adding a "hint" size as a parameter - as long
as it's optional with a a sensible default.
> You could have a SIZE_INCREMENT = 1024 at the top of the file, then
> change it in a try/finally clause in your test.
>
> >
> > >
> > > Applied.
> >
> > Thanks!
> >
> > Regards
> > Luca
>
> Regards,
> Simon
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-04-26 6:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 19:45 [PATCH v4] pylibfdt: add FdtRo.get_path() Luca Weiss
[not found] ` <20220419194537.63170-1-luca-IfPCFPJWly+lVyrhU4qvOw@public.gmane.org>
2022-04-19 21:54 ` Simon Glass
[not found] ` <CAPnjgZ2izMUDXJ43jSOzXW7DKbuoN5j26MyKZaLn5Wt2gd28wQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-04-20 2:56 ` David Gibson
2022-04-20 18:19 ` Luca Weiss
2022-04-20 21:29 ` Simon Glass
[not found] ` <CAPnjgZ2CjKLrCXEcBH0vTN77d7zk29dxnmRta4tTR_Th2arBzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-04-26 6:29 ` David Gibson [this message]
2022-04-26 6:28 ` David Gibson
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=YmeRR0n/fo07y4WF@yekko \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luca-IfPCFPJWly+lVyrhU4qvOw@public.gmane.org \
--cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.