mirror of
https://github.com/Pithikos/C-Thread-Pool
synced 2024-11-21 21:21:23 +03:00
Tests for non-zero heap/stack bug
This commit is contained in:
parent
1485e59e63
commit
56dc2882d7
@ -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.
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user