I managed to reproduce this locally using QEMU. It looks like to me this is not a new issue, see the following two Github issues which are mostly report from users with Alpine Linux using musl:
There is a theory in one of the Github issues that the problem is related to enabling LTO. I'm not sure how to proceed/debug this exactly but I'll at least add my input into the Github issue in case it helps.
Moving forward... is it acceptable to disable running this test? I don't personally like it as it is likely it won't be enabled again.
For reference, these are the commands I used:
On host machine:
1) source layers/openembedded-core/oe-init-build-env
2) bitbake core-image-ptest-bluez5
3) runqemu qemux86-64 core-image-ptest-bluez5 slirp nographic
Within the QEMU image terminal:
1) ptest-runner bluez5
In local.conf I added:
TCLIBC="musl"
DISTRO_FEATURES:append = " ptest"
EXTRA_IMAGE_FEATURES += "ptest-pkgs"
IMAGE_FEATURES:append = " allow-empty-password empty-root-password allow-root-login" # (I was having some trouble with the root login, this line seemed to work for QEMU)
Best regards
Gudni