aboutsummaryrefslogtreecommitdiff
path: root/test/overlay/cmd_ut_overlay.c
AgeCommit message (Collapse)Author
2018-12-12test: overlay: NULL passed as fdtHeinrich Schuchardt
The uts created in do_ut_overlay() is not the one used in cmd_ut_category(). Currently all tests are therefore called with uts->priv = NULL and fail. Using a static variable is the easiest fix here. Fixes: e93232e15ec9 ("test: overlay: Use cmd_ut_category()") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-10-22test: overlay: add missing includeHeinrich Schuchardt
Compiling the overlay unit test fails with odroid-c2_defconfig showing errors like: test/overlay/cmd_ut_overlay.c:29:8: error: unknown type name ‘fdt32_t’ Add the missing include. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-12-02test: overlay: Use cmd_ut_category()Simon Glass
Adjust the code to use the common test-execution function. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-10-06test/overlay: Fix various malloc/free leaksTom Rini
With the overlay tests now being built in sandbox Coverity has found a number of issues in the tests. In short, if malloc ever failed we would leak the previous mallocs, so we need to do the usual goto pattern to free each in turn. Finally, we always looked at the free()d location to see how many tests had failed for the return code. Reported-by: Coverity (CID: 167224, 167227, 167230, 167236) Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-15test: overlay: Add unit test for stacked overlayPantelis Antoniou
Verify that stacked overlays work. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15ut: fix fdt_getprop_u32() changePantelis Antoniou
fdt_getprop_u32 is not exported and it's different than what the unit test uses. Rename u32 prop access methods to something that's unit test specific. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-10-13libfdt: Bring in upstream stringlist functionsSimon Glass
These have now landed upstream. The naming is different and in one case the function signature has changed. Update the code to match. This applies the following upstream commits by Thierry Reding <treding@nvidia.com> : 604e61e fdt: Add functions to retrieve strings 8702bd1 fdt: Add a function to get the index of a string 2218387 fdt: Add a function to count strings Signed-off-by: Simon Glass <sjg@chromium.org>
2016-08-20tests: Introduce DT overlay testsMaxime Ripard
This adds a bunch of unit tests for the "fdt apply" command. They've all been run successfully in the sandbox. However, as you still require an out-of-tree dtc with overlay support, this is disabled by default. Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>