]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: use the PID number in RPORT
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 15 Sep 2014 19:07:33 +0000 (21:07 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 15 Sep 2014 19:08:06 +0000 (21:08 +0200)
The shell's RANDOM isn't that random.

tests/scripts/common.sh

index 401d29062166b1871d5d38427be1177a973d027f..2ba11b4af3f744d77e6e77a188b99120cbc69320 100644 (file)
@@ -18,7 +18,7 @@
 # along with this file; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-RPORT="$((((RANDOM<<15)|RANDOM) % 63001 + 2000))"
+RPORT="$(((($$<<15)|RANDOM) % 63001 + 2000))"
 
 fail() {
    PID=$1