File: t15

package info (click to toggle)
diod 1.0.24-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 29,180 kB
  • sloc: ansic: 33,159; sh: 6,545; makefile: 362; perl: 80
file content (26 lines) | stat: -rwxr-xr-x 601 bytes parent folder | download | duplicates (5)
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 -e

bg_test ()
{
  local sockfile=$1
  while ! test -S $sockfile; do
    sleep 0.1
  done
  ../../utils/diodload -r 2 -s $sockfile 2>/dev/null
}

TEST=$(basename $0 | cut -d- -f1)
sockfile=$(mktemp)
bg_test $sockfile &
./memcheck ../../diod/diod -c /dev/null -n -f -e ctl -l $sockfile -s >$TEST.out 2>&1 || true
diff $TEST.exp $TEST.out >$TEST.diff || true
rm -f $sockfile
wait %1
if test -s $TEST.diff; then
   echo "**********************" >&2
   echo "Memcheck failed. Diff:" >&2
   cat $TEST.diff                >&2
   echo "**********************" >&2
   : > $TEST.diff
   exit 77
fi