Hello,
This is v2 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. https://lore.kernel.org/kvm/[email protected]/ https://lore.kernel.org/linux-iommu/[email protected]/ 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. v2: - 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/[email protected]/ Vipin Sharma (2): selftests/liveupdate: Move luo_test_utils.* into a reusable library selftests/liveupdate: Add helpers to preserve/retrieve FDs tools/testing/selftests/liveupdate/.gitignore | 1 + tools/testing/selftests/liveupdate/Makefile | 14 ++---- .../include/libliveupdate.h} | 10 +++-- .../selftests/liveupdate/lib/libliveupdate.mk | 20 +++++++++ .../{luo_test_utils.c => lib/liveupdate.c} | 43 ++++++++++++++----- .../testing/selftests/liveupdate/liveupdate.c | 40 ++++++----------- .../selftests/liveupdate/luo_kexec_simple.c | 2 +- .../selftests/liveupdate/luo_multi_session.c | 2 +- .../selftests/liveupdate/luo_stress_files.c | 2 +- .../liveupdate/luo_stress_sessions.c | 2 +- 10 files changed, 81 insertions(+), 55 deletions(-) rename tools/testing/selftests/liveupdate/{luo_test_utils.h => lib/include/libliveupdate.h} (80%) create mode 100644 tools/testing/selftests/liveupdate/lib/libliveupdate.mk rename tools/testing/selftests/liveupdate/{luo_test_utils.c => lib/liveupdate.c} (91%) base-commit: 3a358c78093f98a70d84c934b7054f636bc846f2 -- 2.54.0.1099.g489fc7bff1-goog

