build: unify and fix endian tests