#!/usr/bin/perl -w

open FP, "|./test ldap.somewhere.edu.au> xxx" || die "Cannot run ./test";

print "XXX Started test\n";

system("/bin/ps -alx | fgrep ./test");

foreach (1..3)
{
	print "XXX Running 100 correct passwords\n";
	foreach (1..100)
	{
		print FP "foo bar\n";
	}
	system("/bin/ps -alx | fgrep ./test");

	print "XXX Running 100 incorrect passwords\n";
	foreach (1..100)
	{
		print FP "foo baz\n";
	}
	system("/bin/ps -alx | fgrep ./test");
}

system("/bin/cat xxx | /bin/sort | /usr/bin/uniq -c");

close FP;

