From 9efc6f7c4d00b4d0c0f372d027bf0788a7efd2b7 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 27 Sep 2023 20:44:50 -0400 Subject: [PATCH] fix(unittests): ignore __s128 and __u128 types in ffi Linux added these types to their userspace headers in [6.5], which causes unit tests to fail like ``` -------- Running tests from test/unit/api/private_helpers_spec.lua RUN vim_to_object converts true: 17.00 ms ERR test/unit/helpers.lua:748: test/unit/helpers.lua:732: (string) ' test/unit/helpers.lua:264: ';' expected near '__s128' at line 194' exit code: 256 stack traceback: test/unit/helpers.lua:748: in function 'itp_parent' test/unit/helpers.lua:784: in function ``` Since we don't use these types, they can be ignored to avoid LuaJIT's C parser choking on them. [6.5]: https://github.com/torvalds/linux/commit/224d80c584d3016cb8d83d1c33914fdd3508aa8c (cherry picked from commit 0df0e1198bb93bc380beb9cb0951e8c94f8213d3) --- test/unit/helpers.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 708929ad9f..56d2cd3adf 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -132,6 +132,8 @@ local function filter_complex_blocks(body) if not (string.find(line, "(^)", 1, true) ~= nil or string.find(line, "_ISwupper", 1, true) or string.find(line, "_Float") + or string.find(line, "__s128") + or string.find(line, "__u128") or string.find(line, "msgpack_zone_push_finalizer") or string.find(line, "msgpack_unpacker_reserve_buffer") or string.find(line, "UUID_NULL") -- static const uuid_t UUID_NULL = {...}