On 3/12/2015 6:02 PM, Gedare Bloom wrote: > On Thu, Mar 12, 2015 at 6:58 PM, Amar Takhar <a...@rtems.org> wrote: >> On 2015-03-12 12:41 -0500, Joel Sherrill wrote: >>> Hi >>> >>> Many BSPs can link a test but don't actually have enough memory >>> to run the test. They will fail in the first few lines when the requested >>> memory for the RTEMS work area is not available. I hacked together >>> a script which adds together the code, data, bss, work space and >>> stack space requested. If this exceeds physical memory on the board, >>> then the test will fail. It is possible to come close and still run out of >>> memory during initialization (e.g. malloc, etc) but this approach could >>> detect some tests which will fail by inspecting them on the host. >> The waf build prints a warning during compile time that the test will not fit >> and pass the build. I was going to add a summary at the end for any tests >> that >> won't fit and also add it to a report on BuildBot. >> > It includes the workspace size in its estimation of space? Already if > a test's binary executable size doesn't fit the build will fail at > link-time. The workspace is in addition to the .text, .data, and .bss. It is a calculation by RTEMS confdefs.h and the linker knows nothing about this memory.
You can detect the code/data not fitting into memory but not when it fits but creates 1000 tasks with 4K stack each. That adds 4MB to the test RAM requirements. The workspace number I am pulling out in the script using gdb is that extra information. If you let it run, the test will fail very early in boot_card(). This is a second pass filter to avoid running things that will obviously fail. >> Amar. >> _______________________________________________ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel