For now I only could come up with a workaround disabling the unit tests in all architectures except amd64.
https://salsa.debian.org/java-team/jnr-ffi/-/commit/68b9e6c360b4f27f199af8c564d6ff74d09fa0f2 Upstream doesn't really test on i386. They have support for arm64 but the required dependency is not available in Debian yet. In 1 week or so, I'll take a look at the amd64 failures when running in 1 CPU as reported by Santiago. I'm also observing the tests take too long, making the build time 30-40 mins, this doesn't make sense for a normal size library like this one. Anyway, based on what I find at that point, I'll take a decision to go with the workaround linked above and/or address the other outstanding issue(s).