Re: [PATCH 5/8] KVM: selftests: Add vsprintf() to KVM selftests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 01, 2023, Aaron Lewis wrote:
> Add string formatting support to the guest by adding a local version
> of vsprintf with no dependencies on LIBC.

Heh, this confused me for a second.  Just squash this with the previous patch,
copying an entire file only to yank parts out is unnecessary and confusing.

> There were some minor fix-ups needed to get it compiling in selftests:
>  - isdigit() was added as a local helper.
>  - boot.h was switch for test_util.h.
>  - printf and sprintf were removed.  Support for printing will go
>    through the ucall framework.

As usual, just state what the patch does, not what you did in the past.

>  #endif /* SELFTEST_KVM_TEST_UTIL_H */
> diff --git a/tools/testing/selftests/kvm/lib/printf.c b/tools/testing/selftests/kvm/lib/printf.c
> index 1237beeb9540..d356e55cbc28 100644
> --- a/tools/testing/selftests/kvm/lib/printf.c
> +++ b/tools/testing/selftests/kvm/lib/printf.c
> @@ -13,7 +13,12 @@
>   *
>   */
>  
> -#include "boot.h"
> +#include "test_util.h"
> +
> +int isdigit(int ch)

static?

> +{
> +	return (ch >= '0') && (ch <= '9');
> +}



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux