From owner-freebsd-current@FreeBSD.ORG Tue Aug 26 21:32:54 2014 Return-Path: Delivered-To: freebsd-current@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 979FF6AE; Tue, 26 Aug 2014 21:32:54 +0000 (UTC) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) (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 3C2F930DD; Tue, 26 Aug 2014 21:32:54 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id at20so11754740iec.8 for ; Tue, 26 Aug 2014 14:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QccBbx1DmrCoHb3KCg/QwMMNFHkK6hfW1lpNd6ZuO+c=; b=QeUCar1GlbXOsCc97VvoiKsW/GSGnQI7vOhinkRyJOmvYYUJOYoyf2rs2oTD05RG5X 3LLojCpXFN7yw/akW3ZVoVKI5lDsKeYpyIwmmovKtGNash2TOHbKZLbsGCQhTKReWyVj sgPbP2wKk6ZUBTNE2IqT3Px7ngip/Nc1QIocUtkW1NXA6fGKQi+0gngowHDoRNT62WbF qQKMseistg4o7r1u+os5qQvVmZrl+PqXYXzDf01icLBv/fiFEV/GPAnTrWjza30z+Exd DCeJjpt6GcO/W3+hZG9+uAD7SVQ516Pn5DcYBiPRMl1fzUr/44PP6vMDFKk96oRNT1Ir qOqg== MIME-Version: 1.0 X-Received: by 10.50.80.45 with SMTP id o13mr25488884igx.7.1409088773581; Tue, 26 Aug 2014 14:32:53 -0700 (PDT) Received: by 10.50.72.69 with HTTP; Tue, 26 Aug 2014 14:32:53 -0700 (PDT) In-Reply-To: References: <5256B761.4050301@gmail.com> <1381421583.19140.32451849.084D8E32@webmail.messagingengine.com> <5256E2D5.4060101@allanjude.com> <1387388390.28188.61199633.413D38F8@webmail.messagingengine.com> <53A7CE1B.7090400@gmail.com> <8e598a07cf5bc8690749120295936c40@mail.feld.me> <73E03261-8087-415A-BD04-EAADFF90C080@gmail.com> Date: Tue, 26 Aug 2014 14:32:53 -0700 Message-ID: Subject: Re: FreeBSD 10 and zfsd From: Garrett Cooper To: Alan Somers Content-Type: text/plain; charset=UTF-8 Cc: Johan Hendriks , Julio Merino , FreeBSD CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2014 21:32:54 -0000 On Tue, Aug 26, 2014 at 1:51 PM, Alan Somers wrote: > On Tue, Aug 26, 2014 at 1:48 PM, Garrett Cooper wrote: >> >>> On Aug 26, 2014, at 12:45, Alan Somers wrote: >>> >>>> On Tue, Aug 26, 2014 at 1:39 PM, Mark Felder wrote: >>>> August 26 2014 10:21 AM, "Alan Somers" wrote: >>>>> >>>>> Merged into the projects/zfsd/head branch by change 270604. Merging >>>>> to head is blocked by three issues: >>>>> a) The atf-ksh93 hack. The correct solution is to modify all the test >>>>> programs (not the test cases) so they can run under /bin/sh. That >>>>> will take some effort. >>>> >>>> Can you provide a link to the atf-ksh93 code? >>> >>> There's not much to it. It simply sets an environment variable and >>> calls atf-sh. What's more interesting is libtest.kshlib. In order to >>> eliminate atf-ksh93, we would need to modify libtest.kshlib to run >>> under /bin/sh. Alternatively, it may be easier to split >>> libtest.kshlib into two files: a small /bin/sh-compatible that can be >>> sourced by the ATF test programs, and a ksh93 script that only needs >>> to be sourced by the ATF test cases. >> >> I'm working on integrating the dtrace testcases into kyua, then atf under Kyua as time permits, but I'm not rewriting the core test code (yet), because I want to reduce divergence with upstream. >> >> Why not just require ksh93 from ports? > > It's not that simple. It's certainly possible to put a "require.progs > ksh93" in the test case header. But you also need to use ksh93 > features before invoking the test case script. For example, see > zpool_upgrade_004_pos_body in > tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh > . Notice how it sources some .kshlib scripts, then checks the $KEEP > variable. Other tests do similar things. Perhaps they could be fixed > by wrapping those lines in a here document that gets fed to ksh93. > But that's very ugly. I'd rather fix all the tests to not require > ksh93 before invoking the separate test case script. > > If you change the interpreter script from atf-ksh93 to atf-sh, you'll > see errors like this: > > # kyua debug zfsd_test:zfsd_import_001_pos > set: Illegal option -A > set: Illegal option -A > zfsd_test:zfsd_import_001_pos -> broken: Premature exit; test case > exited with code 2 This should be plugged into kyua-testers though instead of hacking around ATF -- even if it's mostly a thin layer on top of the ATF tester; we should work towards a common goal with the DTrace/ZFS testing though because they sort of follow the same design patterns. My mentor jmmv@ might have valuable input to provide here in what should be done (I've CCed him). Thanks! -Garrett