[PATCH v4 0/2] Make liveupdate selftests library

Vipin Sharma posted 2 patches 4 days, 4 hours ago
tools/testing/selftests/liveupdate/.gitignore |   1 +
tools/testing/selftests/liveupdate/Makefile   |  14 +--
.../include/libliveupdate.h}                  |  11 +-
.../selftests/liveupdate/lib/libliveupdate.mk |  20 ++++
.../{luo_test_utils.c => lib/lu_utils.c}      |  63 +++++++++--
.../testing/selftests/liveupdate/liveupdate.c | 106 +++++-------------
.../selftests/liveupdate/luo_kexec_simple.c   |   2 +-
.../selftests/liveupdate/luo_multi_session.c  |   2 +-
.../selftests/liveupdate/luo_stress_files.c   |   3 +-
.../liveupdate/luo_stress_sessions.c          |   3 +-
tools/testing/selftests/liveupdate/vmtest.sh  |   4 +-
11 files changed, 122 insertions(+), 107 deletions(-)
rename tools/testing/selftests/liveupdate/{luo_test_utils.h => lib/include/libliveupdate.h} (77%)
create mode 100644 tools/testing/selftests/liveupdate/lib/libliveupdate.mk
rename tools/testing/selftests/liveupdate/{luo_test_utils.c => lib/lu_utils.c} (83%)
[PATCH v4 0/2] Make liveupdate selftests library
Posted by Vipin Sharma 4 days, 4 hours ago
Hello,

This is v4 series of refactoring liveupdate selftests as a library. It
exposes common liveupdate ioctls as a library which can be used by other
selftests like VFIO and IOMMU.

Currently, there are no users of this change but it is being used in
VFIO and iommu liveupdate series.

  VFIO: https://lore.kernel.org/kvm/20260714151505.3466855-1-vipinsh@google.com/
  IOMMU: https://lore.kernel.org/linux-iommu/20260614233728.2212104-1-skhawaja@google.com/

I think it is better to move the patches out from the above series and
propose them as a separate series for inclusion in liveupdate repo. That
way we can decouple multiple downstream dependencies and then it can be
used by VFIO, IOMMU, and KVM (guest_memfd preservation) separately.

v4:
 - Rebased on latest liveupdate git repo.
 - Update luo util path in newly added vm_tesh.sh script.

v3: https://lore.kernel.org/kexec/20260612214512.464146-1-vipinsh@google.com
 - Renamed liveupdate.c in the library to lu_utils.c
 - Reordered patches, first abstract out ioctls to utils file then
   create libary.
 - Using stricter check for ioctls.
 - Reordered header include, also, keeping c lib headers as a separate
   block.

v2: https://lore.kernel.org/kexec/20260610230909.876546-1-vipinsh@google.com/
 - Addressed Sashiko feedback regarding folder creation.
   https://sashiko.dev/#/patchset/20260511201155.1488670-1-vipinsh%40google.com
 - Update liveupdate.c test to use ioctl wrappers in library

v1: https://lore.kernel.org/all/20260511201155.1488670-1-vipinsh@google.com/

Vipin Sharma (2):
  selftests/liveupdate: Use luo_test_utils.c for liveupdate ioctl APIs
  selftests/liveupdate: Move luo_test_utils.* into a reusable library

 tools/testing/selftests/liveupdate/.gitignore |   1 +
 tools/testing/selftests/liveupdate/Makefile   |  14 +--
 .../include/libliveupdate.h}                  |  11 +-
 .../selftests/liveupdate/lib/libliveupdate.mk |  20 ++++
 .../{luo_test_utils.c => lib/lu_utils.c}      |  63 +++++++++--
 .../testing/selftests/liveupdate/liveupdate.c | 106 +++++-------------
 .../selftests/liveupdate/luo_kexec_simple.c   |   2 +-
 .../selftests/liveupdate/luo_multi_session.c  |   2 +-
 .../selftests/liveupdate/luo_stress_files.c   |   3 +-
 .../liveupdate/luo_stress_sessions.c          |   3 +-
 tools/testing/selftests/liveupdate/vmtest.sh  |   4 +-
 11 files changed, 122 insertions(+), 107 deletions(-)
 rename tools/testing/selftests/liveupdate/{luo_test_utils.h => lib/include/libliveupdate.h} (77%)
 create mode 100644 tools/testing/selftests/liveupdate/lib/libliveupdate.mk
 rename tools/testing/selftests/liveupdate/{luo_test_utils.c => lib/lu_utils.c} (83%)


base-commit: e9089cc16239725330e8e8a5748face3b8e995b7
-- 
2.55.0.229.g6434b31f56-goog
Re: [PATCH v4 0/2] Make liveupdate selftests library
Posted by Mike Rapoport 3 days, 15 hours ago
On Mon, 20 Jul 2026 13:32:00 -0700, Vipin Sharma wrote:
> Make liveupdate selftests library
> 
> Hello,
> 
> This is v4 series of refactoring liveupdate selftests as a library. It
> exposes common liveupdate ioctls as a library which can be used by other
> selftests like VFIO and IOMMU.
> 
> [...]

Applied to selftests-lib branch of liveupdate/linux.git tree, thanks!

[1/2] selftests/liveupdate: Use luo_test_utils.c for liveupdate ioctl APIs
      commit: c5555d4777e3bb80b1b4b25bd678085e22a02d08
[2/2] selftests/liveupdate: Move luo_test_utils.* into a reusable library
      commit: a19aa15b814d0b824b4af8718568e69397fc2e95

tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
branch: selftests-lib

--
Sincerely yours,
Mike.