This adds the env option PX4_FUZZ which runs the LLVM libFuzzer which
throws random bytes at mavlink_receiver using MAVLink messages over UDP.
The MAVLink messages that are being sent are valid, so the CRC is
calculated but the payload and msgid, etc. are generally garbage, unless
the fuzzing gets a msgid right by chance.
As I understand it, libFuzzer watches the test coverage and will try to
execute as much of the code as possible.
- cmake NuttX build wrapper compile in place instead of copying source tree to build directory
- slightly faster skipping necessary copying (depending on system)
- allows debugging in place
- easier to work directly in NuttX following official documentation
- simplifies overall build which should make it easier to resolve any remaining NuttX dependency issues in the build system
- the downside is switching back and forth between different builds always require rebuilding NuttX, but I think this is worth the improved developer experience
- also no longer builds px4io and bootloader in every single build, for most users these rarely change and we're wasting a lot of build time
- update clean to recurse all build directories and use build system clean
- git clean is used to remove submodule generated build artifacts that
are left in the source tree
- distclean now discards all build directories and any gitignored
filess that were generated in source directories (but not top level)
- debug output is now printed & filtered with the python 'logging' standard module
- changed 'module whitelist' to 'scope-whitelist'
- whitelist may now apply to libraries
- libraries are not included by default
- may be merged with their depending modules with the `--merge-depends` cli flag
- eliminates redundant 'special-case' handling code
- greatly expands debugging output
- fixes debug output if package dependencies are missing
- still crashes on error matches
- now warns on ambiguous matches
- prints a list of ambiguous source sites (aka warnings) on completion
- adds warnings if any of the source paths are invalid
- do not emit debug output for modules outside of the module/scope whitelist
- Expand script's CLI parameters
- added 'none' output options: undocumented debugging option to silence file output while debugging
- added the `--merge-depends` cli flag -- merges output of modules & their dependee libraries
- Source processing now happens on original source files:
- processing to line-by-line
- required overhaul of regex match patterns + processing
- pros:
- enable tracing of ambiguous parsing sites -- reports (module, file, line-number, line-contents)
- simplifies code
- reduces computational complexity
- cons:
- certain declarations are harder to parse (multiline arrays)
- refactors:
- added specific subclasses for each: Publications, Subscriptions, Ambiguities
- added a "Scope" class to represent either a module ('ModuleScope') or a library ('LibraryScope')
Without this ninja supposedely builds with the default of the system
which is 10 for my 4 core, 8 thread CPU. With this argument, you can now
actually set it.
This has the benefit that the Gazebo plugins can be built with less
cores in order to avoid running out of RAM.
The previous check for the -j argument was not actually working.
Therefore, the build always used 4 cores, unless when building with
ninja when presumably the ninja default was used.