Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#! /bin/sh
# $NetBSD: test-bigfile,v 1.6 2018/12/14 23:57:22 maya Exp $

test="$1"; shift	# partial4000 or partial8000
bozohttpd="$1"; shift
wget="$1"; shift
datadir="$1"; shift
verbose="$1"; shift

tmperr="tmp.$test.err"

if [ "yes" = "$verbose" ]; then
	echo "Running test $test"
else
	exec 2>"$tmperr"
fi

bozotestport=11111

# copy beginning file
cp "${datadir}/bigfile.${test}" ./bigfile

# fire up bozohttpd
${bozohttpd} -b -b -I ${bozotestport} -n -s -f "$@" "${datadir}" "${host}" &
bozopid=$!

"${wget}" -c http://localhost:${bozotestport}/bigfile

kill -9 $bozopid

if cmp ./bigfile "${datadir}/bigfile"; then
	rm -f ./bigfile
	exit 0
else
	rm -f ./bigfile
	if [ "yes" = "$verbose" ]; then
		echo "Failed test $test:"
		cat "$tmperr"
	fi
	exit 1
fi