Subject: ffs regression tests
To: None <>
From: Manuel Bouyer <>
List: tech-kern
Date: 03/10/1999 20:18:23
I added a 'fs' directory in src/regress/sys, which for now contain only
ffs regression tests. These tests are not yet enabled in fs/Makefile, I'd
like some comments about them before.

These tests create a template tree in /tmp, which holds a few common
test cases: directory, subdirectory, 10b and 10k files, a directory large
enouth so that is has an indirect block, and 2 symlinks short and long.
It then attachs a vnd to a 2.88k image (the image is in /var/tmp for
now, as /tmp may be an MFS and vnd on MFS loose), newfs it in big-endian
mode, mount it and copy the template directory. It then runs a diff -q -r
against the template. Then it unmount it, run fsck on the vnd to convert it
in little-endian, and run diff -r again. It then re-convert to big-endian
and compare again. It then tests dump's estimates, with and without
nodump flag honnor. Finally, it does a dump|restore and compares
the tree with the original template.
It then does the same thing, but with little-endian and big-endian reversed.

The template creation and dump estimate tests comes from Brian Grayson's
PR 6706.

The Makefile calls make recursively, which can interract badly with obj
directories. I think I got this rigth (at last it works for me when I do
a 'make objs' before). I didn't test it on a diskless box. I don't know how
much time it can take on a slow box, but the template creation process is
about 30 seconds on a cyrix 133Mhz with a MFS /tmp. The copy process is
quite quick, but I have a 20Mb buffer cache, and the vnd is mounted async.
Of course if you don't have vnd and FFS_EI in your kernel you loose.

Comments ? Should I enable this in the parent's Makefile, so that
'make regress' will run it ? I fear it may really hurt on slow machines
like a sun3.

Manuel Bouyer, LIP6, Universite Paris VI.