File: heap_stack_garbage.sh

package info (click to toggle)
cthreadpool 0.0%2Bgit20170424-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 224 kB
  • sloc: ansic: 566; sh: 182; makefile: 16
file content (26 lines) | stat: -rwxr-xr-x 480 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/bash

#
# This file tests for possible bugs
#

. funcs.sh


# ---------------------------- Tests -----------------------------------

function test_with_nonzero_heap_and_stack {
    compile src/nonzero_heap_stack.c
    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
    fi
}


# Run tests
test_with_nonzero_heap_and_stack

echo "No errors"