ubuntu1604's kernel is a 4.4 with backported livepatch witch confuses
kpatch-build and livepatch-patch-hook.c. Integration tests currently
fail on load/unload stage. Disabling all ubuntu integration tests until
this is resolved.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Modules were previously prefixed with either 'kpatch-' or 'livepatch-'
depending on which was used. This is no longer true and all modules are
now prefixed with "test-". Update test scripts accordingly.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Modules were previously prefixed with either 'kpatch-' or 'livepatch-'
depending on which was used. This is no longer true and all modules are
now prefixed with "test-". Update test scripts accordingly.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Original build includes "kzalloc" in af_netlink.c's symbol list, this
does not happen during kpatch build so create-diff-object fails with
find_local_syms.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
kpatch-build currently fails with "invalid ancestor" error. This happens
with at least drivers/gpu/drm/i2c/adv7511.o and drivers/hwmon/htu21.o
files. The problem is their .ko counterparts are never built for some
reason, This looks like a kernel bug since in both cases there are files
with same name but in different paths that have .ko module built.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Use a kpatch-specific snapshot of centos7 image since we are still
running into problems we saw on fedora/ubuntu.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Unlike fedora, ubuntu doesn't keep older versions of kernel sources in
their archive so we need to have them predownloaded.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
run_custom_test used global "file" variable instead of local "testprog"
to deduce "prefix", so it would sometimes report wrong name for running
test.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Temporary disable meminfo-cmdline-rebuild-SLOW.patch, right now it is
hitting https://github.com/dynup/kpatch/issues/767
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Add a target to install vagrant, make sure the user is given a warning
and a chance to cancel this operation.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit adds scripts/make targets to run integration tests on
fedora/ubuntu/centos through vagrant.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Vagrant installation functions for fedora/centos with libvirt plugin.
This is intended to be used in scripts to provision a new test-machine,
human users of vagrant integration test targets are expected to have
working vagrant installation.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Add functions to prepare a separate partition/disk for cache use
(.ccache and .kpatch dirs). This is useful for vagrant images that are
generally not big enough for kpatch build.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Add test/integration/lib.sh for use in other kpatch related scripts
and or directly by end-users. Initial version contains per-distro
dependency functions, so it can be quickly installed as follows:
$ . test/integration/lib.sh
$ kpatch_dependencies
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Bump unit-test-objs submodule head pointer to include latest test:
f82c458 x86_64: added a test for a function that uses _THIS_IP_
4a097d9 ppc64le: Test const var requiring .data.rel relocation
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Treat -SLOW patches the same way as normal ones, i.e. include them
during "quick" testing. Keeping "-SLOW" suffix in patch names to as a
way to distinguish them manually.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
We are not including -SLOW patches into combined module, so there is no
reason to expect their -LOADED tests to succeed with combined module.
Skip them in run_combined_test().
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Update submodule pointer to include new gcc8 unit tests.
This update also includes unit-test for https://github.com/dynup/kpatch/pull/892
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Don't try to call unittest clean if objfile dir is non-existant (e.g.
when objfile submodule wasn't cloned). Another solution would be to make
clean target dependant on objdir but that would mean downloading a lot
of unneeded data for users who don't run unit-tests.
Fixes: #872
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Since c0105ea467 ("kpatch-build: set default module prefix
accordingly") kpatch-build has automatically named resulting patch
modules with a "kpatch-" or "livepatch-" prefix (depending on its type).
To avoid naming confusion, have kpatch-test name all of its patch
modules with a "test-" prefix.
Fixes#867.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This fixes the following error with an older version of git
(1.8.3.1):
make -C test/unit
make[1]: Entering directory `/root/kpatch/test/unit'
git submodule update --init --rebase
You need to run this command from the toplevel of the working tree.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
create-diff-object doesn't really need the full kernel object file as
input. All it requires is a symbol table. Switch to using "eu-readelf -s"'s
output instead of object files. This will enable us to cover more cases
in unit tests.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Artem Savkov <asavkov@redhat.com>
ppc64le lacked kpatch_line_macro_change_only() implementation. Add one
based on x86_64 version and available unit tests.
Fixes: #843
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Update submodule to 6774fbc "ppc64le: initial object files"
Remove CDO_ENV since it is moved to per-arch makefiles.
Signed-off-by: Artem Savkov <asavkov@redhat.com>
While convenient git-lfs has too many restrictions for kpatch's needs.
Remove links to the objectfiles and related configs.
Signed-off-by: Artem Savkov <asavkov@redhat.com>