File: zero-size

package info (click to toggle)
libkdumpfile 0.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,800 kB
  • sloc: ansic: 34,639; sh: 3,853; python: 1,490; makefile: 755
file content (21 lines) | stat: -rwxr-xr-x 333 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
#! /bin/sh

#
# Check that opening a zero-sized file fails gracefully
#

mkdir -p out || exit 99

name=$( basename "$0" )
dumpfile="out/${name}.dump"
resultfile="out/${name}.result"

> "$dumpfile"
./dumpdata "$dumpfile" 0 1 > "$resultfile"
rc=$?
if [ $rc -ne 99 ]; then
   echo "Unexpected exit status: $rc" >&2
   exit 1
fi

exit 0