A read on /dev/random (and /dev/urandom) returns a 0 instead of a -1 to indicate an error on zOS levels 1.6 and prior.
This puts apr/misc/unix/rand.c and therefore /test/testrandom into an infinite loop.
For zOS 1.7 and above, a read returns the expected number of bytes read, or a -1 if there's an error (ex. crypto hardware (ICSF) is not usable).

Add to the config checks for random a zOS level check. For zOS 1.7 and above config will indicate /dev/random is supported. At run time reads will determine if ICSF is available, but respond correctly either way.