From owner-freebsd-testing@FreeBSD.ORG Mon Aug 25 18:38:32 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3DE2BD4; Mon, 25 Aug 2014 18:38:32 +0000 (UTC) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BF383CA8; Mon, 25 Aug 2014 18:38:32 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id x12so13301843wgg.4 for ; Mon, 25 Aug 2014 11:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=lD0XNGy5D/HvK/IdJ3VmbJ3AqymQWUim71EXttANTgg=; b=s0g+ur85HNhydSOGc28+RNwBOsjT7aW26o7qNr7eido11tNF/BwMOTjlxl4wF7col5 v4ZZhxaWTL5vXXqo3yIzg/4howDrdA17kXUlPy9UUul9HAE45NHuF0IJYoshQMpaT0Dj icmsXZg5kCDpL+sYqLSjfcQ72GB2YFEbLgiYrt0iD4PcuNpt/l8MXYK/kNmcoAQpOkMy qm/HS2Yx0HNiU7uJB0kOLTySFGgLKl/0puc2OnLxQJCgsBcNY0xkCuvbvoMEQP02cAki REZm6UG07+yjfITCWOC3aGtUMJw/N8BPISk/fjNiQCdHOBmvPDi7GntigBAZahMUygUg long== MIME-Version: 1.0 X-Received: by 10.194.58.148 with SMTP id r20mr25200244wjq.66.1408991910315; Mon, 25 Aug 2014 11:38:30 -0700 (PDT) Received: by 10.194.9.134 with HTTP; Mon, 25 Aug 2014 11:38:30 -0700 (PDT) Date: Mon, 25 Aug 2014 12:38:30 -0600 Message-ID: Subject: Introducing the ZFS test suite From: To: "freebsd-testing@freebsd.org" , "zfs-devel@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2014 18:38:32 -0000 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