Re: [PATCH v2 1/6] vfio: selftests: Introduce snprintf_assert()
From: David Matlack
Date: Wed Jan 07 2026 - 17:21:26 EST
On 2025-12-10 06:14 PM, Raghavendra Rao Ananta wrote:
> Introduce snprintf_assert() to protect the users of snprintf() to fail
> if the requested operation was truncated due to buffer limits. VFIO
> tests and libraries, including a new sysfs library that will be introduced
> by an upcoming patch, rely quite heavily on snprintf()s to build PCI
> sysfs paths. Having a protection against this will be helpful to prevent
> false test failures.
>
> Signed-off-by: Raghavendra Rao Ananta <rananta@xxxxxxxxxx>
Reviewed-by: David Matlack <dmatlack@xxxxxxxxxx>