phunix/libexec/httpd/testsuite/test-bigfile
David van Moolenbroek 340f5e5660 Import NetBSD httpd(8)
Also known as bozohttpd(8).

Change-Id: I40e955b5654674f2c708b10e5e403ca9cbc92534
2017-03-21 22:00:31 +00:00

28 lines
428 B
Bash
Executable File

#! /bin/sh
test="$1" # partial4000 or partial8000
bozohttpd="$2"
wget="$3"
datadir="$4"
bozotestport=11111
# copy beginning file
cp ./data/bigfile.${test} ./bigfile
# fire up bozohttpd
${bozohttpd} -b -b -I ${bozotestport} -n -s -f ${datadir} &
bozopid=$!
${wget} -c http://localhost:${bozotestport}/bigfile
kill -9 $bozopid
if cmp ./bigfile ./data/bigfile; then
rm -f ./bigfile
exit 0
else
rm -f ./bigfile
exit 1
fi