Commit graph

6 commits

Author SHA1 Message Date
Rob Herring
c4ffc05574 tests: Replace license boilerplate with SPDX tags
Replace instances in tests of mostly LGPL-2.1 license boilerplate
with SPDX tags.

Signed-off-by: Rob Herring <robh@kernel.org>
Message-Id: <20190620211944.9378-5-robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-06-21 21:06:10 +10:00
David Gibson
bad5b28049 Fix assorted sparse warnings
This fixes a great many sparse warnings on the fdt and libfdt sources.
These are mostly due to incorrect mixing of endian annotated and native
integer types.

This includes fixing a couple of quasi-bugs where we had endian conversions
the wrong way around (this will have the right effect in practice, but is
certainly conceptually incorrect).

This doesn't make the whole tree sparse clean: there are many warnings in
bison and lex generated code, and there are a handful of other remaining
warnings that are (for now) more trouble than they're worth to fix (and
are not genuine bugs).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-06 12:08:53 +11:00
Kim Phillips
38ad79d339 dtc/tests: don't include fdt.h prior to libfdt.h
tests will need fdt type definitions provided in a subsequent patch
to libfdt_env.h.  Since libfdt.h includes libfdt_env.h in the right
order anyway, just remove the fdt.h include.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
2013-01-06 15:48:51 -06:00
David Gibson
74f6a51b1f dtc: Enable more warnings
This patch turns on a bunch of extra gcc warnings, most of which are
probably a good idea.  Of the new warnings -Wnested-externs and
-Wstrict-prototypes need no code changes, we're already warning-clean.
The remaining one, -Wmissing-prototypes requires trivial changes in
some of the tests (making functions local).

This patch also rearranges the warnings flags into a separate make
variable for convenience, and turns on -Werror, to really encourage
people to keep the code warning-clean.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2010-03-10 08:12:28 -06:00
David Gibson
b31b271f91 Fix dtc bugs for 64-bit compile
I've just tested building dtc as an x86_64 binary on a 32-bit i386
host by using:
	make CC="gcc -m64"
This patch fixes a handful of minor bugs thus discovered:

 * There is a printf() type mismatch on 64-bit in value-labels.c

 * For the tests which use libdl, we were using the GNU make feature
where it will find libdl.so given a dependency in the form '-ldl'.
But this built-in make logic doesn't know we're compiling 64-bit so
finds the 32-bit version of the library.  We avoid using this and
instead explicitly pass -ldl to CC, which being the 64-bit version
does know where to look.

 * To process dtc's asm output into .so files, run_tests.sh was
directly invoking the (default instance of) the assembler and linker.
Instead invoke these via the CC driver, and allow that to be overriden
from the make environment.

 * The x86_64 assembler doesn't 0 fill with the .balign directive
(presumably it is NOP filling).  That doesn't produce strictly
incorrect trees, but it is confusing and confounds are testcases which
do byte-by-byte comparison of the trees produced by asm output with
direct dtb output (which does 0 pad where necessary, of course).  This
patch uses the optional second argument to .balign to force gas to
zero-fill instead.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2009-11-11 21:41:14 -06:00
David Gibson
bae93e8992 dtc: Add testcases for labels within values
This patch adds a testcase using asm output mode to check that labels
within property values are correctly processed.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2009-02-03 08:38:05 -06:00