]> Gentwo Git Trees - linux/.git/commit
selftests: vDSO: parse_vdso: Test __SIZEOF_LONG__ instead of ULONG_MAX
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 26 Feb 2025 11:44:52 +0000 (12:44 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 3 Mar 2025 19:00:13 +0000 (20:00 +0100)
commit032e871686483ec1bac27ce73e7094692fc76268
treeb8d576f4a99ebdc0416c4f400af4938e066c6ce6
parentc9fbaa879508ea36f5be0b3f1125b8f9f11b4945
selftests: vDSO: parse_vdso: Test __SIZEOF_LONG__ instead of ULONG_MAX

According to limits.h(2) ULONG_MAX is only guaranteed to expand to an
expression, not a symbolic constant which can be evaluated by the
preprocessor.

Specifically the definition of ULONG_MAX from nolibc can not be evaluated
by the preprocessor. To provide compatibility with nolibc, check with
__SIZEOF_LONG__ instead, with is provided directly by the preprocessor
and therefore always a symbolic constant.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-13-28e14e031ed8@linutronix.de
tools/testing/selftests/vDSO/parse_vdso.c