On Tue, Jul 26, 2016 at 10:18:59AM +1000, David Gibson wrote: > > > Again, off-by-one in this test, I think. Since there are so many > > > tricky edge cases here, it might be worth making testcases for them. > > > > What do you want here? That we move the parsing code out of that loop, > > make it public and put the prototype in libfdt_internal, or that we > > craft some DT that would outline all the possible issues with that > > function, and just test the return code of fdt_overlay_apply? > > I was thinking crafted DTs. But I've realized that doing usefully is > pretty tricky, since overruns probably won't cause an immediate > problem most of the time. I guess they'd trip errors under valgrind > at least (as long you make sure there's at least one byte's alignment > gap until the next tag). Is that a general comment? I'm still not quite sure what you expect from me. Do you want to test just that function, or only the fixup parsing function? Should I run valgrind, or are you expecting it to be done later? Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Attachment:
signature.asc
Description: PGP signature