OSDN Git Service

KVM: selftests: Add strnlen() to the string overrides
authorAaron Lewis <aaronlewis@google.com>
Sat, 29 Jul 2023 00:36:13 +0000 (17:36 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 2 Aug 2023 21:41:59 +0000 (14:41 -0700)
commita1c1b55e116c14de4f8a78286b502101f2a1620c
tree189c0f6003701b55341ee3d315a857d59fa43e4a
parent6783ca4105a75d1ba4f89b13cef1bc1f677c41e5
KVM: selftests: Add strnlen() to the string overrides

Add strnlen() to the string overrides to allow it to be called in the
guest.

The implementation for strnlen() was taken from the kernel's generic
version, lib/string.c.

This will be needed when printf() is introduced.

Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Link: https://lore.kernel.org/r/20230729003643.1053367-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/lib/string_override.c