From db2c3d1143fb5888602a2cee84578bd8a9c88bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Fri, 21 Feb 2025 23:37:15 +0000 Subject: [PATCH] fix(tests): filter out lines with __typeof__ keyword (#32524) Problem: On 32-bit architectures, musl libc makes heavy use of __typeof__ as part of its __REDIR macro for optional backwards compatibility with 32-bit time_t values. Unfortunately, the __typeof__ keyword is not supported by the LuaJIT C parser. Solution: Filter out the keyword in filter_complex_blocks. --- test/unit/testutil.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/testutil.lua b/test/unit/testutil.lua index 7fe27ad735..7fd0e73b47 100644 --- a/test/unit/testutil.lua +++ b/test/unit/testutil.lua @@ -146,6 +146,8 @@ local function filter_complex_blocks(body) or string.find(line, 'value_init_') or string.find(line, 'UUID_NULL') -- static const uuid_t UUID_NULL = {...} or string.find(line, 'inline _Bool') + -- used by musl libc headers on 32-bit arches via __REDIR marco + or string.find(line, '__typeof__') -- used by macOS headers or string.find(line, 'typedef enum : ') or string.find(line, 'mach_vm_range_recipe')