Skip to content
Snippets Groups Projects
user avatar
Patrick Plagwitz authored
b2efcfe8
History

The Wundertaker is a Web GUI visualizing #ifdefs and undertaker defect reports in Linux code files.

The Wundertaker is written in Ruby and, when set up, requires only a read-only and up-to-date Linux git repository to work on. The repo can be browsed and individual files can be visualized in a github-like code view with a focus on C preprocessor #ifdef blocks. Also, #ifdef blocks with contradictory or superfluous conditions are highlighted (see the red bar in the screenshot below).

These defective blocks can be detected by undertaker, which collects information from Linux Makefiles as well as its Kconfig files and crosschecks them to find defective blocks. So Wundertaker can read and visualize defect reports, it needs a tree of analyses generated by the undertaker-checkpatch program when invoked with the --archive option.

Screenshot of Wundertaker

INSTALLATION

See server/INSTALL.md.

REPORT INSERTION

The folder Wundertaker runs on contains another folder ‘commits’ that in turn contains commit folders. Each commit folder stands for a commit: it has the hash of the commit as its name and contains the tree of the commit, excluding any code files. The only files Wundertaker needs in a commit folder are the reports and analyses generated by undertaker-checkpatch.

Wundertaker will ignore any commit folders that are empty or contain a file ‘cados-lock‘:

|--commits
---|--d676c186a297ce9c1207ac9850c1c7eb154d5da7 -- ignored
---|--456fdb267377b88fa37abf60fcbd9bfaa813bf1f -- ignored
------|--cados-lock
------|--foo
---|--e05b21d3eb239937e299b6f4effcb6879a8daf24 -- not ignored
------|--kernel
---------|--sched
------------|--core.c.B123.dead.kconfig

Thus, report trees can be inserted by writing the folder while having it locked. If this is not done, and someone accesses pages belonging to the inserted commit in the meantime, the MongoDB cache will be filled with incomplete information. Some reports may then not show up at all or may not be counted. You can rectify this situation after the fact by dropping cached info about this commit -- see the next section.

CLEAN DATABASE

Wundertaker uses MongoDB, but only as a cache. To delete all data Wundertaker has written with a particular MongoDB instance, run

$ bundle exec rake 'drop_database[/path/to/server/dir, all]'

The script reads the address of the MongoDB server from /path/to/server/dir/config.rb.

$ bundle exec rake 'drop_database[/path/to/server/dir, 456fdb267377b88fa37abf60fcbd9bfaa813bf1f]'

drops only data belonging to the commit 456fdb267377b88fa37abf60fcbd9bfaa813bf1f.

LICENSE

Copyright 2016 Patrick Plagwitz.

Wundertaker is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Wundertaker is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Wundertaker. If not, see http://www.gnu.org/licenses/.