Cleaning house a bit. Now that we have unit tests, a lot of these tests
aren't very useful anymore.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
After doing some research, I've discovered that most of these tests no
longer test what they were originally intended to test.
An exception here is the 'macro-hooks' test, which is probably better
suited as an integration test, so I removed its unit test and kept its
integration test.
Really, most of these tests weren't all that useful to begin with, so
it's not a big loss. The one exception is 'gcc-static-local-var-2',
which was originally meant to test multiple static local variables with
the same name in the name function. That's a good thing, so I'll try to
come up with another test for that which works with Linux 4.16.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
The test case gcc-static-local-var-2 doesn't uses any macros
from kpatch-macros.h, so remove the hunk including it.
Cc: Joe Lawrence <jdl1291@gmail.com>
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
This patch adds a reproducer testcase for correlating static local
variables added in .rodata* section, ahead of .toc section. This
testcase is for issue seen on PowerPC. For more details on the issue
refer pull request: 793.
It add's the testcase for:
- Fedora-27 Kernel version 4.15.10-300
- Centos-7 Kernel version 3.10.0-693 and
- Ubuntu-16.04 Kernel version 4.13.0-25.29
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Upstream 4.15 kernels provide support for pre and post (un)patch
callbacks, inspired by the kpatch load hooks. Add support for them
in the livepatch-patch-hook.
At the same time, convert the kpatch hooks to use the same API.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>