devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: jdl-CYoMK+44s/E@public.gmane.org,
	devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC PATCH v2 2/3] dtc: make check test for dtc --annotate
Date: Wed, 23 Sep 2015 10:18:09 +1000	[thread overview]
Message-ID: <20150923001809.GS20331@voom.fritz.box> (raw)
In-Reply-To: <56018E33.5090708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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

On Tue, Sep 22, 2015 at 10:21:55AM -0700, Frank Rowand wrote:
> On 9/22/2015 3:39 AM, David Gibson wrote:
> > On Mon, Sep 21, 2015 at 10:38:27PM -0700, Frank Rowand wrote:
> >> From: Frank Rowand <frank.rowand-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> >>
> >> Add dtc tests.
> >>
> >>   - dtc --annotate to create a .dts with annotations
> >>   - compile the annotated .dts
> >>   - compare the .dts created from include0.dts to the .dts created
> >>     by first compiling include0.dts with annotations, then compiling
> >>     the resulting .dts without --annotations to strip the annotation
> > 
> > My brain hurts trying to follow that.
> > 
> >> Not-signed-off-by: Frank Rowand <frank.rowand-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> >> ---
> >>  tests/run_tests.sh |   10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>
> >> Index: b/tests/run_tests.sh
> >> ===================================================================
> >> --- a/tests/run_tests.sh
> >> +++ b/tests/run_tests.sh
> >> @@ -276,6 +276,16 @@ libfdt_tests () {
> >>      run_dtc_test -I dts -O dtb -o sourceoutput.test.dts.test.dtb sourceoutput.test.dts
> >>      run_test dtbs_equal_ordered sourceoutput.test.dtb sourceoutput.test.dts.test.dtb
> >>  
> >> +    # verify annotated .dts can be compiled
> >> +    run_dtc_test --annotate -o sourceoutput.test.annotate.dts sourceoutput.dts
> > 
> > 1) Looks like you forgot to git add sourceoutput.dts
> 
> sourceoutput.dts is an existing .dts that I used again.  But it looks like a bad
> choice - I think I should just use include0.dts, as you suggested.

Ok.

> > 2) All your generated files should be named *.test.dts, so that make
> > clean will get rid of them.
> 
> Will fix.

Ok.

> >> +    run_dtc_test -o sourceoutput.test.annotate.dts.test.dts sourceoutput.test.annotate.dts
> >> +
> >> +    # verify annotated .dts can be stripped to match non-annotated
> >> +    run_dtc_test -o includes.dts include0.dts
> >> +    run_dtc_test --annotate -o includes.annotate.dts include0.dts
> >> +    run_dtc_test -o includes.annotate_undo.dts includes.annotate.dts
> >> +    run_wrap_test cmp includes.dts includes.annotate_undo.dts
> > 
> > So, this checks that annotate doesn't break the semantic parts of the
> > tree, which is a good test.
> > 
> > But I was suggesting a canned example, including the annotations to
> > check for regressions in the annotation generation itself.
> 
> OK, I think I understand now.  Add a test to make sure that the annotation is
> correct.  This will be interesting because the source path in the annotation
> is an absolute path, including the location of the dtc git repository.  The
> way that I strip off the location of the dtc git repository in my personal
> world is a bit ugly.  I'll think about how to do this.

Hm, yeah.  I thought we only stored relative paths internally, unless
absolute ones were supplied - but looking at srcpos.c I'm not so
sure.  The file path stuff is actually pretty hard to follow.

If we are using relative paths everywhere, we should maybe stop that -
although it might make the relative open stuff harder :/

-- 
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:[~2015-09-23  0:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22  5:05 [RFC PATCH v2 0/3] dtc: dts source location annotation Frank Rowand
     [not found] ` <5600E191.9020903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-22  5:36   ` [RFC PATCH v2 1/3] " Frank Rowand
     [not found]     ` <5600E8EF.6020107-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-22 10:32       ` David Gibson
     [not found]         ` <20150922103251.GO20331-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2015-09-22 17:10           ` Frank Rowand
     [not found]             ` <56018B92.90305-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-23  0:11               ` David Gibson
2015-09-22  5:38   ` [RFC PATCH v2 2/3] dtc: make check test for dtc --annotate Frank Rowand
     [not found]     ` <5600E953.40308-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-22 10:39       ` David Gibson
     [not found]         ` <20150922103907.GP20331-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2015-09-22 17:21           ` Frank Rowand
     [not found]             ` <56018E33.5090708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-23  0:18               ` David Gibson [this message]
2015-09-22  5:39   ` [RFC PATCH v2 3/3] dtc: linux kernel build process to create annotated .dts Frank Rowand
     [not found]     ` <5600E9A2.5050000-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-22 10:40       ` David Gibson
     [not found]         ` <20150922104013.GQ20331-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2015-09-22 17:24           ` Frank Rowand

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=20150923001809.GS20331@voom.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jdl-CYoMK+44s/E@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 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).