make test: tell vpp to set coredump size
Unless overridden by COREDUMP_SIZE env variable, tell VPP to set coredump size to unlimited, otherwise use $COREDUMP_SIZE as the argument. Change-Id: Ia2a6508207c66a171b33d272c820b1deb4a83e82 Signed-off-by: Klement Sekera <ksekera@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
c8c44ebea1
commit
80a7f0a81c
@ -147,6 +147,9 @@ help:
|
|||||||
@echo " TEST='*.*.test_add_bfd' selects all test functions named test_add_bfd from all files/classes"
|
@echo " TEST='*.*.test_add_bfd' selects all test functions named test_add_bfd from all files/classes"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " VPP_ZOMBIE_NOCHECK=1 - skip checking for vpp (zombie) processes (CAUTION)"
|
@echo " VPP_ZOMBIE_NOCHECK=1 - skip checking for vpp (zombie) processes (CAUTION)"
|
||||||
|
@echo " COREDUMP_SIZE=<size> - pass <size> as unix { coredump-size <size> } argument to vpp"
|
||||||
|
@echo " e.g. COREDUMP_SIZE=4g"
|
||||||
|
@echo " COREDUMP_SIZE=unlimited"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Creating test documentation"
|
@echo "Creating test documentation"
|
||||||
@echo " test-doc - generate documentation for test framework"
|
@echo " test-doc - generate documentation for test framework"
|
||||||
|
@ -110,10 +110,6 @@ class VppTestCase(unittest.TestCase):
|
|||||||
return
|
return
|
||||||
dl = d.lower()
|
dl = d.lower()
|
||||||
if dl == "core":
|
if dl == "core":
|
||||||
if resource.getrlimit(resource.RLIMIT_CORE)[0] <= 0:
|
|
||||||
# give a heads up if this is actually useless
|
|
||||||
print(colorize("WARNING: core size limit is set 0, core files "
|
|
||||||
"will NOT be created", RED))
|
|
||||||
cls.debug_core = True
|
cls.debug_core = True
|
||||||
elif dl == "gdb":
|
elif dl == "gdb":
|
||||||
cls.debug_gdb = True
|
cls.debug_gdb = True
|
||||||
@ -140,8 +136,17 @@ class VppTestCase(unittest.TestCase):
|
|||||||
debug_cli = ""
|
debug_cli = ""
|
||||||
if cls.step or cls.debug_gdb or cls.debug_gdbserver:
|
if cls.step or cls.debug_gdb or cls.debug_gdbserver:
|
||||||
debug_cli = "cli-listen localhost:5002"
|
debug_cli = "cli-listen localhost:5002"
|
||||||
cls.vpp_cmdline = [cls.vpp_bin,
|
coredump_size = None
|
||||||
"unix", "{", "nodaemon", debug_cli, "}",
|
try:
|
||||||
|
size = os.getenv("COREDUMP_SIZE")
|
||||||
|
if size is not None:
|
||||||
|
coredump_size = "coredump-size %s" % size
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
if coredump_size is None:
|
||||||
|
coredump_size = "coredump-size unlimited"
|
||||||
|
cls.vpp_cmdline = [cls.vpp_bin, "unix",
|
||||||
|
"{", "nodaemon", debug_cli, coredump_size, "}",
|
||||||
"api-trace", "{", "on", "}",
|
"api-trace", "{", "on", "}",
|
||||||
"api-segment", "{", "prefix", cls.shm_prefix, "}"]
|
"api-segment", "{", "prefix", cls.shm_prefix, "}"]
|
||||||
if cls.plugin_path is not None:
|
if cls.plugin_path is not None:
|
||||||
|
Reference in New Issue
Block a user