mirror of
https://github.com/Pithikos/C-Thread-Pool
synced 2024-11-24 14:29:46 +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.
|
||||
pause_resume - Will test the synchronisation of the threadpool from the user.
|
||||
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
|
||||
also how the optimized_compile test works.
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
function test_with_nonzero_heap_and_stack {
|
||||
compile src/nonzero_heap_stack.c
|
||||
if ! timeout 1 ./test; then
|
||||
err "Fail running on nonzero heap and stack"
|
||||
echo "Testing for non-zero heap and stack"
|
||||
output=$(timeout 1 ./test)
|
||||
if [[ $? != 0 ]]; then
|
||||
err "Fail running on nonzero heap and stack" "$output"
|
||||
exit 1
|
||||
else
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
. threadpool.sh
|
||||
. pause_resume.sh
|
||||
. heap_stack_garbage.sh
|
||||
. memleaks.sh
|
||||
. wait.sh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user