#!/bin/sh

cd "$AUTOPKGTEST_TMP"

# The program dies on most errors, thus any output means we parsed the
# platform's /proc and /sys files acceptably.

topline dash -c 'sleep 2.5 && kill -HUP $$' 2>stderr|tee stdout

if [ "$(cat stderr)" != Hangup ]; then
	echo >&2 "Expected ｢Hangup｣, got:"
	cat stderr >&2
	exit 2
fi
if [ `wc -l <stdout` -ne 2 ]; then
	echo >&2 Expected two lines.
	exit 1
fi
