Re: [PATCH v2 00/12] klp-build: Fix dependent patches, add selftests
From: Petr Mladek
Date: Tue Nov 10 2026 - 07:51:49 EST
On Wed 2026-10-28 14:45:22, Song Liu wrote:
> klp-build fails when a later patch in the series depends on an earlier
> one, because it fixes each patch against the original source on its
> own. Patch 1 fixes this by combining the patches into a single patch
> before adding the #line directives.
>
> scripts/livepatch/Makefile | 3 +-
> scripts/livepatch/klp-build | 137 +--------
> scripts/livepatch/klp-prepare-patch | 277 ++++++++++++++++++
> tools/testing/selftests/Makefile | 1 +
> tools/testing/selftests/livepatch/README | 16 +
> .../livepatch/test_klp_build/Makefile | 26 ++
> .../livepatch/test_klp_build/functions.sh | 149 ++++++++++
> .../livepatch/test_klp_build/run-tests.sh | 68 +++++
> .../livepatch/test_klp_build/test-basic.sh | 93 ++++++
> .../test_klp_build/test-cancelling-patches.sh | 102 +++++++
> .../test-independent-patches.sh | 124 ++++++++
> .../test_klp_build/test-line-directives.sh | 175 +++++++++++
> .../test-new-and-deleted-files.sh | 94 ++++++
> .../test_klp_build/test-offset-and-fuzz.sh | 120 ++++++++
> .../test_klp_build/test-patch-not-applying.sh | 73 +++++
> .../test_klp_build/test-unsupported-files.sh | 30 ++
> 16 files changed, 1366 insertions(+), 122 deletions(-)
> create mode 100755 scripts/livepatch/klp-prepare-patch
> create mode 100644 tools/testing/selftests/livepatch/test_klp_build/Makefile
> create mode 100644 tools/testing/selftests/livepatch/test_klp_build/functions.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/run-tests.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-basic.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-cancelling-patches.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-independent-patches.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-line-directives.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-new-and-deleted-files.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-offset-and-fuzz.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-patch-not-applying.sh
> create mode 100755 tools/testing/selftests/livepatch/test_klp_build/test-unsupported-files.sh
I am sorry, I am overloaded and do not have time for a proper review.
I just see that it adds a lot of new files. And I wonder how much it
shares with the livepatch selftests. Would it make sense to put
it into a separate directory, e.g. tools/testing/selftests/klp-build ?
Best Regards,
Petr