sockets: Add a function to disable all listening sockets.

When invoking several copies of m5 on the same machine at the same
time, there can be a race for TCP ports for the terminal connections
or remote gdb.  Expose a function to disable those ports, and have the
regression scripts disable them.  There are some SimObjects that have
no other function than to be used with ports (NativeTrace and
EtherTap), so they will panic if the ports are disabled.
This commit is contained in:
Nathan Binkert
2008-08-03 18:19:55 -07:00
parent ede89c2d54
commit 50ef39af82
9 changed files with 56 additions and 4 deletions

View File

@@ -26,7 +26,12 @@
#
# Authors: Steve Reinhardt
import os, sys
import os
import sys
import m5
# Since we're in batch mode, dont allow tcp socket connections
m5.disableAllListeners()
# single "path" arg encodes everything we need to know about test
(category, name, isa, opsys, config) = sys.argv[1].split('/')
@@ -57,8 +62,7 @@ execfile(os.path.join(tests_root, 'configs', config + '.py'))
# set default maxtick... script can override
# -1 means run forever
from m5 import MaxTick
maxtick = MaxTick
maxtick = m5.MaxTick
# tweak configuration for specific test