All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Jack Miller <jack-jZyo8ZIaZD9AfugRpC6u6w@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] Add embedded nul string list test
Date: Thu, 19 Jun 2014 11:57:14 +1000	[thread overview]
Message-ID: <20140619015714.GK29264@voom.redhat.com> (raw)
In-Reply-To: <20140618173519.GA15740-O8SCTCEbm15XsEFxtoW7CMxtgHpCUUYS@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]

On Wed, Jun 18, 2014 at 12:35:19PM -0500, Jack Miller wrote:
> On Wed, Jun 18, 2014 at 11:27:29AM +1000, David Gibson wrote:
> > > @@ -310,6 +310,9 @@ dtc_tests () {
> > >      run_dtc_test -I dts -O dtb -o dtc_comments-cmp.test.dtb comments-cmp.dts
> > >      run_test dtbs_equal_ordered dtc_comments.test.dtb dtc_comments-cmp.test.dtb
> > >  
> > > +    run_dtc_test -I dts -O dtb -o dtc_nul_string_list.dtb nul_string_list.dts
> > 
> > dtb files generated by the tests should be named XXX.test.dtb so that
> > make clean will clean them up again.
> 
> Hmmm, the greater problem here seems to be that I'm including a .dtb that
> *isn't* disposable and will be cleaned. Should this test check that the
> generated dtb decompiles into "","","" format instead of comparing to a
> binary? That seems a little weak as it assumes that the intermediate .dtb is
> correct, but I don't know your thoughts on including binaries into your test
> directory.

So, I thought about that.  It would be possible to avoid by making a
comparison .dts which includes the NULs using string escapes or
bytestrings instead of NULs in the input, then comparing the .dtb
outputs from each.

However, I don't think there's a real problem with a pre-built dtb,
git handles binary files adequately well.

-- 
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: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-06-19  1:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 16:35 [PATCH 0/2] Nul string list v2 Jack Miller
     [not found] ` <1402936552-10249-1-git-send-email-jack-jZyo8ZIaZD9AfugRpC6u6w@public.gmane.org>
2014-06-16 16:35   ` [PATCH 1/2] Properly handle nul delimited string lists Jack Miller
2014-06-16 16:35   ` [PATCH 2/2] Add embedded nul string list test Jack Miller
     [not found]     ` <1402936552-10249-3-git-send-email-jack-jZyo8ZIaZD9AfugRpC6u6w@public.gmane.org>
2014-06-18  1:27       ` David Gibson
     [not found]         ` <20140618012729.GE29264-1s0os16eZneny3qCrzbmXA@public.gmane.org>
2014-06-18 17:35           ` Jack Miller
     [not found]             ` <20140618173519.GA15740-O8SCTCEbm15XsEFxtoW7CMxtgHpCUUYS@public.gmane.org>
2014-06-19  1:57               ` David Gibson [this message]
2014-06-18  1:25   ` [PATCH 0/2] Nul string list v2 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=20140619015714.GK29264@voom.redhat.com \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jack-jZyo8ZIaZD9AfugRpC6u6w@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.