I can think of two ways to think about the purpose of this test: 1. distinguish stack overflow from an access to an invalid address ("programm error")
2. distinguish stack overflow from other cases when SIGSEGV is sent Under view 2, then the access to an invalid address is just an implementation detail: a simple way to cause SIGSEGV. I assume view 2 in this patch and simply consider the platform which doesn't send a SIGSEGV on this condition (but rather sends SIGILL as E2K (i.e., elbrus)) not suitable for this implementation of the test. Therefore, the result is skip. Under view 1, it could even be consiidered a success: the distinction is made, but not thanks to our code, but thanks to the platform sending a different signal. Here is what it looks like on E2K (i.e., elbrus): $ ./test-c-stack 1; echo $? Illegal instruction 132 $ ./test-c-stack; echo $? test-c-stack: stack overflow 1 $ --- tests/test-c-stack2.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test-c-stack2.sh b/tests/test-c-stack2.sh index 0cd49c969..a04d861cd 100755 --- a/tests/test-c-stack2.sh +++ b/tests/test-c-stack2.sh @@ -23,6 +23,11 @@ case $? in exit 77 fi ;; + 132) echo 'not applicable if non-SIGSEGV is sent in the case to be told from stack overflow' >&2 + # E2K (elbrus) systems send SIGILL on an access to an invalid address. + # So, this test is skipped: + exit 77 + ;; 0) (exit 1); exit 1 ;; esac if grep 'program error' t-c-stack2.tmp >/dev/null ; then -- 2.17.1