add automated testing system

This commit introduces a simple automated testing system
with 3 simple testcase.

For each test case there is a .c, a .patch, and a .inventory
file.  The .c is compiled, using the flags from the kflags file,
to create the original object.  The .c file is then patched
with the .patch file and rebuilt to create the patched object.
The files are then analyzed by the differencing tool and an
output object is generated with a .inventory file that lists
the sections and symbol included in the output object.  That
inventory file is then compared to the .inventory file for
that testcase.  If they are the same, the test passes. If
not, the differences in the inventory files are displayed,
and the test fails.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
Merge pull request #51 from spartacus06/testingwork

add automated testing system
Merge pull request #52 from spartacus06/fixes

add a few comments and st_value !=0 error
make kpatch-build a first class script

kpatch-build is outgrowing the kpatch script and probably is a better
fit as its own utility instead of being wrapped by kpatch.  Install
kpatch-build into /usr/local/bin, remove the kpatch wrapper around it,
and update the README accordingly.
kpatch-build --sourcedir option

Allow the user to supply a custom kernel source directory.  This copies
the directory to ~/.kpatch/src instead of using it in place.  Otherwise
the "make mrproper" (which is needed for compiling objects in a separate
tree) would modify the original source tree and remove its .config file.

There's currently no caching support for this option.  If needed, we
could implement that pretty easily by calculating an md5sum of the
original source directory.
Merge pull request #50 from jpoimboe/sourcedir-option

kpatch-build: remove "kpatch build" wrapper and add --sourcedir option
add file hint to add-patches-section

Currently, add-patches-section just blindly looks in vmlinux
for a function symbol matching the name of the patched function
in the input object file.  However, for local symbols, they may
appear multiple times in the vmlinux symbol table since the symbol
name may be reused locally in different files.

This commit add support for "file hinting".  It tracks what
file the symbol is in and searches for local symbols within
that file in vmlinux first.  If it doesn't find one, it then
searches globally like it always has.

Fixes issue #53

Signed-off-by: Seth Jennings <sjenning@redhat.com>
remove dead code

Signed-off-by: Seth Jennings <sjenning@redhat.com>
remove obsolete comment

Signed-off-by: Seth Jennings <sjenning@redhat.com>
add file hint to link-vmlinux-syms

Same as "add file hint to add-patches-section" to fix
symbol name collisions when looking up in vmlinux

Fixes issue #54

Signed-off-by: Seth Jennings <sjenning@redhat.com>
remove obsolete comment

Signed-off-by: Seth Jennings <sjenning@redhat.com>
add TODO to de-dup code

Signed-off-by: Seth Jennings <sjenning@redhat.com>