Date: Mon, 25 Aug 2014 12:38:30 -0600 From: <asomers@gmail.com> To: "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, "zfs-devel@freebsd.org" <zfs-devel@freebsd.org> Subject: Introducing the ZFS test suite Message-ID: <CAOtMX2i90%2BiKkoed3qBDBq4eMY-8VOtiAkqFb2Up-s%2BRGiit4A@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I just merged the ZFS test suite to projects/zfsd/head in change 270604. The ZFS test suite was originally written by Sun as part of the STF (Solaris test framework). They open sourced it in OpenSolaris, then HighCloud partially ported it to FreeBSD, and Spectra Logic finished the port. We also added 37 testcases, fixed many broken ones, and converted them all to the ATF framework. gibbs, will, ken, and myself have all worked on it. We've also taken a few contributions from araujo and Steven Hartland. The structure of the tests reflects their heritage as part of STF. Each ATF test case has its own file, for example tests/sys/cddl/zfs/tests/exec/exec_001_pos.ksh. Each directory that contains at least one test case has a separate atf-ksh93 test program, for example tests/sys/cddl/zfs/tests/exec/exec_tests.sh. The test programs are basically just wrappers around the test case files, but they still need to source some kshlib files, which is why they must use atf-ksh93 instead of atf-sh. atf-ksh93 is a hack; it simply sets the ATF_SHELL environment variable and execs atf-sh. Technically, this isn't guaranteed to work as the atf-sh shell functions aren't guaranteed to work in ksh93. In practice, however, they all do. The directories tests/sys/cddl/zfs/{include,bin} contain support files used by many different tests. The ZFS test suite still has some problems. Some of these are blocking it from being merged to head: * The atf-ksh93 hack. This is not a good thing to officially add to ATF, but it would be a lot of work to convert the test programs to run under sh. Especially because of the use of ksh arrays. * Many test cases reference Spectra Logic internal bug numbers. We need to create FreeBSD bugs for each of them that also affects FreeBSD. * It uses some ATF config variables that are not yet described in tests(7). Remember, don't run these tests on a production system. They WILL cause panics and deadlocks, and they may cause data loss too. Happy Hacking, -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2i90%2BiKkoed3qBDBq4eMY-8VOtiAkqFb2Up-s%2BRGiit4A>