Skip to content

tests/gold_tests/autest-site/ports.py isn't very reliable #9289

Description

@ywkaras

ports.py is used by tests/gold_tests/autest-site/trafficserver.text.ext and other Au Test extensions to find available TCP ports. But, when I ran this script, which run 5 concurrent instances of Au Test:

umask 0
for N in $( seq 1 5 )
do
  mkdir -p $N/TS/tests
  cd $N/TS/tests
  for F in ~/REPOS/TS/tests/*
  do
      ln -s $F
  done

  ./autest.sh --ats-bin ~/TSX/TS/bin -f basic &

  cd ../../..
done

I get these errors:

wkaras ~/LINK_TS
O$ grep -F ERROR: */TS/tests/_sandbox/basic/ts/log/diags.log
1/TS/tests/_sandbox/basic/ts/log/diags.log:[Jan  7 18:38:54.721] [ET_NET 7] ERROR: Could not bind or listen to port 61000 (error: -1)
1/TS/tests/_sandbox/basic/ts/log/diags.log:[Jan  7 18:38:54.721] [ET_NET 7] ERROR: Could not bind or listen to port 61001 (error: -1)
3/TS/tests/_sandbox/basic/ts/log/diags.log:[Jan  7 18:38:54.732] [ET_NET 7] ERROR: Could not bind or listen to port 61000 (error: -1)
3/TS/tests/_sandbox/basic/ts/log/diags.log:[Jan  7 18:38:54.733] [ET_NET 7] ERROR: Could not bind or listen to port 61001 (error: -1)
4/TS/tests/_sandbox/basic/ts/log/diags.log:[Jan  7 18:38:54.706] [ET_NET 7] ERROR: Could not bind or listen to port 61000 (error: -1)
4/TS/tests/_sandbox/basic/ts/log/diags.log:[Jan  7 18:38:54.706] [ET_NET 7] ERROR: Could not bind or listen to port 61001 (error: -1)
wkaras ~/LINK_TS
O$

Perhaps there is no clean solution to this issue. As a work-around, in the dedicated plugin for the TSVConnFd Au Test, I had to use this retry loop:

.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions