sys/mdup-test.sh: Remove obsolete test script.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 23 Jun 2013 11:40:20 +0000 (12:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 28 Jun 2013 22:59:00 +0000 (23:59 +0100)
sys/mdup-test.sh [deleted file]

diff --git a/sys/mdup-test.sh b/sys/mdup-test.sh
deleted file mode 100755 (executable)
index 1b34916..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /bin/sh
-
-set -e
-: ${test=./mdup.t}
-cases=
-
-###--------------------------------------------------------------------------
-### Set up the test cases.
-###
-### The mdup-test program takes a command-line representation of an mdup_fd
-### array, calls mdup, and checks the result.  In particular, it ensures that
-### the file descriptors returned are the ones asked for, and that the
-### resulting file descriptors actually correspond to the requested files.
-### (It does the latter by comparing inodes before and after.)
-
-## Very simple tests.
-cases="$cases 3:4"
-cases="$cases 4:3"
-
-## Overlapping sources and destinations.
-cases="$cases 4:3,3:5,5:6"
-
-## Repeated sources.
-cases="$cases 3:4,3:3,3:-1"
-cases="$cases 5:8,3:4,3:5,4:6"
-
-## Cycles.
-cases="$cases 5:7,3:4,3:5,4:6,5:3"
-cases="$cases 5:8,3:4,3:5,4:6,5:3"
-
-###--------------------------------------------------------------------------
-### Actually run the tests.
-
-## Initialize counters.
-win=0
-lose=0
-total=0
-
-## Run the tests.
-for case in $cases; do
-  total=$(expr $total + 1)
-  case=$(echo "$case" | sed 'y/,/ /')
-  printf "%d: %-60s  " $total "$case"
-  if $test $case >mdup.$total.out 2>mdup.$total.err; then
-    echo "ok"
-    win=$(expr $win + 1)
-    rm mdup.$total.out mdup.$total.err
-  else
-    echo "FAIL"
-    lose=$(expr $lose + 1)
-  fi
-done
-
-## Announce the outcome.
-if [ $win = $total ]; then
-  echo "All $total tests successful."
-  rc=0
-else
-  echo "FAILED $lose of $total tests."
-  rc=1
-fi
-
-## And exit.
-exit $rc
-
-###----- That's all, folks --------------------------------------------------