From b6c5ab4eb7949dbaa28140c0134e788d5877fae3 Mon Sep 17 00:00:00 2001 From: Jamie Hewland Date: Mon, 18 Dec 2017 18:05:58 +0200 Subject: [PATCH] tests/python: Add a test for stack size segfault --- test/config.sh | 1 + test/tests/python-stack-size/container.py | 13 +++++++++++++ test/tests/python-stack-size/run.sh | 1 + 3 files changed, 15 insertions(+) create mode 100644 test/tests/python-stack-size/container.py create mode 120000 test/tests/python-stack-size/run.sh diff --git a/test/config.sh b/test/config.sh index 385e7e0977..05b567ad9f 100644 --- a/test/config.sh +++ b/test/config.sh @@ -160,6 +160,7 @@ imageTests+=( python-imports python-pip-requests-ssl python-sqlite3 + python-stack-size ' [rabbitmq]=' rabbitmq-basics diff --git a/test/tests/python-stack-size/container.py b/test/tests/python-stack-size/container.py new file mode 100644 index 0000000000..f8d01ed6bc --- /dev/null +++ b/test/tests/python-stack-size/container.py @@ -0,0 +1,13 @@ +import threading +import sys + + +def fun(i): + try: + fun(i+1) + except: + sys.exit(0) + + +t = threading.Thread(target=fun, args=[1]) +t.start() diff --git a/test/tests/python-stack-size/run.sh b/test/tests/python-stack-size/run.sh new file mode 120000 index 0000000000..545a6779f2 --- /dev/null +++ b/test/tests/python-stack-size/run.sh @@ -0,0 +1 @@ +../run-python-in-container.sh \ No newline at end of file