[coreboot] [RFC] v3 dtc testsuite
stepan at coresystems.de
Mon Sep 8 14:39:05 CEST 2008
Carl-Daniel Hailfinger wrote:
> the v3 dtc code has been an area where we had bugs in the past, and I
> believe we might hit some old bugs and/or introduce new bugs in the
> future. I'd like to spot bugs as early as possible during compile time,
> not as random corruption/crash/misbehaviour during runtime.
> I have a simple testcase dts on my disk which caused the generated
> statictree.c to explode during compilation. That dtc bug was fixed by
> the struct naming patch in r860.
> There also is a more complicated torture dts for which statictree.c will
> cause runtime NULL dereferences. Checking this at compile time would
> require the build system to compile statictree.c and a verification
> walker with HOSTCC before including it in the build.
> Should we introduce compile-time checks for any possible bugs,
> especially those we already hit in the past? What do you think?
I suggest not doing this on every compile but instead having a test
suite that people should run when they make changes to dtc.
This test suite should also be verified against code coverage to make
sure the test suite tests the complete program. We did this for the
OpenBIOS FCode Suite:
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.de • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
More information about the coreboot