selftests/nolibc: fix up int_fast16/32_t test cases for musl
authorZhangjin Wu <falcon@tinylab.org>
Fri, 7 Jul 2023 18:27:40 +0000 (02:27 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 02:38:02 +0000 (04:38 +0200)
commit989abf1c7bc590969ef1b19b8e64b69423bfacc7
tree7bac31f47d92667a81d3e817efa841e7be3a9cfa
parent5f2de00e2c9ce00708bbf24f70ceda2ed35e9780
selftests/nolibc: fix up int_fast16/32_t test cases for musl

musl limits the fast signed int in 32bit, but glibc and nolibc don't, to
let such test cases work on musl, let's provide the type based
SINT_MAX_OF_TYPE(type) and SINT_MIN_OF_TYPE(type).

Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/lkml/bc635c4f-67fe-4e86-bfdf-bcb4879b928d@t-8ch.de/
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test.c