From: Bob Glossman Date: Tue, 24 Nov 2015 19:29:43 +0000 (-0800) Subject: LU-7103 test: avoid cat of /dev/urandom X-Git-Tag: 2.7.64~13 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F17350%2F3;p=fs%2Flustre-release.git 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 --- 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