From owner-freebsd-current@FreeBSD.ORG Tue Aug 26 20:51:31 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 390B7C8A; Tue, 26 Aug 2014 20:51:31 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (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 728D63BDB; Tue, 26 Aug 2014 20:51:30 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id bs8so4797551wib.2 for ; Tue, 26 Aug 2014 13:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mbXN0NPlb8ZtJwUCrWXjIOdjrtvEcRpPQ0km1JM+BMM=; b=T7ldodnj4tyjgzcmS/jr4+vOREaJQZpJ9B3AbX8kZ0TH5pn9bFM29eJLsNTkqgUeGQ JJorsR5mLhopoHYbPrUqXemtIGa8V6SpPqpmXNjW5NPjt3hp+WhWk2C8DilZKzu1oLoB jhxFRBHYmkKt0yFEp4WUir8IRov6u90a6loDc4qpbNHLAnObVcHw/43WGxwC1CDFGeN+ ZJc9VXgph/Dk+MsAIlLlsEqM5A7NUoyjjRwNZ3xXCf0rgxhwuQETNV9MgWK0wZuxufzG jLG4z996/ypyOnDnY8BwEWjYRi0Lke8nSJ8gq6imRBYJ0ohUYCBzlzmPft57XcYtik+z xOqw== MIME-Version: 1.0 X-Received: by 10.180.14.2 with SMTP id l2mr24451416wic.50.1409086288665; Tue, 26 Aug 2014 13:51:28 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.194.126.1 with HTTP; Tue, 26 Aug 2014 13:51:28 -0700 (PDT) In-Reply-To: <73E03261-8087-415A-BD04-EAADFF90C080@gmail.com> 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:51:28 -0600 X-Google-Sender-Auth: wDVnq66r5QNxJiMzyRbxBesHe44 Message-ID: Subject: Re: FreeBSD 10 and zfsd From: Alan Somers To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: Johan Hendriks , FreeBSD CURRENT , Alan Somers 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 20:51:31 -0000 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 -Alan