There are three tests here:

1)  xfs crash loop - tests XFS log recovery by repeatedly

	a) mounting the filesystem
	b) unmounting the filesytsem and verifying that 
		it is still consistent
	c) mounting the filesystem again
	d) starting some filesystem stress to generate XFS log
		activity
	e) rebooting the machine using uadmin 1 1 to simulate
		a crash+reboot (jumps into the PROM reboot routine)
	f) goto a

2)  live XFS stress - repeatedly

	a) umounts the filesystem
	b) checks to see if it's consistent
	c) mounts the filesystem
	d) clears (rm -f) the test directory
	e) runs a stress test in the directory
	f) goto a

3) xfs repair crash loop - tests xfs_repair recovery by repeatedly
	a) starting with an unmounted filesystem, running
	xfs_repair in no modify state.
	b) stopping if a core file existed.
	c) running xfs_repair in repair mode
	d) checking for errors and stopping if any errors
	e) running xfs_repair yet again in no modify state again to see if
 		the last repair worked correctly. Stopping on errors.
	f) running xfs_check for more sanity checking of xfs_repair
	g) running the attr command over the directory looking particularly
		for files that had attributes attached and repair ran on.
	h) starting some filesystem stress by using runall-repair.sh
	e) rebooting the machine using uadmin 1 1 to simulate
		a crash+reboot (jumps into the PROM reboot routine)
	f) goto a


All tests print out whether the filesystem is ok or corrupted
at the end of each iteration in large letters (using banner).

The 2nd test can be set up to run automatically when the
machine reboots.  This allows you to set the test up so that
the output goes to the console without having to grab it
yourself.

---

To set the tests up:

0)  make sure that noship.sw.xfs is installed.  The noship subsystems
	live in dist:/test/ficus/latest/noship.

1)  cc -o randsleep randsleep.c

2)  copy all files into /xfsstress on the test machine.

3)  Make a test filesystem on either a disk partition or volume.

4)  mkdir /xfs

5)  mount the filesystem on /xfs

6)  mkdir /xfs/test

7)  umount the filesystem

8)  Edit the SETUP file and set the RDSK and DSK variables accordingly.

---

To run the crash loop test, do

	ln -s /xfsstress/S99xfscrash /etc/rc2.d
	/etc/init 6

To stop the test, login or rsh into the machine at some
point when it's still and up and do

	touch /stop.now

The test will stop the next time around.

---

To run the live stress test, do

	cd /xfsstress
	./XFS-STRESS

--

To reboot the machine and have the machine automatically
run the live stress test and direct its output to the
console, do

	ln -s /xfsstress/S99xfsstress /etc/rc2.d
	/etc/init 6

---

To run the xfs_repair crash loop test, do

	ln -s /xfsstress/S99xfsrepair /etc/rc2.d
	ln -s /xfsstress/runall-repair.sh /etc/rc2.d/runall.sh
	ln -s /xfsstress/randsleep /etc/rc2.d/randsleep
	/etc/init 6

To stop the test, login or rsh into the machine at some
point when it's still and up and do

	touch /stop.now

The test will stop the next time around.

NOTE: runall-repair.sh is tuned to get lots of attribute activity. You
should modify your copy if this is not the behavior you want.
