[Announce] Aiaiai

From: Artem Bityutskiy
Date: Wed Mar 28 2012 - 11:06:12 EST


I here is a tool which I find very helpful for subsystem maintainers and
individual developers. This tool checks patches or patch-sets using various
existing tools and reports new issues.

The main thing it does is:
1. Build the kernel before the patch and after the patch
2. Compare 2 build logs
3. Report about _new_ gcc warnings, coccinelle/spatch/smatch/cppcheck

For example, you can feed Aiaiai a patch-set, and it may report something
like this:


1 Successfully built configuration "my_defconfig,i386", results:
3 --- before_patching.log
4 +++ after_patching.log
5 @@ @@
6 -drivers/staging/cruft/my_drv.c: In function âmy_pool_destroyâ:
7 -drivers/staging/cruft/my_drv.c:165:22: warning: variable âtest1â set but not used [-Wunused-but-set-variable]
8 @@ @@
9 +drivers/staging/cruft/my_drv.c: In function âmy_event_handlerâ:
10 +drivers/staging/cruft/my_drv.c:311:36: warning: unused variable âregâ [-Wunused-variable]
11 +drivers/staging/cruft/my_drv.c:1001:1-7: preceding lock on line 837 [coccinelle]
12 +drivers/staging/cruft/my_drv.c:834 my_int_data(12) warn: variable dereferenced before check 'priv' (see line 827) [smatch]


Line 1 says that configuration my_defconfig for architecture i386 has been built,
so the patch-set is at least compilable.

Starting from line 3 we have a diff of 2 build logs - before and after patching.

Lines 6 and 7 tell that the patch-set eliminated a warning - which is very welcome.

Lines 9 and 10 tell that the patch-set introduced a gcc warning - not good.

Line 11 tells that the patch made coccinelle complain about locking - worth checking
as coccinelle scripts we have in the kernel are rather high quality.

Line 12 tells that smatch has a complaint - also worth looking if this is a
false-positive or not.

Additionally, Aiaiai runs the bisectability tests when the patch-set contains
more than one patch. It applies patches one-by-one and compiles at each step,
and will report if compilation breaks.

Aiaiai also checks if the patch changes a defconfig file, and if it does, it will
verify that it is changed properly (make savedefconfig was used).

And Aiaiai also runs checkpatch.pl for the whole patch-set (squashed) and
every individual patch.

Aiaiai also includes scripts which may be used to attach it to an e-mail address,
so that when you can send patches to this e-mail address, and it will respond
with test results.

E.g., I use Aiaiai to verify incoming patches for the MTD subsystem since recently.
I have small helper scripts which run Aiaiai for several configurations and
architectures (i386, x86_64, ia64, ppc64, arm, mips). This makes me feel "safe"
when I apply patches to my l2-mtd.git' tree. I do this also for UBIFS and UBI

The README file contains more information:

Sorry if this stuff is not very user-friendly - feel free to ask questions and
send patches.

You can find Aiaiai here:
Gitweb: http://git.infradead.org/users/dedekind/aiaiai.git

* Intel and my colleagues
* Kirill Shutemov - he started writing this stuff, review, gave ideas, etc
* AltLinux guys for libshell
* Al Viro for the remapper
* Julia Lawall for amending coccinelle kernel patches to meet Aiaiai needs
* Dan Carpenter for amending smatch to meet Aiaiai needs
* Eric Melski for the serialize-log idea

Best Regards,
Artem Bityutskiy

Attachment: signature.asc
Description: This is a digitally signed message part