re: #392 (comment)
In commit "test: Skip thread name tests where OS thread names do not work" (88fd4610c2ebe488d42824e8beb1839db6b1a09a)
Consider OpenBSD, where the thread name tests are silently compiled out and SetOsThreadName() does nothing, yet CI is green.
Agree OpenBSD is a real gap, but I don't think the probe helps with it: on OpenBSD the probe also fails and the tests are skipped, so the only change from master is a warning in the test log. On platforms that work today, the probe makes a later breakage pass the same way.
I think with #396 this PR isn't needed for illumos anymore. The current HAVE_PTHREAD_GETNAME_NP guard caught exactly the case it should catch: names can be read back but SetOsThreadName() had no branch to set them. #396 adds that branch, so rebasing #393 on #396 instead of this PR should show the tests passing on illumos without a probe.
For OpenBSD, the no-op looks like it came from #324 porting this code: the original in Bitcoin Core calls pthread_set_name_np() for __OpenBSD__ too, but here that branch is keyed on HAVE_PTHREAD_GETTHREADID_NP, which only FreeBSD has. Restoring it, and reading names back with pthread_get_name_np() in ThreadName(), should cover OpenBSD as @ViniciusCestarii offered #392 (comment). After that, every platform in CI could set and read names, and the HAVE_PTHREAD_GETNAME_NP guard around the tests could be dropped, so a new platform without support would fail the tests instead of skipping them, which I think is the ideal you described.