Skip to content

Add compatibility fixes for KVM selftests with non-glibc C libraries

Aqib Faruqui kvm linux-kselftest lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 0 repliesNew
  2. v19 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Split pidfd patch into two separate commits
- Dropped PAGE_SIZE redefinition patch - will root cause warning separately
- Dropped __packed fallback patch - tools infrastructure already handles this correctly
- Dropped pthread_attr_setaffinity_np patch - maintainer provided solution

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7selftests/pidfd: Add architecture-specific fallback definitions for pidfd_opentools/testing/selftests/pidfd/pidfd.h+4 -00 replies
2/7selftests: harness: Include pidfd.h to get syscall definitions from tools/tools/testing/selftests/kselftest_harness.h+1 -00 replies
3/7selftests: kselftest: Add memfd_create syscall compatibilitytools/testing/selftests/kselftest.h tools/testing/selftests/kvm/lib/kvm_util.c+20 -00 replies
4/7KVM: selftests: Add backtrace fallbacktools/testing/selftests/kvm/lib/assert.c+9 -10 replies
5/7rseq: selftests: Add non-glibc compatibility fixestools/testing/selftests/rseq/rseq-x86-thread-pointer.h tools/testing/selftests/rseq/rseq.c+22 -00 replies
6/7selftests: Fix stdbuf compatibility in mixed libc environmentstools/testing/selftests/kselftest/runner.sh+1 -10 replies
7/7selftests: kselftest: Add ulong typedef for non-glibc compatibilitytools/testing/selftests/kselftest.h+5 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/7] Add compatibility fixes for KVM selftests with non-glibc C libraries

This patch series adds compatibility fixes for building and running KVM selftests with musl and other non-glibc implementations. The changes address missing function definitions, syscall numbers, macros, type definitions, and runtime compatibility issues that are otherwise handled by glibc.

The series includes both build-time compatibility fixes (missing definitions, type mismatches) and runtime fixes (stdbuf compatibility in mixed libc environments) to ensure KVM selftests work correctly across different C library implementations.

Changes in v2:
- Split pidfd patch into two separate commits
- Dropped PAGE_SIZE redefinition patch - will root cause warning separately
- Dropped __packed fallback patch - tools infrastructure already handles this correctly
- Dropped pthread_attr_setaffinity_np patch - maintainer provided solution

Aqib Faruqui (7):
selftests/pidfd: Add architecture-specific fallback definitions for
pidfd_open
selftests: harness: Include pidfd.h to get syscall definitions from
tools/
selftests: kselftest: Add memfd_create syscall compatibility
KVM: selftests: Add backtrace fallback
rseq: selftests: Add non-glibc compatibility fixes
selftests: Fix stdbuf compatibility in mixed libc environments
selftests: kselftest: Add ulong typedef for non-glibc compatibility

 tools/testing/selftests/kselftest.h                    | 24 ++++++++++++++++++++++++
 tools/testing/selftests/kselftest/runner.sh            |  2 +-
 tools/testing/selftests/kselftest_harness.h            |  1 +
 tools/testing/selftests/kvm/lib/assert.c               | 10 +++++++++-
 tools/testing/selftests/kvm/lib/kvm_util.c             |  1 +
 tools/testing/selftests/pidfd/pidfd.h                  |  4 ++++
 tools/testing/selftests/rseq/rseq-x86-thread-pointer.h | 14 ++++++++++++++
 tools/testing/selftests/rseq/rseq.c                    |  8 ++++++++
 8 files changed, 62 insertions(+), 2 deletions(-)
Signature · 1 line
2.47.3