From cddbef5fae44d09756639c4cd9de62f28f5b34cf Mon Sep 17 00:00:00 2001 From: Bob Glossman Date: Tue, 24 Nov 2015 11:29:43 -0800 Subject: [PATCH] LU-7103 test: avoid cat of /dev/urandom Use a different command to generate a random number. Using cat /dev/urandom doesn't work in all cases. Test-Parameters: clientdistro=el7 testlist=ost-pools,ost-pools,ost-pools,ost-pools,ost-pools,ost-pools,ost-pools, ost-pools,ost-pools,ost-pools,ost-pools,ost-pools,ost-pools,ost-pools Signed-off-by: Bob Glossman Change-Id: I63cfad2654cf654460263529457538965e373f82 Reviewed-on: http://review.whamcloud.com/17350 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/ost-pools.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index a53fa90..eb2ec58 100644 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -683,7 +683,8 @@ test_7a() # Generate pool with random name from 1 to 15 characters for i in 1 9 15 ; do - POOLNAME=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $i | + POOLNAME=$(echo $$$RANDOM$RANDOM | + tr -dc 'a-zA-Z0-9' | fold -w $i | head -n 1) echo set poolname to $POOLNAME helper_test_7a $POOLNAME -- 1.8.3.1