summaryrefslogtreecommitdiff
path: root/tests/tail-2/proc-ksyms
blob: 52e2a6fc3a7bc0e333c1d7964444748b1edde21c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Prior to textutils-2.0.17, `tail /proc/ksyms' would segfault on Linux.

if test "$VERBOSE" = yes; then
  set -x
  tail --version
fi

pwd=`pwd`
tmp=proc-ksyms.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15

fail=0

ksyms=/proc/ksyms
if test -f $ksyms; then
  tail $ksyms > /dev/null || fail=1
fi

(exit $fail); exit $fail