Instead of building *.patch, allow the user to specify patch files on
the command line. For example:
kpatch-test --quick centos-7/cmdline-string.patch centos-7/data-new.patch
Update the top-level Makefile as well, so it can be similarly invoked:
PATCHES="centos-7/cmdline-string.patch centos-7/data-new.patch" make quick
If no patches are specified on the kpatch-test command line, then fall
back to the previous behavior of *.patch.
NOTE: If patches *are* specified, then only the .test files
corresponding to those patches will be executed. Provided patch paths
will also override any --directory value.
Move the integration tests Makefile up a directory level so that it can
be shared. Update the kpatch-test script to accept a patch-directory
argument and the multiple.test cases to handle this new arrangement.
The integration tests are targeted for Fedora kernels, so move them to a
new f22 directory. The README file specifies the exact kernel version
they're targeted for.
Combine all the patch modules into a single kpatch-COMBINED.ko for a
much quicker test which still gives 95% or so of the coverage compared
to the full test suite. Use "make quick" for use this new option.
This is a basic integration test framework for kpatch, which tests
building, loading, and unloading patches, as well as any other related
custom tests.
The kpatch-test script looks for test input files in the
tests/integration directory. It expects certain file naming
conventions:
- foo.patch - patch that should build successfully
- bar-FAIL.patch - patch that should fail to build
- foo-LOADED.test - executable which tests whether the foo.patch module
is loaded. It will be used to test that loading/unloading the patch
module works as expected.
Any other *.test files will be executed after all the patch modules have
been built from the *.patch files. They can be used for more custom
tests above and beyond the simple loading and unloading tests.
I just have one test here, but many more to come eventually. I'm
constantly doing manual testing of patches and am planning on automating
them with this framework.