NetBSD/libexec/httpd/testsuite/test-bigfile
mrg 36a7970f3c import bozohttpd 20090522, which has these changes:
o  close more leaking file descriptors for CGI and daemon mode
	o  add subdirs for build "debug" and "small" versions
	o  clean up a bad merge / duplicate code
	o  make mmap() usage portable, fixes linux & ranges: support
	o  document the -f option
	o  daemon mode now serves 6 files per child
2009-05-23 02:21:19 +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