Commit Graph

8 Commits

Author SHA1 Message Date
Julien Thierry 11df5340c9 test/integration: Add integration tests for symvers disagreement
Add a RHEL reproducer that causes a kpatch-build to fail when the final
module references a symbol with a different CRC than the original
kernel.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2020-08-17 12:38:32 +01:00
Joe Lawrence 54268bfb3e integration: update gcc-static-local-var-4.test
The gcc-static-local-var-4.patch and test check that unmodified
functions that contain dynamic debugging printk's aren't incorrectly
included in the resulting livepatch .ko.

Note that on RHEL-7.7 ppc64le, the gcc-static-local-var-4.ko livepatch
module may include klp-relocation references to free_ioctx(), a function
that would match the above criteria.  These klp-relocation symbols are
OK as they are only used for referencing said functions, they are not
copies that the check should FAIL on.

Modify gcc-static-local-var-4.test in a few ways:

  - Use eu-readelf instead of readelf, which some versions have problems
    handling klp-relocations.

  - Set pipefail to catch any errors in the symbol table dump (missing
    elfutils, etc.)

  - Instead of a grep regex, use awk to string compare exact function
    and module names.  This avoids matching on .klp.sym prefixed
    klp-relocation symbols.

Fixes #1069.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2020-02-14 16:09:37 -05:00
Artem Savkov a48fb4a6f6 integration: rhel-7.6 and 7.7 module-call-external fix unsupported sibling call
These patches cause the following error on ppc64le on both 7.7 and 7.6:
create-diff-object: ERROR: export.o: kpatch_no_sibling_calls_ppc64le: 3290: Found an unsupported sibling call at e_show()+0x100.  Add __attribute__((optimize("-fno-optimize-sibling-calls"))) to e_show() definition.

Adding -fno-optimize-sibling-calls breaks build on x86_64, so limit it
to ppc64le only.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2020-01-24 10:37:35 +01:00
Artem Savkov 94156bed45 integration: disable tests with jump labels
Disabled due to #940. Please re-enable this test once it is fixed.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2020-01-24 10:37:25 +01:00
Julien Thierry e59355c2b7 test/integration: Make multiple.test cleanup after itself
If an error occurs while loading a module or one of the tests,
multiple.test will exit leaving the working modules loaded. This leaves
the system in an unwanted state and causes the test that previously pass
to fail (succeeding before being loaded for multiple.test's point of
view).

Cleanup the loaded modules before exiting due to errors.

Also take this opportunity to factorize the test for the different
distros.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2019-10-08 08:31:39 +01:00
Artem Savkov 52d4936e72 integration/rhel-*: fix multiple.test
When these from internal depths of Red Hat upstream paths changed and
now we are one level deeper in directory tree.

The issue probably also exist in rhel8.0 rebase pr #993.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2019-09-18 12:29:50 +02:00
Josh Poimboeuf 0e57bb0236 test/integration: disable sibling calls in failing integration tests
Now that sibling calls aren't supported in ppc64le, change the RHEL 7.5
and 7.6 versions of the new-function tests to disable the sibling call
optimization.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2019-07-23 11:11:29 -05:00
Artem Savkov 76ebcd2fa4 test/integration: add patches rebased for recent rhel minor releases
This commit contains centos-7 patches rebased and adjusted to work with
recent rhel minors so that integration tests actually pass on those.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2019-06-14 10:53:57 +02:00