Package: frr Version: 10.2.1-1 Tags: ftbfs patch Usertags: hppa Fix the FTBFS on all big endian architectures instead of just ignoring the testcase on s390x.
Patch attached. Please apply and push upstream if OK, Thanks! Helge --- [PATCH] Fix TestFrrscript.test_exit_cleanly test case on big endian platforms The fact() function returns a long long value. So make sure to read all 64 bits since on big endian platforms the first 32-bits of a given address holds the upper 32-bit of the 64-bit value (which is 0 in this testcase instead of the expected value of 24). This fixes the testcase on s390x, hppa, powerpc, ppc64 and sparc64. Signed-off-by: Helge Deller <[email protected]> diff -up ./tests/lib/test_frrscript.c.org ./tests/lib/test_frrscript.c --- ./tests/lib/test_frrscript.c.org 2024-12-24 23:49:06.735870003 +0000 +++ ./tests/lib/test_frrscript.c 2024-12-24 23:49:33.976380363 +0000 @@ -54,7 +54,7 @@ int main(int argc, char **argv) n = 4; result = frrscript_call(fs, "fact", ("n", &n)); assert(result == 0); - ansptr = frrscript_get_result(fs, "fact", "ans", lua_tointegerp); + ansptr = frrscript_get_result(fs, "fact", "ans", lua_tolonglongp); assert(*ansptr == 24); XFREE(MTYPE_SCRIPT_RES, ansptr); ----- End forwarded message -----

