Tests for non-zero heap/stack bug

This commit is contained in:
pithikos 2015-03-12 19:16:27 +00:00
parent 1485e59e63
commit 56dc2882d7
3 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,7 @@ memleaks - Will run tests for memory leaks. valgrind is being used for this.
threadpool - Will run general functional tests for the threadpool. threadpool - Will run general functional tests for the threadpool.
pause_resume - Will test the synchronisation of the threadpool from the user. pause_resume - Will test the synchronisation of the threadpool from the user.
wait - Will run tests to assuse that the wait() function works correctly. wait - Will run tests to assuse that the wait() function works correctly.
heap_stack_garbage - Will test if previous garbage affects new threapools created.
```` ````
Any test can be run with extra flags by exporting the variable COMPILATION_FLAGS. That's Any test can be run with extra flags by exporting the variable COMPILATION_FLAGS. That's
also how the optimized_compile test works. also how the optimized_compile test works.

View File

@ -11,11 +11,11 @@
function test_with_nonzero_heap_and_stack { function test_with_nonzero_heap_and_stack {
compile src/nonzero_heap_stack.c compile src/nonzero_heap_stack.c
if ! timeout 1 ./test; then echo "Testing for non-zero heap and stack"
err "Fail running on nonzero heap and stack" output=$(timeout 1 ./test)
if [[ $? != 0 ]]; then
err "Fail running on nonzero heap and stack" "$output"
exit 1 exit 1
else
return
fi fi
} }

View File

@ -10,6 +10,7 @@
. threadpool.sh . threadpool.sh
. pause_resume.sh . pause_resume.sh
. heap_stack_garbage.sh
. memleaks.sh . memleaks.sh
. wait.sh . wait.sh