summaryrefslogtreecommitdiff
path: root/tests/tail-2/proc-ksyms
blob: a3d47f030aecc05580f3ef9051797e110cc17adb (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