swr-test: use uint_rand() for mode too