source: zzuf/trunk/test/check-overflow @ 4119

Last change on this file since 4119 was 4119, checked in by Sam Hocevar, 13 years ago

Limit coredumpsize to 0 in test scripts to avoid dumping cores at build time.

  • Property svn:executable set to *
File size: 717 bytes
Line 
1#!/bin/sh
2
3. "$(dirname "$0")/functions.inc"
4
5limit coredumpsize 0
6
7PROGRAM="$DIR/bug-overflow"
8if [ ! -f "$PROGRAM" ]; then
9  echo "error: test/bug-overflow is missing"
10  exit 1
11fi
12
13start_test "zzuf buffer overflow test"
14
15new_test "bug-overflow < /file-00"
16if ! $PROGRAM < "$DIR/file-00"; then
17    fail_test " unexpected exit status $?"
18else
19    pass_test " OK"
20fi
21
22new_test "zzuf -qi -r0 bug-overflow < /file-00"
23if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then
24    fail_test " unexpected exit status $?"
25else
26    pass_test " OK"
27fi
28
29new_test "zzuf -qi bug-overflow < file-00"
30if "$ZZUF" -qi "$PROGRAM" < "$DIR/file-00"; then
31    fail_test " unexpected exit status $?"
32else
33    pass_test " OK"
34fi
35
36stop_test
37
Note: See TracBrowser for help on using the repository browser.