Remove leftover test code for Windows

- Removed all code that only runs under CYGWIN, and made all
  code that doesn't run under CYGWIN non-optional.
- Removed the $TP variable which was used to add optional
  trailing dots to filenames; they're no longer optional.
- Removed references to pssuspend and dos2unix.
- No need to use environment variables for diff and kill.
- Removed uses of "tr -d '\r'"; this was a workaround for
  a cygwin regex bug that is no longer needed.
This commit is contained in:
Evan Hunt
2021-10-15 00:05:36 -07:00
committed by Michal Nowak
parent 8a2305fe1a
commit 1d706f328c
50 changed files with 361 additions and 454 deletions

View File

@@ -27,10 +27,10 @@ kill_named() {
pid=$(cat "${pidfile}" 2>/dev/null)
if [ "${pid:+set}" = "set" ]; then
$KILL -15 "${pid}" >/dev/null 2>&1
kill -15 "${pid}" >/dev/null 2>&1
retries=10
while [ "$retries" -gt 0 ]; do
if ! $KILL -0 "${pid}" >/dev/null 2>&1; then
if ! kill -0 "${pid}" >/dev/null 2>&1; then
break
fi
sleep 1
@@ -63,7 +63,7 @@ run_named() (
)
check_pid() (
return $(! $KILL -0 "${1}" >/dev/null 2>&1)
return $(! kill -0 "${1}" >/dev/null 2>&1)
)
status=0
@@ -85,7 +85,7 @@ testpid=$(run_named ns2 named$n.run -c named-alt2.conf -D runtime-ns2-extra-2 -X
test -n "$testpid" || ret=1
retry_quiet 10 check_named_log "another named process" ns2/named$n.run || ret=1
test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
test -n "$testpid" && $KILL -15 $testpid > kill$n.out 2>&1 && ret=1
test -n "$testpid" && kill -15 $testpid > kill$n.out 2>&1 && ret=1
test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -223,7 +223,7 @@ status=$((status+ret))
n=$((n+1))
echo_i "verifying that named switches UID ($n)"
if [ "$(id -u)" -eq 0 ] && [ -z "$CYGWIN" ]; then
if [ "$(id -u)" -eq 0 ]; then
ret=0
TEMP_NAMED_DIR=$(mktemp -d "$(pwd)/ns2/tmp.XXXXXXXX")
if [ "$?" -eq 0 ]; then