aboutsummaryrefslogtreecommitdiff
path: root/tests/mangle-layout.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-21tests: Replace license boilerplate with SPDX tagsRob Herring1-14/+1
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>
2018-06-07libfdt: Add fdt_header_size()David Gibson1-6/+2
We have a couple of places within libfdt and its tests where we need to find the size of the header, based on the version. Add a helper function for it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2013-01-06dtc/tests: don't include fdt.h prior to libfdt.hKim Phillips1-1/+0
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>
2010-02-24dtc: Audit and fix valgrind errorsDavid Gibson1-3/+4
The somewhat embarrasing bug in the first version of my previous patch would have been detected by valgrind. Thus reminded, I've run the testsuite under valgrind and fixed any errors I found. This turned out to be just some uninitialized buffers in test programs. The fragments of uninitialized data aren't particularly important, but we might as well squash the valgrind warnings, so that future valgrind errors will stand out. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-08-13dtc: Make many functions 'static'David Gibson1-3/+3
This patch marks various functions not shared between c files 'static', as they should be. There are a couple of functions in dtc, and many in the testsuite. This is *almost* enough to enable the -Wmissing-prototypes warning. It's not quite enough, because there's a mess of junk in the flex generated code which triggers that warning which I'm not yet sure how to deal with. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-07-14dtc: Enable and fix -Wpointer-arith warningsDavid Gibson1-4/+4
This patch turns on the -Wpointer-arith option in the dtc Makefile, and fixes the resulting warnings due to using (void *) in pointer arithmetic. While convenient, pointer arithmetic on void * is not portable, so it's better that we avoid it, particularly in libfdt. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-30dtc: Remove leftover debugging printf() from mangle-layoutDavid Gibson1-2/+0
The mangle-layout testcase/utility had a leftover debugging printf(). This patch removes it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-25libfdt: Test on trees with different block layoutsDavid Gibson1-0/+166
At present, all the example dtbs we use in the testsuite are version 17 and have reservation map, then structure block then strings block (the natural ordering based on alignment constraints). However, all libfdt's read-only and in-place write functions should also work on v16 trees, and on trees with other layouts. This patch adds a testcase / utility function to rearrange the blocks of a dtb and/or regress a v17 tree to v16, and uses it to run tests on trees with different layouts and versions. Signed-off-by: David Gibson <david@tgibson.dropbear.id.au>