Outsource test rngen and compare to clo_test.c